diff options
Diffstat (limited to 'src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp')
-rw-r--r-- | src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp index 17a7e5d..e4b511e 100644 --- a/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp +++ b/src/Server/RequestHandlers/DaemonCommandRequestHandler.cpp @@ -46,8 +46,8 @@ void DaemonCommandRequestHandler::handlePacket(const Common::XmlPacket &packet) std::string command = packet["command"]; try { - Common::Connection *daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); - Common::RequestManager::get()->sendRequest<Requests::CommandRequest>(daemonCon, + boost::shared_ptr<Common::Connection> daemonCon = ConnectionManager::get()->getDaemonConnection(packet["daemon"]); + Common::RequestManager::get()->sendRequest<Requests::CommandRequest>(daemonCon.get(), boost::bind(&DaemonCommandRequestHandler::requestFinished, this, _1), command == "reboot"); } catch(Net::Exception &e) { |