From 8477e923868029226626b890a7c6ef10fe12fa9c Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 9 Apr 2009 21:26:29 +0000 Subject: [PATCH] (svn r16004) -Fix (r16000): explicitly binding to an IPv4 socket would try to register an IPv6 address (only if it could ofcourse) --- src/network/core/address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 9a4bf18fb8..159c9cf11d 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -181,7 +181,7 @@ SOCKET NetworkAddress::Resolve(int family, int socktype, int flags, SocketList * /* Setting both hostname to NULL and port to 0 is not allowed. * As port 0 means bind to any port, the other must mean that * we want to bind to 'all' IPs. */ - if (this->address_length == 0 && this->GetPort() == 0) { + if (StrEmpty(this->hostname) && this->address_length == 0 && this->GetPort() == 0) { strecpy(this->hostname, this->address.ss_family == AF_INET ? "0.0.0.0" : "::", lastof(this->hostname)); }