fix a bug in upnp

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1899 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-12-18 17:49:49 +00:00
parent 89ab9b1553
commit 225cee6627
2 changed files with 2 additions and 2 deletions

View file

@ -1128,7 +1128,7 @@ std::string CUPnPControlPoint::getExternalAddress()
"CUPnPControlPoint::AddPortMapping: " "CUPnPControlPoint::AddPortMapping: "
"WAN Service not detected." << std::endl; "WAN Service not detected." << std::endl;
#endif #endif
return false; return "";
} }
std::string result = m_WanService->GetStateVariable("NewExternalIPAddress"); std::string result = m_WanService->GetStateVariable("NewExternalIPAddress");
#ifdef UPNP_DEBUG #ifdef UPNP_DEBUG

View file

@ -398,7 +398,7 @@ bool upnphandler::getExternalAddress(struct sockaddr_in &addr)
{ {
std::string externalAdress = cUPnPControlPoint->getExternalAddress(); std::string externalAdress = cUPnPControlPoint->getExternalAddress();
if(!externalAdress.empty()) if(!externalAdress.empty() && externalAdress != "")
{ {
const char* externalIPAddress = externalAdress.c_str(); const char* externalIPAddress = externalAdress.c_str();