Changeset 6371
- Timestamp:
- 07/01/08 05:57:40 (3 months ago)
- Location:
- trunk/licq
- Files:
-
- 2 modified
-
include/licq_filetransfer.h (modified) (2 diffs)
-
src/icqd-filetransfer.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_filetransfer.h
r6347 r6371 213 213 direction Direction() { return m_nDirection; } 214 214 unsigned long Uin() { return m_nUin; } 215 const char* Id() const { return myId; } 215 216 216 217 // Available after FT_STARTxBATCH … … 269 270 unsigned long m_nUin; 270 271 unsigned short m_nSession, m_nSpeed, m_nState; 272 char myId[16]; 271 273 272 274 char m_szLocalName[64], m_szRemoteName[64]; -
trunk/licq/src/icqd-filetransfer.cpp
r6347 r6371 28 28 #include "licq_icqd.h" 29 29 #include "licq_translate.h" 30 #include "licq_user.h" 30 31 #include "support.h" 31 32 … … 200 201 201 202 m_nUin = nUin; 203 sprintf(myId, "%lu", m_nUin); 202 204 m_nSession = rand(); 203 205 licqDaemon = d; 204 206 205 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);207 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 206 208 strncpy(m_szLocalName, o->GetAlias(), sizeof(m_szLocalName) - 1); 207 209 m_szLocalName[sizeof(m_szLocalName) - 1] = '\0'; 208 gUserManager.DropOwner( );210 gUserManager.DropOwner(o); 209 211 210 212 m_nCurrentFile = m_nBatchFiles = 0; … … 338 340 bool CFileTransferManager::ConnectToFileServer(unsigned short nPort) 339 341 { 340 ICQUser *u = gUserManager.FetchUser(m _nUin, LOCK_R);342 ICQUser *u = gUserManager.FetchUser(myId, LICQ_PPID, LOCK_R); 341 343 if (u == NULL) 342 344 return false; … … 352 354 bSuccess = licqDaemon->OpenConnectionToUser(m_nUin, &ftSock, nPort); 353 355 } 354 356 355 357 bool bResult = false; 356 358 if (!bSuccess) 357 359 { 358 ICQOwner *o = gUserManager.FetchOwner(LOCK_R);360 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 359 361 unsigned long nIp = bSendIntIp ? o->IntIp() : o->Ip(); 360 gUserManager.DropOwner( );362 gUserManager.DropOwner(o); 361 363 362 364 // try reverse connect … … 388 390 389 391 // Send handshake packet: 390 ICQUser *u = gUserManager.FetchUser(m _nUin, LOCK_R);392 ICQUser *u = gUserManager.FetchUser(myId, LICQ_PPID, LOCK_R); 391 393 unsigned short nVersion = u->ConnectionVersion(); 392 394 gUserManager.DropUser(u);
