[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp (August 07, 2005 - 15:05)

 

CVSROOT:	/cvsroot/wesnoth
Module name:	wesnoth
Branch: 	
Changes by:	Jon Daniel <j_daniel@xxxxxxxxxxxxxxxx>	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 <davidnwhite@xxxxxxxxxxx>
    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;



You are on the gna.org mail server.

Generated by mhonarc, Tue Sep 20 16:52:50 2005