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.cpp


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src network.cpp
Date: Tue, 09 Aug 2005 04:00:26 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/08/09 08:00:26

Modified files:
        src            : network.cpp 

Log message:
        Another try

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

Patches:
Index: wesnoth/src/network.cpp
diff -u wesnoth/src/network.cpp:1.73 wesnoth/src/network.cpp:1.74
--- wesnoth/src/network.cpp:1.73        Mon Aug  8 22:47:49 2005
+++ wesnoth/src/network.cpp     Tue Aug  9 08:00:26 2005
@@ -1,4 +1,4 @@
-/* $Id: network.cpp,v 1.73 2005/08/08 22:47:49 j_daniel Exp $ */
+/* $Id: network.cpp,v 1.74 2005/08/09 08:00:26 j_daniel Exp $ */
 /*
    Copyright (C) 2003-5 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -279,6 +279,8 @@
        IPaddress ip;
        if(SDLNet_ResolveHost(&ip,hostname,port_) == -1) {
                error_ = "Could not connect to host";
+               const threading::lock l(get_mutex());
+               while(!notify_finished());
                return;
        }
 
@@ -286,6 +288,8 @@
        if(!sock) {
                error_ = hostname == NULL ? "Could not bind to port" :
                                            "Could not connect to host";
+               const threading::lock l(get_mutex());
+               while(!notify_finished());
                return;
        }
 
@@ -293,6 +297,7 @@
        if(hostname == NULL) {
                const threading::lock l(get_mutex());
                connect_ = create_connection(sock,"",port_);
+               while(!notify_finished());
                return;
        }
 
@@ -304,6 +309,8 @@
                SDLNet_TCP_Close(sock);
 
                error_ = "Could not send initial handshake";
+               const threading::lock l(get_mutex());
+               while(!notify_finished());
                return;
        }
 
@@ -313,6 +320,7 @@
        if(is_aborted()) {
                LOG_NW << "connect operation aborted by calling thread\n";
                SDLNet_TCP_Close(sock);
+               while(!notify_finished());
                return;
        }
 
@@ -323,6 +331,7 @@
        if(res == -1) {
                SDLNet_TCP_Close(sock);
                error_ = "Could not add socket to socket set";
+               while(!notify_finished());
                return;
        }
 




reply via email to

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