diff --git a/checkin_notes b/checkin_notes index a8d8db0356..7aaccb91a6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -544,3 +544,10 @@ David 21 Jan 2009 client/ work_fetch.cpp,h + +Rom 21 Jan 2009 + - MGR: Make sure the UI thread doesn't call a GUI RPC + that uses the SET_LOCALE class. + + clientgui/ + BOINCClientManager.cpp diff --git a/clientgui/BOINCClientManager.cpp b/clientgui/BOINCClientManager.cpp index 49a8ff666d..6fd38ffca7 100644 --- a/clientgui/BOINCClientManager.cpp +++ b/clientgui/BOINCClientManager.cpp @@ -112,7 +112,6 @@ bool CBOINCClientManager::IsBOINCCoreRunning() { int retval=0; bool running = false; - HOST_INFO hostinfo; RPC_CLIENT rpc; #ifdef __WXMSW__ @@ -124,9 +123,14 @@ bool CBOINCClientManager::IsBOINCCoreRunning() { for (int i=0; i<10; i++) { retval = rpc.init("localhost"); // synchronous is OK since local wxLogTrace(wxT("Function Status"), wxT("CBOINCClientManager::IsBOINCCoreRunning - Connecting to core client returned '%d'"), retval); - retval = rpc.get_host_info(hostinfo); + retval = rpc.authorize(wxT("")); // Do not use an RPC that uses the SET_LOCALE class, this + // function is typically called from the UI thread. If the + // UI thread and the async thread happen to use SET_LOCALE + // at the same time there is a 50% chance that the UI will + // be partially suck using the "C" locale which is needed to + // parse the data coming back from the CC. wxLogTrace(wxT("Function Status"), wxT("CBOINCClientManager::IsBOINCCoreRunning - Requesting host info... retval '%d'"), retval); - running = (retval == 0); + running = (retval != ERR_CONNECT); rpc.close(); if (running) break; if (!IsBOINCConfiguredAsDaemon()) break;