mirror of https://github.com/aria2/aria2
Renamed DownloadResult::infoHashStr to infoHash and changed its
contents from hex digest to raw byte string.pull/2/head
parent
310e58bc62
commit
6404f119e1
|
@ -87,7 +87,7 @@ struct DownloadResult
|
|||
|
||||
std::string bitfieldStr;
|
||||
|
||||
std::string infoHashStr;
|
||||
std::string infoHash;
|
||||
|
||||
size_t pieceLength;
|
||||
|
||||
|
|
|
@ -1188,7 +1188,8 @@ DownloadResultHandle RequestGroup::createDownloadResult() const
|
|||
}
|
||||
#ifdef ENABLE_BITTORRENT
|
||||
if(downloadContext_->hasAttribute(bittorrent::BITTORRENT)) {
|
||||
res->infoHashStr = bittorrent::getInfoHashString(downloadContext_);
|
||||
const unsigned char* p = bittorrent::getInfoHash(downloadContext_);
|
||||
res->infoHash = std::string(p, p+INFO_HASH_LENGTH);
|
||||
}
|
||||
#endif // ENABLE_BITTORRENT
|
||||
res->pieceLength = downloadContext_->getPieceLength();
|
||||
|
|
|
@ -891,9 +891,9 @@ void gatherStoppedDownload
|
|||
if(requested_key(keys, KEY_UPLOAD_SPEED)) {
|
||||
entryDict->put(KEY_UPLOAD_SPEED, VLB_ZERO);
|
||||
}
|
||||
if(!ds->infoHashStr.empty()) {
|
||||
if(!ds->infoHash.empty()) {
|
||||
if(requested_key(keys, KEY_INFO_HASH)) {
|
||||
entryDict->put(KEY_INFO_HASH, ds->infoHashStr);
|
||||
entryDict->put(KEY_INFO_HASH, util::toHex(ds->infoHash));
|
||||
}
|
||||
if(requested_key(keys, KEY_NUM_SEEDERS)) {
|
||||
entryDict->put(KEY_NUM_SEEDERS, VLB_ZERO);
|
||||
|
|
Loading…
Reference in New Issue