From: Torsten Dreyer Date: Wed, 22 Jun 2011 20:40:23 +0000 (+0200) Subject: Fix bug #346: httpd broken X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6f9a14d6c435c408b8f7ee75b3859f3c00a2ee00;p=simgear.git Fix bug #346: httpd broken Fix bug introduced by myself in commit b06e38699a4467cf99bdcfee6e906082e104b86a --- diff --git a/simgear/io/raw_socket.cxx b/simgear/io/raw_socket.cxx index 971ff31f..63c9b55e 100644 --- a/simgear/io/raw_socket.cxx +++ b/simgear/io/raw_socket.cxx @@ -293,6 +293,12 @@ int Socket::bind ( const char* host, int port ) return result; } } +#if defined(WINSOCK) + else if( (result = ::bind(handle,(const sockaddr*)&addr,sizeof(IPAddress))) < 0 ) { + SG_LOG(SG_IO, SG_ALERT, "bind(" << host << ":" << port << ") failed. Errno " << errno << " (" << strerror(errno) << ")"); + return result; + } +#endif return 0; }