From 293d3b4fb3094d1e05d1895633b756dae3167d64 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 23 Jul 2010 06:30:02 +0100 Subject: [PATCH] Fix Win32 compilation of raw_socket. --- simgear/io/raw_socket.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.39.5