/*
* Author :
* Boris Mikhailenko <stg34@stargazer.dp.ua>
-* Andrey Rakhmanov <andrey_rakhmanov@yahoo.com> - èñïðàâëåíèå äâóõ áàãîâ.
+* Maxim Mamontov <faust@stargazer.dp.ua>
+* Andrey Rakhmanov <andrey_rakhmanov@yahoo.com> - bugfixes.
*/
//---------------------------------------------------------------------------
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)
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++)
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; };
LOADSTAT stat;
int action;
int phase;
- int phaseTime; // Âðåìÿ âõîäà â ôàçó
- string messageText; // Ñîîáùåíèå îá îøèáêå
+ int phaseTime;
+ string messageText;
string infoText;
mutable string strError;
mutable int codeError;
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;
//---------------------------------------------------------------------------
#endif //IA_AUTH_C_H
-
-