From 932c258755a439daacc222fea124b0c921a9eb1a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 28 Jul 2011 00:00:01 +0900 Subject: [PATCH] Added log message when checksum validation failed. --- src/IteratableChecksumValidator.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IteratableChecksumValidator.cc b/src/IteratableChecksumValidator.cc index be4137c4..36cd7518 100644 --- a/src/IteratableChecksumValidator.cc +++ b/src/IteratableChecksumValidator.cc @@ -44,6 +44,8 @@ #include "FileEntry.h" #include "BitfieldMan.h" #include "DownloadContext.h" +#include "LogFactory.h" +#include "fmt.h" namespace aria2 { @@ -77,6 +79,8 @@ void IteratableChecksumValidator::validateChunk() if(dctx_->getDigest() == actualDigest) { pieceStorage_->markAllPiecesDone(); } else { + A2_LOG_INFO(fmt("Checksum validation failed. expected=%s, actual=%s", + dctx_->getDigest().c_str(), actualDigest.c_str())); BitfieldMan bitfield(dctx_->getPieceLength(), dctx_->getTotalLength()); pieceStorage_->setBitfield(bitfield.getBitfield(), bitfield.getBitfieldLength()); }