mgr: remove SET_LOCALE from DlgDiagnosticLogFlags.cpp

SET_LOCALE is no-op when using per-thread locales making SET_LOCALE
unnecessary.

When per-thread locales are not available using SET_LOCALE in
CDlgDiagnosticLogFlags can cause Manager to get stuck to C locale. The
lifetime of two SET_LOCALE objects can be interleaved if log flags are
loaded or saved and an async RPC is launched at the same time. If the
lifetimes are interleaved the first object sets global locale to C. The
second object saves the global locale that was set to C by the first
object. First object restores the global locale correctly. After that
the second object incorrectly restores the global locale to C.
This commit is contained in:
Juha Sointusalo 2018-03-28 13:38:53 +03:00
parent 450f89ec39
commit f97421a735
1 changed files with 0 additions and 3 deletions

View File

@ -26,7 +26,6 @@
#include "BOINCBaseFrame.h"
#include "Events.h"
#include "error_numbers.h"
#include "gui_rpc_client.h" // For SET_LOCALE
#include "SkinManager.h"
@ -156,7 +155,6 @@ CDlgDiagnosticLogFlags::~CDlgDiagnosticLogFlags() {
void CDlgDiagnosticLogFlags::CreateCheckboxes() {
SET_LOCALE sl;
char buf[64000];
MIOFILE mf;
bool val;
@ -196,7 +194,6 @@ void CDlgDiagnosticLogFlags::CreateCheckboxes() {
}
void CDlgDiagnosticLogFlags::SaveFlags() {
SET_LOCALE sl;
char buf[64000];
MIOFILE mf;
bool val;