From: James Turner Date: Fri, 23 Jul 2010 05:30:02 +0000 (+0100) Subject: Fix Win32 compilation of raw_socket. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=293d3b4fb3094d1e05d1895633b756dae3167d64;p=simgear.git Fix Win32 compilation of raw_socket. --- diff --git a/simgear/io/raw_socket.cxx b/simgear/io/raw_socket.cxx index 7af6c695..da04c93c 100644 --- a/simgear/io/raw_socket.cxx +++ b/simgear/io/raw_socket.cxx @@ -331,7 +331,7 @@ bool Socket::isNonBlockingError () if ( wsa_errno != 0 ) { WSASetLastError(0); - ulSetError(UL_WARNING,"WSAGetLastError() => %d",wsa_errno); + SG_LOG(SG_IO, SG_WARN, "isNonBlockingError: WSAGetLastError():" << wsa_errno); switch (wsa_errno) { case WSAEWOULDBLOCK: // always == NET_EAGAIN? case WSAEALREADY: @@ -474,8 +474,7 @@ int Socket::initSockets() WSADATA wsaData; if ( WSAStartup(version_wanted, &wsaData) != 0 ) { - ulSetError(UL_WARNING,"Couldn't initialize Winsock 1.1"); - return(-1); + throw sg_exception("WinSock initialization failed"); } #endif