diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-11-08 10:59:44 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-11-08 10:59:44 +0000 |
| commit | 76b9093d09d76b399823e36c83f1289b37ca2624 (patch) | |
| tree | 94fb6bb2a008c75b0064327223a7555e2dd8b94f /src/BtCheckIntegrityEntry.cc | |
| parent | b4f7588ba285a8e33dc07acfa730491285cba18e (diff) | |
2007-11-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Changed CheckIntegrityEntry interface so that it can define
the action when all the chunk checksums are valid.
* src/CheckIntegrityEntry.h
* src/StreamCheckIntegrityEntry.{h, cc}
* src/BtCheckIntegrityEntry.{h, cc}: Currently,when all the
checksums
are valid, then aira2 goes to seeding mode. Sometimes it is
better
to exit rather than doing seeding. So, it would be good to
toggle this
behavior.
* src/CheckIntegrityCommand.cc
* src/AbstractCommand.cc
* src/RequestGroup.cc
Diffstat (limited to 'src/BtCheckIntegrityEntry.cc')
| -rw-r--r-- | src/BtCheckIntegrityEntry.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/BtCheckIntegrityEntry.cc b/src/BtCheckIntegrityEntry.cc index e3ea5676..a115b7c6 100644 --- a/src/BtCheckIntegrityEntry.cc +++ b/src/BtCheckIntegrityEntry.cc @@ -47,7 +47,7 @@ BtCheckIntegrityEntry::BtCheckIntegrityEntry(RequestGroup* requestGroup): BtCheckIntegrityEntry::~BtCheckIntegrityEntry() {} -Commands BtCheckIntegrityEntry::prepareForNextAction(DownloadEngine* e) +Commands BtCheckIntegrityEntry::onDownloadIncomplete(DownloadEngine* e) { Commands commands; FileAllocationEntryHandle entry = new BtFileAllocationEntry(_requestGroup); @@ -58,3 +58,12 @@ Commands BtCheckIntegrityEntry::prepareForNextAction(DownloadEngine* e) } return commands; } + +Commands BtCheckIntegrityEntry::onDownloadFinished(DownloadEngine* e) +{ + // TODO Currently,when all the checksums + // are valid, then aira2 goes to seeding mode. Sometimes it is better + // to exit rather than doing seeding. So, it would be good to toggle this + // behavior. + return onDownloadIncomplete(e); +} |
