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/HttpServerCommand.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/HttpServerCommand.cc') diff --git a/src/HttpServerCommand.cc b/src/HttpServerCommand.cc index 87ea8fb0..06521cbb 100644 --- a/src/HttpServerCommand.cc +++ b/src/HttpServerCommand.cc @@ -111,7 +111,7 @@ bool HttpServerCommand::execute() "WWW-Authenticate: Basic realm=\"aria2\"", "","text/html"); Command* command = - new HttpServerResponseCommand(cuid, _httpServer, _e, _socket); + new HttpServerResponseCommand(getCuid(), _httpServer, _e, _socket); _e->addCommand(command); _e->setNoWait(true); return true; @@ -119,20 +119,20 @@ bool HttpServerCommand::execute() if(static_cast (_e->getOption()->getAsInt(PREF_XML_RPC_MAX_REQUEST_SIZE)) < _httpServer->getContentLength()) { - logger->info("Request too long. ContentLength=%s." - " See --xml-rpc-max-request-size option to loose" - " this limitation.", - util::uitos(_httpServer->getContentLength()).c_str()); + getLogger()->info("Request too long. ContentLength=%s." + " See --xml-rpc-max-request-size option to loose" + " this limitation.", + util::uitos(_httpServer->getContentLength()).c_str()); return true; } - Command* command = new HttpServerBodyCommand(cuid, _httpServer, _e, + Command* command = new HttpServerBodyCommand(getCuid(), _httpServer, _e, _socket); _e->addCommand(command); _e->setNoWait(true); return true; } else { if(_timeoutTimer.difference(global::wallclock) >= 30) { - logger->info("HTTP request timeout."); + getLogger()->info("HTTP request timeout."); return true; } else { _e->addCommand(this); @@ -140,9 +140,9 @@ bool HttpServerCommand::execute() } } } catch(RecoverableException& e) { - if(logger->info()) { - logger->info("CUID#%s - Error occurred while reading HTTP request", - e, util::itos(cuid).c_str()); + if(getLogger()->info()) { + getLogger()->info("CUID#%s - Error occurred while reading HTTP request", + e, util::itos(getCuid()).c_str()); } return true; } -- cgit