From: Maxim Mamontov Date: Sat, 18 Dec 2010 14:16:00 +0000 (+0200) Subject: Додано ініціалізацію членів класу IA_USER X-Git-Tag: 2.407-rc3~258 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/360b3e8ff55a101fe10f2ddd214852a491d28f52?ds=inline Додано ініціалізацію членів класу IA_USER --- diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h index 0e194db6..ad7db7a1 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.h @@ -121,13 +121,12 @@ private: struct IA_USER { IA_USER() + : lastSendAlive(0), + rnd(random()), + port(0), + protoVer(0), + password("NO PASSWORD") { - //phase = 1; - //phaseTime = 0; - lastSendAlive = 0; - rnd = random(); - port = 0; - password = "NO PASSWORD"; // +++ Preparing CTX +++ unsigned char keyL[PASSWD_LEN]; // ðÁÒÏÌØ ÄÌÑ ÛÉÆÒÏ×ËÉ memset(keyL, 0, PASSWD_LEN); @@ -140,15 +139,15 @@ struct IA_USER }; IA_USER(const IA_USER & u) + : user(u.user), + phase(u.phase), + lastSendAlive(u.lastSendAlive), + rnd(u.rnd), + port(u.port), + messagesToSend(u.messagesToSend), + protoVer(u.protoVer), + password(u.password) { - user = u.user; - phase = u.phase; - //phaseTime = u.phaseTime; - lastSendAlive = u.lastSendAlive; - rnd = u.rnd; - password = u.password; - protoVer = u.protoVer; - port = u.port; #ifdef IA_DEBUG aliveSent = u.aliveSent; #endif @@ -280,10 +279,6 @@ private: int Timeouter(); - void InitEncrypt(BLOWFISH_CTX * ctx, const string & password); - void Decrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8); - void Encrypt(BLOWFISH_CTX * ctx, char * dst, const char * src, int len8); - int SendError(uint32_t ip, uint16_t port, int protoVer, const string & text); int Send(uint32_t ip, uint16_t port, const char * buffer, int len); int RealSendMessage6(const STG_MSG & msg, uint32_t ip, IA_USER & user);