X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0dfd76c6fc55b5930c5ff296a28b77f1c5a2c43e..9701b7ab4dc4cd709ad4dcaa750fc0021f15e231:/stglibs/ia_auth_c.lib/ia_auth_c.cpp diff --git a/stglibs/ia_auth_c.lib/ia_auth_c.cpp b/stglibs/ia_auth_c.lib/ia_auth_c.cpp index 25e4d8c9..b5eb4ddc 100644 --- a/stglibs/ia_auth_c.lib/ia_auth_c.cpp +++ b/stglibs/ia_auth_c.lib/ia_auth_c.cpp @@ -23,7 +23,8 @@ /* * Author : * Boris Mikhailenko -* Andrey Rakhmanov - èñïðàâëåíèå äâóõ áàãîâ. +* Maxim Mamontov +* Andrey Rakhmanov - bugfixes. */ //--------------------------------------------------------------------------- @@ -212,9 +213,9 @@ close(sockr); closesocket(sockr); #endif -sockr = socket(AF_INET, SOCK_DGRAM, 0); // Cîêåò ÷åðåç êîòîðûé øëåì è ïðèíèìàåì +sockr = socket(AF_INET, SOCK_DGRAM, 0); -struct sockaddr_in localAddrR; // Íàø àäðåñ +struct sockaddr_in localAddrR; localAddrR.sin_family = AF_INET; if (localPort) @@ -292,14 +293,12 @@ if (!isNetPrepared) isNetPrepared = true; } -// Øèôðóåì LoginS int db = sizeof(HDR_8); for (int i = 0; i < IA_LOGIN_LEN/8; i++) { Blowfish_Encrypt(&ctxHdr, (uint32_t*)(buffer + db + i*8), (uint32_t*)(buffer + db + i*8 + 4)); } -// Øèôðóåì âñ¸ îñòàëüíîå db += IA_LOGIN_LEN; int encLen = (len - sizeof(HDR_8) - IA_LOGIN_LEN)/8; for (int i = 0; i < encLen; i++) @@ -421,6 +420,7 @@ return ret; //--------------------------------------------------------------------------- void IA_CLIENT_PROT::Start() { +nonstop = true; #ifdef WIN32 unsigned long pt; CreateThread(NULL, 16384, RunW, this, 0, &pt); @@ -696,6 +696,7 @@ return INFO_8_N; //--------------------------------------------------------------------------- int IA_CLIENT_PROT::Process_ERROR(const char * buffer) { +ERR_8 err; memcpy(&err, buffer, sizeof(err)); #ifdef ARCH_BE