Commit f97421a7 authored by Juha Sointusalo's avatar Juha Sointusalo

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.
parent 450f89ec
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment