From 6cfe9cadbb58ae5e458ff3c4919b2b49000f5387 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 10 Jul 2012 02:43:54 +0000 Subject: [PATCH] - attempt to fix corrupt connection stats sent to masterserver using a mutex in the lobby and when headless server reset counts to 0 when calculating --- source/glest_game/menu/menu_state_custom_game.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 4c5e1759..0c3cafd4 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -2662,6 +2662,8 @@ void MenuStateCustomGame::publishToMasterserver() { loadGameSettings(&gameSettings); Config &config= Config::getInstance(); //string serverinfo=""; + + MutexSafeWrapper safeMutex((publishToMasterserverThread != NULL ? publishToMasterserverThread->getMutexThreadObjectAccessor() : NULL),string(__FILE__) + "_" + intToStr(__LINE__)); publishToServerInfo.clear(); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);