Changeset 615

Show
Ignore:
Timestamp:
08/10/06 19:11:26 (2 years ago)
Author:
common
Message:

nepenthes

  • socketmanager clean on ::Exit() instead of destruktor
  • nepenthes, call socketmanager::Exit() in destruktor before deleting modulemanager, delete him after
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/nepenthes-core/src/Nepenthes.cpp

    r594 r615  
    116116{ 
    117117        logPF(); 
     118 
    118119        if ( m_SocketManager != NULL ) 
    119        delete m_SocketManager
     120               m_SocketManager->Exit()
    120121 
    121122        if (m_DownloadManager != NULL ) 
     
    148149        if (m_LogManager != NULL) 
    149150                delete m_LogManager; 
     151 
     152        if ( m_SocketManager != NULL ) 
     153                delete m_SocketManager; 
    150154 
    151155        g_Nepenthes = NULL; 
  • nepenthes/trunk/nepenthes-core/src/SocketManager.cpp

    r605 r615  
    9494SocketManager::~SocketManager() 
    9595{ 
    96         // FIXME CLOSE ALL SOCKETS 
    97         while(m_Sockets.size() > 0) 
    98         { 
    99                 if ( !(m_Sockets.front()->getType() & ST_NODEL) ) 
    100                 delete m_Sockets.front(); 
    101                 m_Sockets.pop_front(); 
    102         } 
     96        Exit(); 
    10397} 
    10498 
     
    157151bool  SocketManager::Exit() 
    158152{ 
     153        while(m_Sockets.size() > 0) 
     154        { 
     155                if ( !(m_Sockets.front()->getType() & ST_NODEL) ) 
     156                        delete m_Sockets.front(); 
     157                m_Sockets.pop_front(); 
     158        } 
     159 
    159160        return true; 
    160161}