summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuboš Doležel <lubos@dolezel.info>2020-02-23 09:46:55 +0100
committerGitHub <noreply@github.com>2020-02-23 09:46:55 +0100
commit5ac618fd9168bc97818fa1db0c43bbddb964275f (patch)
tree430af398acd8d171c0cc132291728852e7d2eedc
parent7ac04131e795fd425a6afa3e5c4f0daf53d2fec8 (diff)
parentcdc748e253432ae505dda64ad6f4038554301483 (diff)
downloadtwinkle-5ac618fd9168bc97818fa1db0c43bbddb964275f.tar
twinkle-5ac618fd9168bc97818fa1db0c43bbddb964275f.tar.gz
twinkle-5ac618fd9168bc97818fa1db0c43bbddb964275f.tar.lz
twinkle-5ac618fd9168bc97818fa1db0c43bbddb964275f.tar.xz
twinkle-5ac618fd9168bc97818fa1db0c43bbddb964275f.zip
Merge pull request #147 from fbriere/fix/mutex-on-bool
Use a mutex in all t_sys_settings getters/setters, even bool
-rw-r--r--src/sys_settings.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys_settings.cpp b/src/sys_settings.cpp
index bb07539..b8af8fe 100644
--- a/src/sys_settings.cpp
+++ b/src/sys_settings.cpp
@@ -636,6 +636,7 @@ bool t_sys_settings::get_show_buddy_list(void) const {
}
bool t_sys_settings::get_gui_show_call_osd() const {
+ t_mutex_guard guard(mtx_sys);
return gui_show_call_osd;
}
@@ -973,8 +974,7 @@ void t_sys_settings::set_warn_hide_user(bool b) {
}
void t_sys_settings::set_gui_show_call_osd(bool b) {
- // Using mutexes in primitive type getters/setters doesn't make any sense.
- // TODO: remove t_mutex_guard from other getters/setters like this one.
+ t_mutex_guard guard(mtx_sys);
gui_show_call_osd = b;
}