// 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(); }
void SipUdpServer::shutdownListener() { UtlHashMapIterator iterator(mServers); UtlString* pKey = NULL; while ((pKey = dynamic_cast <UtlString*> (iterator()))) { SipClient* pServer = dynamic_cast <SipClient*> (iterator.value()); pServer->requestShutdown(); } }
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); }
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(); } } }