From 9afc36152a1ce428243a3ace608d0508716a2efb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 8 Jun 2010 15:02:20 +0000 Subject: 2010-06-09 Tatsuhiro Tsujikawa Made protected member variables of Command private. Added accessor funcs. --- src/HttpServerResponseCommand.cc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/HttpServerResponseCommand.cc') diff --git a/src/HttpServerResponseCommand.cc b/src/HttpServerResponseCommand.cc index dd464a97..4b98b193 100644 --- a/src/HttpServerResponseCommand.cc +++ b/src/HttpServerResponseCommand.cc @@ -76,29 +76,32 @@ bool HttpServerResponseCommand::execute() try { _httpServer->sendResponse(); } catch(RecoverableException& e) { - if(logger->info()) { - logger->info("CUID#%s - Error occurred while transmitting response body.", - e, util::itos(cuid).c_str()); + if(getLogger()->info()) { + getLogger()->info + ("CUID#%s - Error occurred while transmitting response body.", + e, util::itos(getCuid()).c_str()); } return true; } if(_httpServer->sendBufferIsEmpty()) { - if(logger->info()) { - logger->info("CUID#%s - HttpServer: all response transmitted.", - util::itos(cuid).c_str()); + if(getLogger()->info()) { + getLogger()->info("CUID#%s - HttpServer: all response transmitted.", + util::itos(getCuid()).c_str()); } if(_httpServer->supportsPersistentConnection()) { - if(logger->info()) { - logger->info("CUID#%s - Persist connection.", util::itos(cuid).c_str()); + if(getLogger()->info()) { + getLogger()->info("CUID#%s - Persist connection.", + util::itos(getCuid()).c_str()); } - _e->addCommand(new HttpServerCommand(cuid, _httpServer, _e, _socket)); + _e->addCommand + (new HttpServerCommand(getCuid(), _httpServer, _e, _socket)); } return true; } else { if(_timeoutTimer.difference(global::wallclock) >= 10) { - if(logger->info()) { - logger->info("CUID#%s - HttpServer: Timeout while trasmitting" - " response.", util::itos(cuid).c_str()); + if(getLogger()->info()) { + getLogger()->info("CUID#%s - HttpServer: Timeout while trasmitting" + " response.", util::itos(getCuid()).c_str()); } return true; } else { -- cgit