diff options
Diffstat (limited to 'src/Client/InformationManager.cpp')
-rw-r--r-- | src/Client/InformationManager.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp index cafe2fa..4c9800b 100644 --- a/src/Client/InformationManager.cpp +++ b/src/Client/InformationManager.cpp @@ -29,7 +29,7 @@ namespace Client { InformationManager InformationManager::informationManager; -void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(Net::Connection *connection, uint16_t requestId, const Common::XmlPacket &packet) { +void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(const Common::XmlPacket &packet) { if(packet.getType() != "UpdateHostState") { Common::Logger::log(Common::Logger::ERROR, "Received an unexpected packet."); @@ -37,7 +37,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(Net::Conn ret.setType("Error"); ret.add("ErrorCode", Common::Exception::UNEXPECTED_PACKET); - connection->send(ret.encode(requestId)); + sendPacket(ret); signalFinished().emit(); return; @@ -53,7 +53,7 @@ void InformationManager::DaemonStateUpdateRequestHandler::handlePacket(Net::Conn Common::XmlPacket ret; ret.setType("OK"); - connection->send(ret.encode(requestId)); + sendPacket(ret); signalFinished().emit(); } @@ -71,11 +71,8 @@ void InformationManager::updateDaemonList(Net::Connection *con) { if(updating) return; - Common::RequestManager::get()->sendRequest(con, - std::auto_ptr<Common::Request>( - new Requests::DaemonListRequest(sigc::mem_fun(this, &InformationManager::daemonListRequestFinished)) - ) - ); + Common::RequestManager::get()->sendRequest<Requests::DaemonListRequest>(con, + sigc::mem_fun(this, &InformationManager::daemonListRequestFinished)); updating = true; } |