diff --git a/ChangeLog b/ChangeLog index fe189b96..24acda25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-06 Tatsuhiro Tsujikawa + + Fixed: hash algorithm 'sha1' is always used. + * src/DownloadCommand.cc (validatePieceHash) + 2008-01-06 Tatsuhiro Tsujikawa Added --enable-peer-exchange command-line option. diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc index cd2cf5e6..0f2a8b36 100644 --- a/src/DownloadCommand.cc +++ b/src/DownloadCommand.cc @@ -179,7 +179,7 @@ void DownloadCommand::validatePieceHash(const SegmentHandle& segment) if(e->option->get(PREF_REALTIME_CHUNK_CHECKSUM) == V_TRUE && !expectedPieceHash.empty()) { string actualPieceHash = - MessageDigestHelper::digest("sha1", + MessageDigestHelper::digest(_requestGroup->getDownloadContext()->getPieceHashAlgo(), _requestGroup->getPieceStorage()->getDiskAdaptor(), segment->getPosition(), segment->getLength());