From: Maxim Mamontov Date: Tue, 13 Sep 2011 14:25:24 +0000 (+0300) Subject: Another code cleanup X-Git-Tag: 2.408-rc1~73 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/bfcbe974900c892b516c052a9433b344e4ed70d6?ds=inline;hp=bd81e49c054c7a196c01e901a5e41f6896bad4d8 Another code cleanup --- diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp index 94104ac1..9fc12ecc 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp @@ -779,21 +779,10 @@ if (it == ip2user.end()) std::pair::iterator, bool> res; res = ip2user.insert(std::make_pair(sip, IA_USER(login, user, sport, protoVer))); it = res.first; - /*ip2user[sip].login = login; - ip2user[sip].user = user; - ip2user[sip].protoVer = protoVer; - ip2user[sip].port = sport;*/ #ifdef IA_PHASE_DEBUG it->second.phase.SetLogFileName(stgSettings->GetLogFileName()); it->second.phase.SetUserLogin(login); #endif - - /*it = ip2user.find(sip); //TODO - if (it == ip2user.end()) - { - printfd(__FILE__, "+++ ERROR +++\n"); - return -1; - }*/ } else if (user->GetID() != it->second.user->GetID()) { @@ -811,9 +800,6 @@ else if (user->GetID() != it->second.user->GetID()) IA_USER * iaUser = &(it->second); -/*if (iaUser->port != sport) - iaUser->port = sport;*/ - if (iaUser->password != user->GetProperty().password.Get()) { InitEncrypt(&iaUser->ctx, user->GetProperty().password.Get()); @@ -1170,7 +1156,7 @@ SwapBytes(connAck->len); SwapBytes(connAck->rnd); #endif printfd( __FILE__, "CONN_ACK_6 %s\n", connAck->type); -// ÕÓÔÁÎÏ×ÉÔØ ÎÏ×ÕÀ ÆÁÚÕ É ×ÒÅÍÑ É ÒÁÚÒÅÛÉÔØ ÉÎÅÔ + if ((iaUser->phase.GetPhase() == 2) && (connAck->rnd == iaUser->rnd + 1)) { iaUser->phase.UpdateTime();