summaryrefslogtreecommitdiff
path: root/src/FtpNegotiationCommand.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/FtpNegotiationCommand.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/FtpNegotiationCommand.cc')
-rw-r--r--src/FtpNegotiationCommand.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc
index 31f956f6..bbb909fc 100644
--- a/src/FtpNegotiationCommand.cc
+++ b/src/FtpNegotiationCommand.cc
@@ -243,7 +243,10 @@ bool FtpNegotiationCommand::recvPwd()
throw DL_ABORT_EX(StringFormat(EX_BAD_STATUS, status).str());
}
ftp->setBaseWorkingDir(pwd);
- logger->info("CUID#%d - base working directory is '%s'", cuid, pwd.c_str());
+ if(logger->info()) {
+ logger->info("CUID#%s - base working directory is '%s'",
+ util::itos(cuid).c_str(), pwd.c_str());
+ }
sequence = SEQ_SEND_CWD;
return true;
}
@@ -321,7 +324,9 @@ bool FtpNegotiationCommand::recvMdtm()
}
}
} else {
- logger->info("CUID#%d - MDTM command failed.", cuid);
+ if(logger->info()) {
+ logger->info("CUID#%s - MDTM command failed.", util::itos(cuid).c_str());
+ }
}
sequence = SEQ_SEND_SIZE;
return true;
@@ -449,9 +454,10 @@ bool FtpNegotiationCommand::recvSize() {
}
} else {
-
- logger->info("CUID#%d - The remote FTP Server doesn't recognize SIZE command. Continue.", cuid);
-
+ if(logger->info()) {
+ logger->info("CUID#%s - The remote FTP Server doesn't recognize SIZE"
+ " command. Continue.", util::itos(cuid).c_str());
+ }
// Even if one of the other servers waiting in the queue supports SIZE
// command, resuming and segmented downloading are disabled when the first
// contacted FTP server doesn't support it.
@@ -527,9 +533,11 @@ bool FtpNegotiationCommand::recvPasv() {
throw DL_ABORT_EX(StringFormat(EX_BAD_STATUS, status).str());
}
// make a data connection to the server.
- logger->info(MSG_CONNECTING_TO_SERVER, cuid,
- dest.first.c_str(),
- dest.second);
+ if(logger->info()) {
+ logger->info(MSG_CONNECTING_TO_SERVER, util::itos(cuid).c_str(),
+ dest.first.c_str(),
+ dest.second);
+ }
dataSocket.reset(new SocketCore());
dataSocket->establishConnection(dest.first, dest.second);