]> git.mxchange.org Git - simgear.git/commitdiff
Fix Win32 compilation of raw_socket.
authorJames Turner <zakalawe@mac.com>
Fri, 23 Jul 2010 05:30:02 +0000 (06:30 +0100)
committerJames Turner <zakalawe@mac.com>
Fri, 23 Jul 2010 05:30:02 +0000 (06:30 +0100)
simgear/io/raw_socket.cxx

index 7af6c695b372d8326e9376fe347be85732b52ca0..da04c93c8c94a16e2d26a7fd2c8916958fbe6a7a 100644 (file)
@@ -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