wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp
Date: Sun, 07 Aug 2005 08:49:08 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/08/07 12:49:08

Modified files:
        src            : network_worker.cpp 

Log message:
        use errno to get a more meaningful message in case SDLNet_CheckSockets 
returns -1

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.40&tr2=1.41&r1=text&r2=text

Patches:
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.40 wesnoth/src/network_worker.cpp:1.41
--- wesnoth/src/network_worker.cpp:1.40 Sat Aug  6 10:03:34 2005
+++ wesnoth/src/network_worker.cpp      Sun Aug  7 12:49:08 2005
@@ -1,4 +1,4 @@
-/* $Id: network_worker.cpp,v 1.40 2005/08/06 10:03:34 j_daniel Exp $ */
+/* $Id: network_worker.cpp,v 1.41 2005/08/07 12:49:08 j_daniel Exp $ */
 /*
    Copyright (C) 2003-5 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <cerrno>
+#include <cstring>
 #include <deque>
 #include <iostream>
 #include <map>
@@ -145,7 +146,7 @@
                }
                // wait for a maximum of 15 seconds for the socket to have 
activity
                if(SDLNet_CheckSockets(set, 15000) <= 0) {
-                       ERR_NW << "SDLNet_CheckSockets: " << SDLNet_GetError() 
<< "\n";
+                       ERR_NW << "SDLNet_CheckSockets: " << strerror(errno) << 
"\n";
                        SDLNet_TCP_DelSocket(set, sock);
                        SDLNet_FreeSocketSet(set);
                        return SOCKET_ERROR;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]