From 46ce83799ee2e00281c49c2374bb1d86f9196724 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 17 Jan 2013 11:32:00 +0100 Subject: [PATCH] Add check to prevent crash. --- coreapi/TunnelManager.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index 8ce6da7e5..5b1b6dddb 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -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); }