Changeset 6326

Show
Ignore:
Timestamp:
06/17/08 15:41:52 (6 months ago)
Author:
eugene
Message:

Removed an empty version of ClearSocketDesc? and gave the default value for channel parameter of the full version to clear all descriptors.

Location:
trunk/licq
Files:
2 modified

Legend:

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

    r6301 r6326  
    903903  // Don't call these: 
    904904  int SocketDesc(unsigned char); 
    905   void ClearSocketDesc(); 
    906   void ClearSocketDesc(unsigned char); 
     905  void ClearSocketDesc(unsigned char nChannel = 0x00); 
    907906  void SetSocketDesc(TCPSocket *); 
    908907 
  • trunk/licq/src/user.cpp

    r6324 r6326  
    27642764} 
    27652765 
    2766  
    2767 void ICQUser::ClearSocketDesc() 
    2768 { 
    2769   m_nNormalSocketDesc = m_nInfoSocketDesc = m_nStatusSocketDesc = -1; 
    2770   m_nLocalPort = 0; 
    2771   m_nConnectionVersion = 0; 
    2772   m_bSecure = false; 
    2773  
    2774   if (gLicqDaemon != NULL && m_bOnContactList) 
    2775     gLicqDaemon->PushPluginSignal(new CICQSignal(SIGNAL_UPDATExUSER, 
    2776       USER_SECURITY, m_szId, m_nPPID, 0)); 
    2777 } 
    2778  
    27792766void ICQUser::ClearSocketDesc(unsigned char nChannel) 
    27802767{ 
     
    27902777    m_nStatusSocketDesc = -1; 
    27912778    break; 
     2779  case 0x00: // Used as default value to clear all socket descriptors 
     2780    m_nNormalSocketDesc = m_nInfoSocketDesc = m_nStatusSocketDesc = -1; 
     2781    break; 
    27922782  default: 
    27932783    gLog.Info("%sUnknown channel %u\n", L_WARNxSTR, nChannel); 
    27942784    return; 
    27952785  } 
    2796   if ((m_nStatusSocketDesc == -1) && (m_nInfoSocketDesc == -1) && (m_nNormalSocketDesc == -1)) 
    2797     ClearSocketDesc(); 
    2798   else if (gLicqDaemon != NULL && m_bOnContactList) 
     2786 
     2787  if (m_nStatusSocketDesc == m_nInfoSocketDesc == m_nNormalSocketDesc == -1) 
     2788  { 
     2789    m_nLocalPort = 0; 
     2790    m_nConnectionVersion = 0; 
     2791    m_bSecure = false; 
     2792  } 
     2793 
     2794  if (gLicqDaemon != NULL && m_bOnContactList) 
    27992795    gLicqDaemon->PushPluginSignal(new CICQSignal(SIGNAL_UPDATExUSER, USER_SECURITY, m_szId, m_nPPID, 0)); 
    28002796}