mirror of https://github.com/BOINC/boinc.git
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:
parent
450f89ec39
commit
f97421a735
|
@ -26,7 +26,6 @@
|
||||||
#include "BOINCBaseFrame.h"
|
#include "BOINCBaseFrame.h"
|
||||||
#include "Events.h"
|
#include "Events.h"
|
||||||
#include "error_numbers.h"
|
#include "error_numbers.h"
|
||||||
#include "gui_rpc_client.h" // For SET_LOCALE
|
|
||||||
#include "SkinManager.h"
|
#include "SkinManager.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +155,6 @@ CDlgDiagnosticLogFlags::~CDlgDiagnosticLogFlags() {
|
||||||
|
|
||||||
|
|
||||||
void CDlgDiagnosticLogFlags::CreateCheckboxes() {
|
void CDlgDiagnosticLogFlags::CreateCheckboxes() {
|
||||||
SET_LOCALE sl;
|
|
||||||
char buf[64000];
|
char buf[64000];
|
||||||
MIOFILE mf;
|
MIOFILE mf;
|
||||||
bool val;
|
bool val;
|
||||||
|
@ -196,7 +194,6 @@ void CDlgDiagnosticLogFlags::CreateCheckboxes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDlgDiagnosticLogFlags::SaveFlags() {
|
void CDlgDiagnosticLogFlags::SaveFlags() {
|
||||||
SET_LOCALE sl;
|
|
||||||
char buf[64000];
|
char buf[64000];
|
||||||
MIOFILE mf;
|
MIOFILE mf;
|
||||||
bool val;
|
bool val;
|
||||||
|
|
Loading…
Reference in New Issue