summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/RequestHandlers/CommandRequestHandler.cpp2
-rw-r--r--src/Daemon/Requests/LogRequest.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Daemon/RequestHandlers/CommandRequestHandler.cpp b/src/Daemon/RequestHandlers/CommandRequestHandler.cpp
index ae11de5..09eedc3 100644
--- a/src/Daemon/RequestHandlers/CommandRequestHandler.cpp
+++ b/src/Daemon/RequestHandlers/CommandRequestHandler.cpp
@@ -28,7 +28,7 @@ void CommandRequestHandler::handleRequest(boost::shared_ptr<const Common::XmlPac
// TODO Require authentication
// TODO Error handling
- std::string command = (*packet)["command"];
+ std::string command = packet->get<const std::string&>("command");
if(command == "reboot")
getApplication()->getSystemManager()->reboot();
diff --git a/src/Daemon/Requests/LogRequest.cpp b/src/Daemon/Requests/LogRequest.cpp
index 0741168..4d4cf93 100644
--- a/src/Daemon/Requests/LogRequest.cpp
+++ b/src/Daemon/Requests/LogRequest.cpp
@@ -28,10 +28,10 @@ void LogRequest::sendRequest() {
packet.setType("Log");
- packet.add("category", category);
- packet.add("level", level);
- packet.add("timestamp", messageTimestamp);
- packet.add("message", message);
+ packet.set("category", category);
+ packet.set("level", level);
+ packet.set("timestamp", messageTimestamp);
+ packet.set("message", message);
sendPacket(packet);
}