Show
Ignore:
Timestamp:
07/03/08 05:54:19 (5 months ago)
Author:
flynd
Message:

More uin calls removed or rewritten.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/icqd-filetransfer.cpp

    r6371 r6402  
    1717#include <sys/types.h> 
    1818#include <fcntl.h> 
     19#include <string> 
    1920#include <string.h> 
    2021#include <sys/time.h> 
     
    4344const unsigned short FT_STATE_CONFIRMINGxFILE = 8; 
    4445 
     46using std::string; 
    4547 
    4648 
     
    352354  { 
    353355    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); 
    355357   } 
    356358 
     
    363365 
    364366    // try reverse connect 
    365     int nId = licqDaemon->RequestReverseConnection(m_nUin, 0, nIp, LocalPort(), 
     367    int nId = licqDaemon->RequestReverseConnection(myId, 0, nIp, LocalPort(), 
    366368                                                                        nPort); 
    367369 
     
    393395  unsigned short nVersion = u->ConnectionVersion(); 
    394396  gUserManager.DropUser(u); 
    395   if (!CICQDaemon::Handshake_Send(&ftSock, m_nUin, LocalPort(), nVersion, false)) 
     397  if (!CICQDaemon::Handshake_Send(&ftSock, myId, LocalPort(), nVersion, false)) 
    396398    return false; 
    397399 
     
    481483                          iter != licqDaemon->m_lReverseConnect.end();  ++iter) 
    482484        { 
    483           if ((*iter)->nId == nId && (*iter)->nUin == m_nUin) 
     485          if ((*iter)->nId == nId && (*iter)->myIdString == myId) 
    484486          { 
    485487            bFound = true; 
     
    12551257 
    12561258  CICQDaemon *d; 
    1257   unsigned long nUin; 
    12581259  unsigned short nPort; 
    12591260  struct SFileReverseConnectInfo *rc = (struct SFileReverseConnectInfo *)arg; 
     
    12651266  pthread_cleanup_pop(0); 
    12661267  d = rc->m->licqDaemon; 
    1267   nUin = rc->m->Uin(); 
     1268  string id = rc->m->Id(); 
    12681269  nPort = rc->m->m_nPort; 
    12691270  pthread_mutex_unlock(cancel_mutex); 
     
    12711272  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); 
    12721273  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()); 
    12741275  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); 
    12751276 
     
    12971298                                                                    L_TCPxSTR); 
    12981299  TCPSocket s; 
    1299   bConnected = d->OpenConnectionToUser(nUin, &s, nPort); 
     1300  bConnected = d->OpenConnectionToUser(id.c_str(), &s, nPort); 
    13001301  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); 
    13011302