Exit with 32 status code if checksum verification failed

pull/384/head
Tatsuhiro Tsujikawa 2015-05-12 23:08:10 +09:00
parent 5100f96bfa
commit 3855205026
3 changed files with 12 additions and 1 deletions

View File

@ -1767,6 +1767,12 @@ based on the last error encountered.
30
If aria2 could not parse JSON-RPC request.
31
Reserved. Not used.
32
If checksum validation failed.
.. note::
An error occurred in a finished download will not be reported

View File

@ -82,7 +82,11 @@ ChecksumCheckIntegrityEntry::onDownloadIncomplete
make_unique<StreamFileAllocationEntry>
(getRequestGroup(), popNextCommand()),
e);
return;
}
// If we don't redownload, set error code to indicate checksum error
getRequestGroup()->setLastErrorCode(error_code::CHECKSUM_ERROR);
}
} // namespace aria2

View File

@ -74,7 +74,8 @@ enum Value {
OPTION_ERROR = 28,
HTTP_SERVICE_UNAVAILABLE = 29,
JSON_PARSE_ERROR = 30,
REMOVED = 31
REMOVED = 31,
CHECKSUM_ERROR = 32,
};
} // namespace error_code