summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.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/HttpResponseCommand.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/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index e85a0329..c04e5818 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -189,7 +189,7 @@ bool HttpResponseCommand::executeInternal()
getDownloadContext()->setChecksumVerified(true);
A2_LOG_NOTICE
(fmt(MSG_DOWNLOAD_ALREADY_COMPLETED,
- getRequestGroup()->getGID(),
+ GroupId::toHex(getRequestGroup()->getGID()).c_str(),
getRequestGroup()->getFirstFilePath().c_str()));
poolConnection();
getFileEntry()->poolRequest(getRequest());
@@ -453,7 +453,7 @@ bool HttpResponseCommand::handleOtherEncoding
getDownloadContext()->setChecksumVerified(true);
A2_LOG_NOTICE
(fmt(MSG_DOWNLOAD_ALREADY_COMPLETED,
- getRequestGroup()->getGID(),
+ GroupId::toHex(getRequestGroup()->getGID()).c_str(),
getRequestGroup()->getFirstFilePath().c_str()));
}
poolConnection();