[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp thread.cpp
From: |
Jon Daniel |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp thread.cpp |
Date: |
Thu, 15 Sep 2005 19:33:44 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <address@hidden> 05/09/15 23:33:44
Modified files:
src : network_worker.cpp thread.cpp
Log message:
Workaround what seems to be a bug in SDL or BeOS acquire_sem which
caused lobby connection to terminate because the semaphore could not be
acquired and SDL_CondWaitTimeout returns -1
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/thread.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
Patches:
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.54 wesnoth/src/network_worker.cpp:1.55
--- wesnoth/src/network_worker.cpp:1.54 Tue Sep 13 19:21:10 2005
+++ wesnoth/src/network_worker.cpp Thu Sep 15 23:33:41 2005
@@ -1,4 +1,4 @@
-/* $Id: network_worker.cpp,v 1.54 2005/09/13 19:21:10 j_daniel Exp $ */
+/* $Id: network_worker.cpp,v 1.55 2005/09/15 23:33:41 j_daniel Exp $ */
/*
Copyright (C) 2003-5 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -164,7 +164,7 @@
}
#elif defined(__BEOS__)
// sleep for 100 milliseconds
- snooze(100000);
+ SDL_Delay(100);
timeout -= 100;
continue;
}
Index: wesnoth/src/thread.cpp
diff -u wesnoth/src/thread.cpp:1.14 wesnoth/src/thread.cpp:1.15
--- wesnoth/src/thread.cpp:1.14 Tue Sep 6 13:53:14 2005
+++ wesnoth/src/thread.cpp Thu Sep 15 23:33:42 2005
@@ -1,4 +1,4 @@
-/* $Id: thread.cpp,v 1.14 2005/09/06 13:53:14 ott Exp $ */
+/* $Id: thread.cpp,v 1.15 2005/09/15 23:33:42 j_daniel Exp $ */
/*
Copyright (C) 2003-5 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -124,7 +124,9 @@
switch(res) {
case 0: return WAIT_OK;
case SDL_MUTEX_TIMEDOUT: return WAIT_TIMEOUT;
- default: return WAIT_ERROR;
+ default:
+ ERR_G << "SDL_CondWaitTimeout: " << SDL_GetError() <<
"\n";
+ return WAIT_ERROR;
}
}
@@ -173,9 +175,11 @@
if(res == condition::WAIT_OK || finishedVar_) {
completed = true;
break;
+#ifndef __BEOS__
} else if(res == condition::WAIT_ERROR) {
break;
}
+#endif
}
if(!completed) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp thread.cpp,
Jon Daniel <=