From e3ad4b7b60ce39ed990741316d104ac0a2e3ceb1 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 16 Jul 2010 17:11:38 +0000 Subject: [PATCH] - bugfix to ignore 0.* ip addresses --- source/shared_lib/sources/platform/posix/socket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 2dc3724b7..bb4e6ed05 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -654,7 +654,9 @@ std::vector Socket::getLocalIPAddressList() { sprintf(myhostaddr, "%s",inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] szBuf [%s], myhostaddr = [%s]\n",__FILE__,__FUNCTION__,__LINE__,szBuf,myhostaddr); - if(strlen(myhostaddr) > 0 && strncmp(myhostaddr,"127.",4) != 0) { + if( strlen(myhostaddr) > 0 && + strncmp(myhostaddr,"127.",4) != 0 && + strncmp(myhostaddr,"0.",2) != 0) { if(std::find(ipList.begin(),ipList.end(),myhostaddr) == ipList.end()) { ipList.push_back(myhostaddr); }