diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-08 15:02:20 +0000 |
| commit | 9afc36152a1ce428243a3ace608d0508716a2efb (patch) | |
| tree | 2e144d04570a058f3e2716d7b98f16803392cdbe /src/HttpServerCommand.cc | |
| parent | 7cd9b21937c42606354610c7ae85a0857b474cf5 (diff) | |
2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variables of Command private. Added accessor
funcs.
Diffstat (limited to 'src/HttpServerCommand.cc')
| -rw-r--r-- | src/HttpServerCommand.cc | 20 |
1 files changed, 10 insertions, 10 deletions
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<uint64_t> (_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; } |
