diff options
-rw-r--r-- | project2/daemon/p2daemonAppEngine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/project2/daemon/p2daemonAppEngine.cpp b/project2/daemon/p2daemonAppEngine.cpp index b48b75b..f6fc178 100644 --- a/project2/daemon/p2daemonAppEngine.cpp +++ b/project2/daemon/p2daemonAppEngine.cpp @@ -53,9 +53,9 @@ END_OPTIONS(DaemonAppEngine); DaemonAppEngine::DaemonAppEngine(int argc, char ** argv) : main_loop(Glib::MainLoop::create()), - daemonFactory(boost::bind(&DaemonLoader::create, DaemonLoader::getFor(daemonType), argc, argv)) + daemonFactory(boost::bind(&DaemonLoader::create, + boost::bind(DaemonLoader::getFor, boost::cref(daemonType)), argc, argv)) { - Glib::signal_timeout().connect_seconds(sigc::mem_fun(this, &DaemonAppEngine::periodicCallback), periodicTimeout); } DaemonAppEngine::~DaemonAppEngine() @@ -96,8 +96,9 @@ DaemonAppEngine::process() IgnoreSignal(SIGUSR2); AddSignalHandler(SIGQUIT, boost::bind(&DaemonAppEngine::shutdown, this)); AddSignalHandler(SIGTERM, boost::bind(&DaemonAppEngine::shutdown, this)); - + Logger()->messagebf(LOG_DEBUG, "%s: Starting events.", __PRETTY_FUNCTION__); + Glib::signal_timeout().connect_seconds(sigc::mem_fun(this, &DaemonAppEngine::periodicCallback), periodicTimeout); evThread = new std::thread(&Glib::MainLoop::run, main_loop.operator->()); Logger()->messagebf(LOG_INFO, "%s: Starting daemon.", __PRETTY_FUNCTION__); daemon->run(); |