Пример #1
0
// Destructor
SipUdpServer::~SipUdpServer()
{
    waitUntilShutDown();
    
    SipClient* pServer = NULL;
    UtlHashMapIterator iterator(mServers);
    UtlVoidPtr* pServerContainer = NULL;
    UtlString* pKey = NULL;
    
    while (pKey = (UtlString*)iterator())
    {
        pServerContainer = (UtlVoidPtr*)iterator.value();
        if (pServerContainer)
        {
            pServer = (SipClient*)pServerContainer->getValue();
            pServer->requestShutdown();
            delete pServer;
        }
    }
    mServers.destroyAll();

    mServerPortMap.destroyAll();    

    mServerSocketMap.destroyAll();
    
}
Пример #2
0
void SipUdpServer::shutdownListener()
{
    UtlHashMapIterator iterator(mServers);
    UtlString* pKey = NULL;
    
    while ((pKey = dynamic_cast <UtlString*> (iterator())))
    {
       SipClient* pServer = dynamic_cast <SipClient*> (iterator.value());
       pServer->requestShutdown();
    }
}
Пример #3
0
void SipProtocolServerBase::shutdownClients()
{
        // For each client request shutdown
    int iteratorHandle = mClientList.getIteratorHandle();
    SipClient* client = NULL;
    while ((client = (SipClient*)mClientList.next(iteratorHandle)))
    {
        client->requestShutdown();
    }
    mClientList.releaseIteratorHandle(iteratorHandle);
}
Пример #4
0
void SipUdpServer::shutdownListener()
{
    SipClient* pServer = NULL;
    UtlHashMapIterator iterator(mServers);
    UtlVoidPtr* pServerContainer = NULL;
    UtlString* pKey = NULL;
    
    while (pKey = (UtlString*)iterator())
    {
        pServerContainer = (UtlVoidPtr*) iterator.value();
        pServer = (SipClient*)pServerContainer->getValue();
        if (pServer)
        {
            pServer->requestShutdown();
        }
    }
}