summaryrefslogtreecommitdiff
path: root/src/FtpConnection.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-31 16:15:23 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-03-31 16:15:23 +0000
commitfc2307d47c525fb87bbfb166cfd35a2a2c0e9f56 (patch)
treea417b71c14bf58f03a181bcd84073f807ef3a3b4 /src/FtpConnection.cc
parent3d3363a544290906b577c43583908ca00b2b0b0f (diff)
* src/Util.cc (isPowerOf): New function.
* src/Util.h (isPowerOf): New function. * src/PeerMessageUtil.cc (checkLength): Added a check for length whether or not it is power of 2.
Diffstat (limited to 'src/FtpConnection.cc')
-rw-r--r--src/FtpConnection.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FtpConnection.cc b/src/FtpConnection.cc
index dac5a387..e265beb1 100644
--- a/src/FtpConnection.cc
+++ b/src/FtpConnection.cc
@@ -108,7 +108,7 @@ void FtpConnection::sendRetr() const {
socket->writeData(request);
}
-int FtpConnection::getStatus(string response) const {
+int FtpConnection::getStatus(const string& response) const {
int status;
// When the response is not like "%d %*s",
// we return 0.
@@ -123,7 +123,7 @@ int FtpConnection::getStatus(string response) const {
}
}
-bool FtpConnection::isEndOfResponse(int status, string response) const {
+bool FtpConnection::isEndOfResponse(int status, const string& response) const {
if(response.size() <= 4) {
return false;
}