summaryrefslogtreecommitdiff
path: root/src/FtpNegotiationCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-12-16 16:00:18 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-12-16 17:29:01 +0900
commitb9da9d4ed3ef9fe7b1488506555e3605aeb500ed (patch)
treef2b61ce65623ec222428360fe827b2a62ab9bbae /src/FtpNegotiationCommand.cc
parent04586f50b17317ef257f6d3f81190021c93ad5ea (diff)
Use 64 bits random bytes as GID
This change replaces the current 64 bit sequential GID with 64 bits random bytes GID in an attempt to support persistent GID. Internally, the GID is stored as uint64_t. For human representation and RPC interface, GID is represented as 16 bytes hex string. For console readout, 16 bytes are too long, so it is abbreviated to first 6 bytes. When querying GID in RPC calls, user can speicfy the prefix of GID as long as the prefix is shared by more than 1 GID entries.
Diffstat (limited to 'src/FtpNegotiationCommand.cc')
-rw-r--r--src/FtpNegotiationCommand.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc
index 362f94e7..6da4dc27 100644
--- a/src/FtpNegotiationCommand.cc
+++ b/src/FtpNegotiationCommand.cc
@@ -423,7 +423,7 @@ bool FtpNegotiationCommand::onFileSizeDetermined(int64_t totalLength)
sequence_ = SEQ_DOWNLOAD_ALREADY_COMPLETED;
A2_LOG_NOTICE
(fmt(MSG_DOWNLOAD_ALREADY_COMPLETED,
- getRequestGroup()->getGID(),
+ GroupId::toHex(getRequestGroup()->getGID()).c_str(),
getRequestGroup()->getFirstFilePath().c_str()));
}
poolConnection();