summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-02-24 16:28:30 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-02-24 16:28:30 +0100
commit7115aa3b7f22f95e5e614ffc74c467844c08d965 (patch)
tree05e3b4efd07a602591d9828d5f24fab6eb4bf86f /src/main.cpp
parent9837f611d97bccdb4bf46f042120c3cb8d3fe907 (diff)
downloadbiboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.gz
biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.bz2
biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.xz
biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.zip
Add a reload add-hoc command
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 94c3cb5..148412e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,6 +3,7 @@
#include <network/poller.hpp>
#include <config/config.hpp>
#include <logger/logger.hpp>
+#include <utils/reload.hpp>
#include <iostream>
#include <memory>
@@ -123,13 +124,8 @@ int main(int ac, char** av)
}
if (reload)
{
- // Closing the config will just force it to be reopened the next time
- // a configuration option is needed
log_info("Signal received, reloading the config...");
- Config::close();
- // Destroy the logger instance, to be recreated the next time a log
- // line needs to be written
- Logger::instance().reset();
+ ::reload_process();
reload.store(false);
}
// Reconnect to the XMPP server if this was not intended. This may have