Show
Ignore:
Timestamp:
07/04/08 03:27:41 (5 months ago)
Author:
flynd
Message:

Removed uin functions from socket classes as they are no longer used.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/socket.cpp

    r6347 r6411  
    179179} 
    180180 
    181 //-----INetSocket::SetOwner--------------------------------------------------- 
    182 void INetSocket::SetOwner(unsigned long _nOwner) 
    183 { 
    184   m_nOwner = _nOwner; 
    185   if (_nOwner) 
    186   { 
    187     char szUin[24]; 
    188     sprintf(szUin, "%lu", _nOwner); 
    189     m_szOwnerId = strdup(szUin); 
    190     m_nOwnerPPID = LICQ_PPID; 
    191   } 
    192   else 
    193   { 
    194     m_szOwnerId = 0; 
    195     m_nOwnerPPID = 0; 
    196   } 
    197 } 
    198  
    199181void INetSocket::SetOwner(const char *_szOwnerId, unsigned long _nOwnerPPID) 
    200182{ 
    201183  m_szOwnerId = strdup(_szOwnerId); 
    202184  m_nOwnerPPID = _nOwnerPPID; 
    203   if (m_nOwnerPPID == LICQ_PPID) 
    204     m_nOwner = strtoul(_szOwnerId, (char **)NULL, 10); 
    205   else 
    206     m_nOwner = 0; 
    207185} 
    208186 
     
    266244 
    267245 
    268 //-----INetSocket::constructor-------------------------------------------------- 
    269 INetSocket::INetSocket(unsigned long _nOwner) 
    270 { 
    271   m_nDescriptor = -1; 
    272   SetOwner(_nOwner); 
    273  
    274   m_nVersion = 0; 
    275   m_nErrorType = SOCK_ERROR_none; 
    276   memset(&m_sRemoteAddr, 0, sizeof(struct sockaddr_in)); 
    277   memset(&m_sLocalAddr, 0, sizeof(struct sockaddr_in)); 
    278   m_szRemoteName = NULL; 
    279   m_xProxy = NULL; 
    280   m_nChannel = ICQ_CHNxNONE; 
    281    
    282   // Initialise the mutex 
    283   pthread_mutex_init(&mutex, NULL); 
    284 } 
    285  
    286246INetSocket::INetSocket(const char *_szOwnerId, unsigned long _nOwnerPPID) 
    287247{ 
     
    292252    m_szOwnerId = 0; 
    293253  m_nOwnerPPID = _nOwnerPPID; 
    294   if (m_nOwnerPPID == LICQ_PPID) 
    295     m_nOwner = strtoul(_szOwnerId, (char **)NULL, 10); 
    296   else 
    297     m_nOwner = 0; 
    298254  m_nVersion = 0; 
    299255  m_nErrorType = SOCK_ERROR_none; 
     
    638594//=====SrvSocket=============================================================== 
    639595 
    640 SrvSocket::SrvSocket(unsigned long _nOwner) : INetSocket(_nOwner) 
    641 { 
    642   strcpy(m_szID, "SRV"); 
    643   m_nSockType = SOCK_STREAM; 
    644 } 
    645  
    646596SrvSocket::SrvSocket(const char *s, unsigned long n) : INetSocket(s, n) 
    647597{ 
     
    826776  return true; 
    827777} 
    828      
     778 
    829779//=====TCPSocket=============================================================== 
    830 TCPSocket::TCPSocket(unsigned long _nOwner) : INetSocket(_nOwner) 
    831 { 
    832   strcpy(m_szID, "TCP"); 
    833   m_nSockType = SOCK_STREAM; 
    834   m_p_SSL = NULL; 
    835 } 
    836  
    837780TCPSocket::TCPSocket(const char *s, unsigned long n) : INetSocket(s, n) 
    838781{ 
     
    906849    m_szOwnerId = 0; 
    907850  m_nOwnerPPID = from.m_nOwnerPPID; 
    908  
    909   if (m_nOwnerPPID == LICQ_PPID) 
    910     m_nOwner = from.m_nOwner; 
    911851 
    912852  m_nVersion = from.m_nVersion; 
     
    13761316#endif /*-----End of OpenSSL code------------------------------------------*/ 
    13771317 
    1378 UDPSocket::UDPSocket(unsigned long _nOwner) : INetSocket(_nOwner) 
     1318UDPSocket::UDPSocket(const char* ownerId, unsigned long ownerPpid) 
     1319    : INetSocket(ownerId, ownerPpid) 
    13791320{ 
    13801321  strcpy(m_szID, "UDP");