From e7b7bc2d8c852e52c08f833c1862c9edd5ace0ea Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Fri, 4 Feb 2011 14:42:27 +0200 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=B8=D0=B1=D1=80=D0=B0=D0=BD=D0=BE?= =?utf8?q?=20=D1=96=D0=B4=D1=96=D0=BE=D1=82=D1=81=D1=8C=D0=BA=D1=96=20?= =?utf8?q?=D0=BA=D0=B8=D1=80=D0=B8=D0=BB=D1=96=D1=87=D0=BD=D1=96=20=D0=BA?= =?utf8?q?=D0=BE=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D1=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- stglibs/ia_auth_c.lib/ia_auth_c.cpp | 9 ++++----- stglibs/ia_auth_c.lib/ia_auth_c.h | 18 ++++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/stglibs/ia_auth_c.lib/ia_auth_c.cpp b/stglibs/ia_auth_c.lib/ia_auth_c.cpp index 0579755c..fb13d5b6 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++) diff --git a/stglibs/ia_auth_c.lib/ia_auth_c.h b/stglibs/ia_auth_c.lib/ia_auth_c.h index 639646af..abacaecd 100644 --- a/stglibs/ia_auth_c.lib/ia_auth_c.h +++ b/stglibs/ia_auth_c.lib/ia_auth_c.h @@ -87,7 +87,7 @@ public: int Connect(); int Disconnect(); - int GetAuthorized() const { return phase == 3 || phase == 4; }; // Ìû ïîäêëþ÷åíû èëè íåò? + int GetAuthorized() const { return phase == 3 || phase == 4; }; int GetPhase() const { return phase; }; int GetStatus() const; int GetReconnect() const { return reconnect; }; @@ -131,8 +131,8 @@ private: LOADSTAT stat; int action; int phase; - int phaseTime; // Âðåìÿ âõîäà â ôàçó - string messageText; // Ñîîáùåíèå îá îøèáêå + int phaseTime; + string messageText; string infoText; mutable string strError; mutable int codeError; @@ -154,17 +154,17 @@ private: pthread_t thread; #endif - string serverName; // Èìÿ ñåðâåðà - uint16_t port; // Ïîðò ñåðâåðà - uint32_t ip; // Proxy IP + string serverName; + uint16_t port; + uint32_t ip; uint32_t localPort; - struct sockaddr_in servAddr; // àäðåñ ñåðâåðà + struct sockaddr_in servAddr; bool firstConnect; int reconnect; int sockr; - int protNum; // ×èñëî, êîòîðîå ó÷àñòâóåò â îáìåíå ñîîáùåíèÿìèa + int protNum; int userTimeout; int aliveTimeout; unsigned int rnd; @@ -203,5 +203,3 @@ void * RunW(void *); //--------------------------------------------------------------------------- #endif //IA_AUTH_C_H - - -- 2.44.2