Changeset 6411

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

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

Location:
trunk/licq
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_socket.h

    r6395 r6411  
    3636{ 
    3737public: 
    38   INetSocket(unsigned long _nOwner); 
    3938  INetSocket(const char *_szOwnerId, unsigned long _nOwnerPPID); 
    4039  virtual ~INetSocket(); 
     
    4645  unsigned long OwnerPPID() { return m_nOwnerPPID; } 
    4746  void SetOwner(const char *s, unsigned long n); 
    48   unsigned long Owner()     { return (m_nOwner); } 
    49   void SetOwner(unsigned long _nOwner); 
    5047  unsigned long Version()     { return (m_nVersion); } 
    5148  void SetVersion(unsigned long _nVersion)  { m_nVersion = _nVersion; } 
     
    10097  char m_szID[4]; 
    10198  int m_nSockType; 
    102   unsigned long m_nOwner; 
    10399  unsigned short m_nVersion; 
    104100  SocketError_et m_nErrorType; 
     
    114110{ 
    115111public: 
    116   TCPSocket(unsigned long _nOwner); 
    117112  TCPSocket(const char *s, unsigned long n); 
    118113  TCPSocket(); 
     
    151146{ 
    152147public: 
    153   SrvSocket(unsigned long _nOwner); 
    154148  SrvSocket(const char *s, unsigned long n); 
    155149  virtual ~SrvSocket(); 
     
    172166{ 
    173167public: 
    174   UDPSocket(unsigned long _nOwner); 
     168  UDPSocket(const char* ownerId, unsigned long ownerPpid); 
    175169  virtual ~UDPSocket(); 
    176170 
  • trunk/licq/src/icqd-threads.cpp

    r6405 r6411  
    813813            DEBUG_THREADS("[MonitorSockets_tep] Data on listening TCP socket." 
    814814                          "\n"); 
    815             TCPSocket *tcp = static_cast<TCPSocket *>(s); 
     815            TCPSocket* tcp = static_cast<TCPSocket *>(s); 
    816816            if (tcp == NULL) 
    817817            { 
     
    821821            else 
    822822            { 
    823               TCPSocket *newSocket = new TCPSocket(0); 
     823              TCPSocket *newSocket = new TCPSocket(); 
    824824              bool ok = tcp->RecvConnection(*newSocket); 
    825825              gSocketManager.DropSocket(tcp); 
  • trunk/licq/src/icqd.cpp

    r6405 r6411  
    385385  int nResult = 0; 
    386386 
    387   TCPSocket *s = new TCPSocket(0); 
     387  TCPSocket* s = new TCPSocket(); 
    388388  m_nTCPSocketDesc = StartTCPServer(s); 
    389389  if (m_nTCPSocketDesc == -1) 
  • 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");