Show
Ignore:
Timestamp:
07/01/08 05:57:40 (5 months ago)
Author:
flynd
Message:

Added partial support for id instead of uin in file transfer class.

Files:
1 modified

Legend:

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

    r6347 r6371  
    2828#include "licq_icqd.h" 
    2929#include "licq_translate.h" 
     30#include "licq_user.h" 
    3031#include "support.h" 
    3132 
     
    200201 
    201202  m_nUin = nUin; 
     203  sprintf(myId, "%lu", m_nUin); 
    202204  m_nSession = rand(); 
    203205  licqDaemon = d; 
    204206 
    205   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     207  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    206208  strncpy(m_szLocalName, o->GetAlias(), sizeof(m_szLocalName) - 1); 
    207209  m_szLocalName[sizeof(m_szLocalName) - 1] = '\0'; 
    208   gUserManager.DropOwner(); 
     210  gUserManager.DropOwner(o); 
    209211 
    210212  m_nCurrentFile = m_nBatchFiles = 0; 
     
    338340bool CFileTransferManager::ConnectToFileServer(unsigned short nPort) 
    339341{ 
    340   ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R); 
     342  ICQUser *u = gUserManager.FetchUser(myId, LICQ_PPID, LOCK_R); 
    341343  if (u == NULL) 
    342344    return false; 
     
    352354    bSuccess = licqDaemon->OpenConnectionToUser(m_nUin, &ftSock, nPort); 
    353355   } 
    354   
     356 
    355357  bool bResult = false; 
    356358  if (!bSuccess) 
    357359  { 
    358     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     360    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    359361    unsigned long nIp = bSendIntIp ? o->IntIp() : o->Ip(); 
    360     gUserManager.DropOwner(); 
     362    gUserManager.DropOwner(o); 
    361363 
    362364    // try reverse connect 
     
    388390 
    389391  // Send handshake packet: 
    390   ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_R); 
     392  ICQUser *u = gUserManager.FetchUser(myId, LICQ_PPID, LOCK_R); 
    391393  unsigned short nVersion = u->ConnectionVersion(); 
    392394  gUserManager.DropUser(u);