]> sjero.net Git - linphone/commitdiff
Add check to prevent crash.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Thu, 17 Jan 2013 10:32:00 +0000 (11:32 +0100)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Thu, 17 Jan 2013 10:32:00 +0000 (11:32 +0100)
coreapi/TunnelManager.cc

index 8ce6da7e59234c33d161baa071497d7d0453fb12..5b1b6dddb23e60c6ac4afe23e0ee52906cd02f9e 100644 (file)
@@ -107,6 +107,10 @@ void TunnelManager::addServer(const char *ip, int port,unsigned int udpMirrorPor
 }
 
 void TunnelManager::addServer(const char *ip, int port) {
+       if (ip == NULL) {
+               ip = "";
+               ms_warning("Adding tunnel server with empty ip, it will not work!");
+       }
        mServerAddrs.push_back(ServerAddr(ip,port));
        if (mTunnelClient) mTunnelClient->addServer(ip,port);
 }