summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-24 21:02:21 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-24 21:02:21 +0100
commit5f82c93754037ecbbe8f3632dc3a5f88071415fc (patch)
tree927163feacefd56002ca2801c79be437c56ad646 /src/main.cpp
parent541af5236e69bcc86c6f993d09358173596483a7 (diff)
downloadbiboumi-5f82c93754037ecbbe8f3632dc3a5f88071415fc.tar.gz
biboumi-5f82c93754037ecbbe8f3632dc3a5f88071415fc.tar.bz2
biboumi-5f82c93754037ecbbe8f3632dc3a5f88071415fc.tar.xz
biboumi-5f82c93754037ecbbe8f3632dc3a5f88071415fc.zip
Use store() instead of operator=() for std::atomic<bool> objects
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9a9543d..6b24662 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,12 +34,12 @@ int config_help(const std::string& missing_option)
static void sigint_handler(int, siginfo_t*, void*)
{
- stop = true;
+ stop.store(true);
}
static void sigusr_handler(int, siginfo_t*, void*)
{
- reload = true;
+ reload.store(true);
}
int main(int ac, char** av)
@@ -100,7 +100,7 @@ int main(int ac, char** av)
{
log_info("Signal received, exiting...");
exiting = true;
- stop = false;
+ stop.store(false);
xmpp_component->shutdown();
}
if (reload)
@@ -112,7 +112,7 @@ int main(int ac, char** av)
// Destroy the logger instance, to be recreated the next time a log
// line needs to be written
Logger::instance().reset();
- reload = false;
+ reload.store(false);
}
// If the only existing connection is the one to the XMPP component:
// close the XMPP stream.