Changeset 6402 for trunk/licq/src/icqd-filetransfer.cpp
- Timestamp:
- 07/03/08 05:54:19 (5 months ago)
- Files:
-
- 1 modified
-
trunk/licq/src/icqd-filetransfer.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/src/icqd-filetransfer.cpp
r6371 r6402 17 17 #include <sys/types.h> 18 18 #include <fcntl.h> 19 #include <string> 19 20 #include <string.h> 20 21 #include <sys/time.h> … … 43 44 const unsigned short FT_STATE_CONFIRMINGxFILE = 8; 44 45 46 using std::string; 45 47 46 48 … … 352 354 { 353 355 gLog.Info("%sFile Transfer: Connecting to server.\n", L_TCPxSTR); 354 bSuccess = licqDaemon->OpenConnectionToUser(m _nUin, &ftSock, nPort);356 bSuccess = licqDaemon->OpenConnectionToUser(myId, &ftSock, nPort); 355 357 } 356 358 … … 363 365 364 366 // try reverse connect 365 int nId = licqDaemon->RequestReverseConnection(m _nUin, 0, nIp, LocalPort(),367 int nId = licqDaemon->RequestReverseConnection(myId, 0, nIp, LocalPort(), 366 368 nPort); 367 369 … … 393 395 unsigned short nVersion = u->ConnectionVersion(); 394 396 gUserManager.DropUser(u); 395 if (!CICQDaemon::Handshake_Send(&ftSock, m _nUin, LocalPort(), nVersion, false))397 if (!CICQDaemon::Handshake_Send(&ftSock, myId, LocalPort(), nVersion, false)) 396 398 return false; 397 399 … … 481 483 iter != licqDaemon->m_lReverseConnect.end(); ++iter) 482 484 { 483 if ((*iter)->nId == nId && (*iter)-> nUin == m_nUin)485 if ((*iter)->nId == nId && (*iter)->myIdString == myId) 484 486 { 485 487 bFound = true; … … 1255 1257 1256 1258 CICQDaemon *d; 1257 unsigned long nUin;1258 1259 unsigned short nPort; 1259 1260 struct SFileReverseConnectInfo *rc = (struct SFileReverseConnectInfo *)arg; … … 1265 1266 pthread_cleanup_pop(0); 1266 1267 d = rc->m->licqDaemon; 1267 nUin = rc->m->Uin();1268 string id = rc->m->Id(); 1268 1269 nPort = rc->m->m_nPort; 1269 1270 pthread_mutex_unlock(cancel_mutex); … … 1271 1272 pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); 1272 1273 gLog.Info("%sFile Transfer: Waiting for reverse connection.\n", L_TCPxSTR); 1273 bool bConnected = d->WaitForReverseConnection(rc->nId, nUin);1274 bool bConnected = d->WaitForReverseConnection(rc->nId, id.c_str()); 1274 1275 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); 1275 1276 … … 1297 1298 L_TCPxSTR); 1298 1299 TCPSocket s; 1299 bConnected = d->OpenConnectionToUser( nUin, &s, nPort);1300 bConnected = d->OpenConnectionToUser(id.c_str(), &s, nPort); 1300 1301 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); 1301 1302
