summaryrefslogtreecommitdiff
path: root/src/HttpServerResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-03-21 07:05:49 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-03-21 07:05:49 +0000
commitde8fef01f3119719441b36c758fd5bd924bcf607 (patch)
tree61be92e32b982948d39421a4a58acfbb21e5e50c /src/HttpServerResponseCommand.cc
parent322a0d1ad7e0ab0eaae6335baf91f5423b92c7f4 (diff)
2010-03-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined cuid_t as int64_t. Removed texts containing "CUID#%D" from translatable texts because it is used in log and debugging purpose.
Diffstat (limited to 'src/HttpServerResponseCommand.cc')
-rw-r--r--src/HttpServerResponseCommand.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/HttpServerResponseCommand.cc b/src/HttpServerResponseCommand.cc
index a88580b4..06d724c7 100644
--- a/src/HttpServerResponseCommand.cc
+++ b/src/HttpServerResponseCommand.cc
@@ -42,6 +42,7 @@
#include "RecoverableException.h"
#include "FileEntry.h"
#include "wallclock.h"
+#include "util.h"
namespace aria2 {
@@ -72,22 +73,31 @@ bool HttpServerResponseCommand::execute()
try {
_httpServer->sendResponse();
} catch(RecoverableException& e) {
- logger->info("CUID#%d - Error occurred while transmitting response body.",
- e, cuid);
+ if(logger->info()) {
+ logger->info("CUID#%s - Error occurred while transmitting response body.",
+ e, util::itos(cuid).c_str());
+ }
return true;
}
if(_httpServer->sendBufferIsEmpty()) {
- logger->info("CUID#%d - HttpServer: all response transmitted.", cuid);
+ if(logger->info()) {
+ logger->info("CUID#%s - HttpServer: all response transmitted.",
+ util::itos(cuid).c_str());
+ }
if(_httpServer->supportsPersistentConnection()) {
- logger->info("CUID#%d - Persist connection.", cuid);
+ if(logger->info()) {
+ logger->info("CUID#%s - Persist connection.", util::itos(cuid).c_str());
+ }
_e->commands.push_back
(new HttpServerCommand(cuid, _httpServer, _e, _socket));
}
return true;
} else {
if(_timeout.difference(global::wallclock) >= 10) {
- logger->info("CUID#%d - HttpServer: Timeout while trasmitting response.",
- cuid);
+ if(logger->info()) {
+ logger->info("CUID#%s - HttpServer: Timeout while trasmitting"
+ " response.", util::itos(cuid).c_str());
+ }
return true;
} else {
_e->commands.push_back(this);