diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-28 07:23:33 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-28 07:23:33 +0000 |
| commit | abe1e9843c1a357605013dae68b6b3bbb704cacb (patch) | |
| tree | 810774c5c0325c746d90c4a4dcae028f896a99bd /src/RequestGroup.h | |
| parent | 90bc2ccffc98a7be3af424932415e248e4385b22 (diff) | |
2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --always-resume and --max-resume-failure-tries option. If
--always-resume=false is given, when all given URIs does not
support resume or aria2 encounters N URIs which does not support
resume
(N is the value specified using --max-resume-failure-tries
option), aria2 download file from scratch. The default behavior
is --always-resume=true, which means if all URIs do not support
resume, download fails. I think this is OK because user normally
don't like to see that partially downloaded file is
overwritten(this is particularly true if file size is big). This
option is useful when aria2 is used as download backend and
graceful falling back to overwritten behavior is preferable.
Added exit status value 8, which means download failed because
server did not support resume.
* src/AbstractCommand.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/DownloadResultCode.h
* src/FileEntry.h
* src/FtpNegotiationCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/SegmentMan.cc
* src/SegmentMan.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DefaultPieceStorageTest.cc
* test/SegmentManTest.cc
Diffstat (limited to 'src/RequestGroup.h')
| -rw-r--r-- | src/RequestGroup.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/RequestGroup.h b/src/RequestGroup.h index eec393bc..1c940d20 100644 --- a/src/RequestGroup.h +++ b/src/RequestGroup.h @@ -167,6 +167,8 @@ private: RequestGroupMan* _requestGroupMan; + int _resumeFailureCount; + Logger* _logger; void validateFilename(const std::string& expectedFilename, @@ -500,6 +502,18 @@ public: _requestGroupMan = requestGroupMan; } + int getResumeFailureCount() const + { + return _resumeFailureCount; + } + + void increaseResumeFailureCount() + { + ++_resumeFailureCount; + } + + bool p2pInvolved() const; + static void resetGIDCounter() { _gidCounter = 0; } static gid_t newGID(); |
