From 3364de01f3f5d50b93d35c438217cf977ab1304e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 4 Jun 2009 22:49:08 +0200 Subject: Fehlerbehandlung hinzugef?gt --- src/Common/RequestManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Common/RequestManager.cpp b/src/Common/RequestManager.cpp index 3817ff5..368cfb5 100644 --- a/src/Common/RequestManager.cpp +++ b/src/Common/RequestManager.cpp @@ -136,7 +136,6 @@ void RequestManager::receiveHandler(Connection *connection, boost::shared_ptrsendPacket(ret, requestId); } -// XXX Error handling! bool RequestManager::sendRequest(Connection *connection, boost::shared_ptr request) { boost::unique_lock lock(mutex); @@ -146,7 +145,11 @@ bool RequestManager::sendRequest(Connection *connection, boost::shared_ptrisFinished || !requestMap.addRequest(connection, requestId, request)) { + Logger::log(Logger::CRITICAL, "Trying resend a request."); + return false; + } request->connectSignalFinished(boost::bind(&RequestManager::handleRequestFinished, this, connection, requestId)); lock.unlock(); -- cgit v1.2.3