Changeset 6402 for trunk/licq/src/icqd-srv.cpp
- Timestamp:
- 07/03/08 05:54:19 (5 months ago)
- Files:
-
- 1 modified
-
trunk/licq/src/icqd-srv.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/src/icqd-srv.cpp
r6394 r6402 2083 2083 int CICQDaemon::ConnectToServer(const char* server, unsigned short port) 2084 2084 { 2085 SrvSocket *s = new SrvSocket(gUserManager.icqOwnerUin());2085 SrvSocket* s = new SrvSocket(gUserManager.OwnerId(LICQ_PPID).c_str(), LICQ_PPID); 2086 2086 2087 2087 if (m_bProxyEnabled) … … 2179 2179 ParseDigits(szParsedNumber2, szCellular, 15); 2180 2180 if (!strcmp(szParsedNumber1, szParsedNumber2)) 2181 nUin = pUser->Uin();2181 nUin = strtoul(pUser->IdString(), NULL, 10); 2182 2182 } 2183 2183 FOR_EACH_USER_END … … 3115 3115 if ((*iter)->nId == nSubSequence) 3116 3116 { 3117 ICQUser *u = gUserManager.FetchUser((*iter)->nUin, LOCK_R);3117 ICQUser* u = gUserManager.FetchUser((*iter)->myIdString.c_str(), LICQ_PPID, LOCK_R); 3118 3118 if (u == NULL) 3119 gLog.Warn("%sReverse connection from % lufailed.\n", L_WARNxSTR,3120 (*iter)->nUin);3119 gLog.Warn("%sReverse connection from %s failed.\n", L_WARNxSTR, 3120 (*iter)->myIdString.c_str()); 3121 3121 else 3122 3122 { … … 3298 3298 nPort = nPort2; 3299 3299 3300 char id[16]; 3301 snprintf(id, 15, "%lu", nUin); 3302 3300 3303 pthread_t t; 3301 3304 CReverseConnectToUserData *data = new CReverseConnectToUserData( 3302 nUin, nId, ICQ_CHNxUNKNOWN, nIp, nPort,3305 id, nId, ICQ_CHNxUNKNOWN, nIp, nPort, 3303 3306 nVersion, nFailedPort, nMsgID[0], nMsgID[1]); 3304 3307 pthread_create(&t, NULL, &ReverseConnectToUser_tep, data); … … 3908 3911 nFormat = packet.UnpackUnsignedShortBE(); 3909 3912 nUin = packet.UnpackUinString(); 3910 3911 u = gUserManager.FetchUser(nUin, LOCK_W); 3913 char id[16]; 3914 snprintf(id, 15, "%lu", nUin); 3915 3916 u = gUserManager.FetchUser(id, LICQ_PPID, LOCK_W); 3912 3917 if (u == NULL) 3913 3918 { … … 3923 3928 ++iter) 3924 3929 { 3925 if ((*iter)->nId == nMsgID && (*iter)->nUin == nUin)3926 {3930 if ((*iter)->nId == nMsgID && (*iter)->myIdString == id) 3931 { 3927 3932 gLog.Warn("%sReverse connection from %s failed.\n", L_WARNxSTR, 3928 3933 u->GetAlias()); … … 6579 6584 } 6580 6585 6581 int CICQDaemon::RequestReverseConnection( unsigned long nUin,6586 int CICQDaemon::RequestReverseConnection(const char* id, 6582 6587 unsigned long nData, 6583 6588 unsigned long nLocalIP, … … 6585 6590 unsigned short nRemotePort) 6586 6591 { 6587 if ( nUin == gUserManager.icqOwnerUin())6592 if (gUserManager.FindOwner(id, LICQ_PPID) != NULL) 6588 6593 return -1; 6589 6594 6590 ICQUser *u = gUserManager.FetchUser(nUin, LOCK_W);6595 ICQUser* u = gUserManager.FetchUser(id, LICQ_PPID, LOCK_W); 6591 6596 if (u == NULL) return -1; 6592 6597 … … 6598 6603 pthread_mutex_lock(&mutex_reverseconnect); 6599 6604 6600 m_lReverseConnect.push_back( 6601 new CReverseConnectToUserData(nUin, nId, nData, nLocalIP, 6602 nLocalPort, ICQ_VERSION_TCP, 6603 nRemotePort, 0, nId)); 6605 m_lReverseConnect.push_back(new CReverseConnectToUserData(id, nId, nData, 6606 nLocalIP, nLocalPort, ICQ_VERSION_TCP, nRemotePort, 0, nId)); 6604 6607 pthread_mutex_unlock(&mutex_reverseconnect); 6605 6608
