comments and new random

This commit is contained in:
2025-08-27 17:56:25 +02:00
parent 53c333d46d
commit d41f11a333
2 changed files with 74 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ BlockedList blockedList;
void call(int sock, sockaddr_in newSocketInfo)
{
std::string add = TcpSocket::remoteAddress(newSocketInfo);
printf("new: %s\n", add.c_str());
//printf("new: %s\n", add.c_str());
int64_t conf, id;
Message message;
@@ -99,7 +99,7 @@ void call(int sock, sockaddr_in newSocketInfo)
if (conf != StartHeader)
{
printf("StartHeader ERROR\n");
//printf("StartHeader ERROR\n");
TcpSocket::closet(sock);
//blockedList.addWarning(newSocketInfo.sin_addr.s_addr);
return;
@@ -107,7 +107,7 @@ void call(int sock, sockaddr_in newSocketInfo)
if (id == 0)
{
printf("ID ERROR\n");
//printf("ID ERROR\n");
TcpSocket::closet(sock);
//blockedList.addWarning(newSocketInfo.sin_addr.s_addr);
return;
@@ -144,12 +144,12 @@ void call(int sock, sockaddr_in newSocketInfo)
sqlite3_stmt *insert_user_stmt;
sql::prepare_v2(db, insert_user_data, -1, &insert_user_stmt, NULL);
// limit how many gen they can send so some cant just come to here and start sendding random data.
while (ok)
{
message.mess = Mess::REQ_SEND_GEN;
message.data = gen;
printf("requesting gen %ld\n", gen);
//printf("requesting gen %ld\n", gen);
TcpSocket::sendt(sock, &message, sizeof(Message));
TcpSocket::recvt(sock, &message, sizeof(Message));
@@ -187,7 +187,7 @@ void call(int sock, sockaddr_in newSocketInfo)
sql::finalize(insert_liked_stmt);
sql::close(db);
printf("del\n");
//printf("del\n");
TcpSocket::closet(sock);
}