From 050be3a7fb3a698b1733fea84ca274e2f4f601f8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 22 Jun 2010 04:27:22 +0000 Subject: [PATCH] - mutex change to make simple thread usage in custom menu more stable --- source/glest_game/menu/menu_state_custom_game.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 63a36927e..e5f42d994 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1096,7 +1096,7 @@ void MenuStateCustomGame::simpleTask() { needToRepublishToMasterserver = false; string newPublishToServerInfo = publishToServerInfo; publishToServerInfo = ""; - safeMutex.ReleaseLock(true); + //safeMutex.ReleaseLock(true); if(republish == true) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); @@ -1117,22 +1117,22 @@ void MenuStateCustomGame::simpleTask() { // uncomment to enable router setup check of this server //if(serverInfo!="OK") if(EndsWith(serverInfo, "OK") == false) { - safeMutex.Lock(); + //safeMutex.Lock(); showMasterserverError=true; masterServererErrorToShow=serverInfo; - safeMutex.ReleaseLock(true); + //safeMutex.ReleaseLock(true); } } SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); - safeMutex.Lock(); + //safeMutex.Lock(); bool broadCastSettings = needToBroadcastServerSettings; if(publishToMasterserverThread == NULL || publishToMasterserverThread->getQuitStatus() == true || publishToMasterserverThread->getRunningStatus() == false) { return; } needToBroadcastServerSettings=false; - safeMutex.ReleaseLock(true); + //safeMutex.ReleaseLock(true); if(broadCastSettings) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);