[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp |
Date: |
Wed, 02 Mar 2005 17:13:53 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/03/02 22:13:53
Modified files:
src : network_worker.cpp
Log message:
fixed bug where sockets wouldn't be correctly locked
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.19 wesnoth/src/network_worker.cpp:1.20
--- wesnoth/src/network_worker.cpp:1.19 Sun Feb 27 20:25:53 2005
+++ wesnoth/src/network_worker.cpp Wed Mar 2 22:13:53 2005
@@ -107,7 +107,8 @@
for(; itor != itor_end; ++itor) {
socket_state_map::iterator lock_it =
sockets_locked.find((*itor)->sock);
wassert(lock_it !=
sockets_locked.end());
- if(lock_it->second == SOCKET_READY) {
+ if(lock_it->second == SOCKET_READY) {
+ lock_it->second = SOCKET_LOCKED;
sent_buf = *itor;
sock = sent_buf->sock;
bufs.erase(itor);
@@ -120,7 +121,8 @@
for(; itor != itor_end; ++itor) {
socket_state_map::iterator
lock_it = sockets_locked.find(*itor);
wassert(lock_it !=
sockets_locked.end());
- if(lock_it->second ==
SOCKET_READY) {
+ if(lock_it->second ==
SOCKET_READY) {
+ lock_it->second =
SOCKET_LOCKED;
sock = *itor;
pending_receives.erase(itor);
break;
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp,
David White <=