diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-12 13:54:36 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-12 13:54:36 +0000 |
| commit | 7fc0de4f5b36a2d6949af4054cf07e975b037d7d (patch) | |
| tree | e1d86d103cee7192682f89f548b4eafcabc1e58a | |
| parent | 5472c8033e3a36267a1ca5f12ade08ce0296c42b (diff) | |
2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Renamed --bt-seed option as --bt-seed-unverified so that it
makes clear
that this is not going to verify files using piece hashes.
* src/HelpItemFactory.cc
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/option_processing.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
| -rw-r--r-- | ChangeLog | 12 | ||||
| -rw-r--r-- | src/HelpItemFactory.cc | 6 | ||||
| -rw-r--r-- | src/OptionHandlerFactory.cc | 2 | ||||
| -rw-r--r-- | src/RequestGroup.cc | 10 | ||||
| -rw-r--r-- | src/option_processing.cc | 7 | ||||
| -rw-r--r-- | src/prefs.cc | 2 | ||||
| -rw-r--r-- | src/prefs.h | 2 | ||||
| -rw-r--r-- | src/usage_text.h | 6 |
8 files changed, 30 insertions, 17 deletions
@@ -1,5 +1,17 @@ 2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> + Renamed --bt-seed option as --bt-seed-unverified so that it makes clear + that this is not going to verify files using piece hashes. + * src/HelpItemFactory.cc + * src/OptionHandlerFactory.cc + * src/RequestGroup.cc + * src/option_processing.cc + * src/prefs.cc + * src/prefs.h + * src/usage_text.h + +2008-07-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> + Added the ability to retrieve signature from Metalink file. A retrieved signature is stored in Signature class and it is held by DownloadContext class. Note that aria2 doesn't verify signature. diff --git a/src/HelpItemFactory.cc b/src/HelpItemFactory.cc index 29c8cf32..ee29eb6b 100644 --- a/src/HelpItemFactory.cc +++ b/src/HelpItemFactory.cc @@ -391,9 +391,9 @@ TagContainerHandle HelpItemFactory::createHelpItems(const Option* op) tc->addItem(item); } { - HelpItemHandle item(new HelpItem(PREF_BT_SEED, - TEXT_BT_SEED, - op->get(PREF_BT_SEED))); + HelpItemHandle item(new HelpItem(PREF_BT_SEED_UNVERIFIED, + TEXT_BT_SEED_UNVERIFIED, + op->get(PREF_BT_SEED_UNVERIFIED))); item->addTag(TAG_BITTORRENT); tc->addItem(item); } diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index afeb53a0..f7d873de 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -142,7 +142,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers() std::deque<std::string>(¶ms[0], ¶ms[arrayLength(params)])))); } - handlers.push_back(SH(new BooleanOptionHandler(PREF_BT_SEED))); + handlers.push_back(SH(new BooleanOptionHandler(PREF_BT_SEED_UNVERIFIED))); return handlers; } diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index 2f4c8175..79a48012 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -240,7 +240,7 @@ void RequestGroup::createInitialCommand(std::deque<Command*>& commands, if(_pieceStorage->getDiskAdaptor()->fileExists()) { if(!_option->getAsBool(PREF_CHECK_INTEGRITY) && !_option->getAsBool(PREF_ALLOW_OVERWRITE) && - !_option->getAsBool(PREF_BT_SEED)) { + !_option->getAsBool(PREF_BT_SEED_UNVERIFIED)) { // TODO we need this->haltRequested = true? throw DownloadFailureException (StringFormat @@ -249,7 +249,7 @@ void RequestGroup::createInitialCommand(std::deque<Command*>& commands, } else { _pieceStorage->getDiskAdaptor()->openFile(); } - if(_option->getAsBool(PREF_BT_SEED)) { + if(_option->getAsBool(PREF_BT_SEED_UNVERIFIED)) { _pieceStorage->markAllPiecesDone(); } } else { @@ -273,9 +273,9 @@ void RequestGroup::createInitialCommand(std::deque<Command*>& commands, } } CheckIntegrityEntryHandle entry(new BtCheckIntegrityEntry(this)); - // --bt-seed=true is given and download has completed, skip validation for - // piece hashes. - if(_option->getAsBool(PREF_BT_SEED) && + // --bt-seed-unverified=true is given and download has completed, skip + // validation for piece hashes. + if(_option->getAsBool(PREF_BT_SEED_UNVERIFIED) && _pieceStorage->downloadFinished()) { entry->onDownloadFinished(commands, e); } else { diff --git a/src/option_processing.cc b/src/option_processing.cc index 8d8eda35..dafde204 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -145,7 +145,7 @@ Option* createDefaultOption() op->put(PREF_BT_REQUIRE_CRYPTO, V_FALSE); op->put(PREF_BT_REQUEST_PEER_SPEED_LIMIT, "51200"); op->put(PREF_BT_MAX_OPEN_FILES, "100"); - op->put(PREF_BT_SEED, V_FALSE); + op->put(PREF_BT_SEED_UNVERIFIED, V_FALSE); op->put(PREF_QUIET, V_FALSE); op->put(PREF_STOP, "0"); #ifdef ENABLE_ASYNC_DNS @@ -257,7 +257,7 @@ Option* option_processing(int argc, char* const argv[]) { PREF_BT_REQUIRE_CRYPTO.c_str(), required_argument, &lopt, 31 }, { PREF_BT_REQUEST_PEER_SPEED_LIMIT.c_str(), required_argument, &lopt, 32 }, { PREF_BT_MAX_OPEN_FILES.c_str(), required_argument, &lopt, 33 }, - { PREF_BT_SEED.c_str(), optional_argument, &lopt, 34 }, + { PREF_BT_SEED_UNVERIFIED.c_str(), optional_argument, &lopt, 34 }, #endif // ENABLE_BITTORRENT #ifdef ENABLE_METALINK { PREF_METALINK_FILE.c_str(), required_argument, NULL, 'M' }, @@ -375,7 +375,8 @@ Option* option_processing(int argc, char* const argv[]) cmdstream << PREF_BT_MAX_OPEN_FILES << "=" << optarg << "\n"; break; case 34: - cmdstream << PREF_BT_SEED << "=" << toBoolArg(optarg) << "\n"; + cmdstream << PREF_BT_SEED_UNVERIFIED << "=" << toBoolArg(optarg) + << "\n"; break; case 100: cmdstream << PREF_METALINK_VERSION << "=" << optarg << "\n"; diff --git a/src/prefs.cc b/src/prefs.cc index f7cbf79a..c1a85942 100644 --- a/src/prefs.cc +++ b/src/prefs.cc @@ -252,7 +252,7 @@ const std::string PREF_BT_REQUEST_PEER_SPEED_LIMIT("bt-request-peer-speed-limit" // values: 1*digit const std::string PREF_BT_MAX_OPEN_FILES("bt-max-open-files"); // values: true | false -const std::string PREF_BT_SEED("bt-seed"); +const std::string PREF_BT_SEED_UNVERIFIED("bt-seed-unverified"); /** * Metalink related preferences diff --git a/src/prefs.h b/src/prefs.h index 43e9e057..2b35b767 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -256,7 +256,7 @@ extern const std::string PREF_BT_REQUEST_PEER_SPEED_LIMIT; // values: 1*digit extern const std::string PREF_BT_MAX_OPEN_FILES; // values: true | false -extern const std::string PREF_BT_SEED; +extern const std::string PREF_BT_SEED_UNVERIFIED; /** * Metalink related preferences diff --git a/src/usage_text.h b/src/usage_text.h index 19fa3e02..68947a83 100644 --- a/src/usage_text.h +++ b/src/usage_text.h @@ -284,9 +284,9 @@ _(" --bt-request-peer-speed-limit=SPEED In BitTorrent downloads, if the download #define TEXT_BT_MAX_OPEN_FILES \ _(" --bt-max-open-files=NUM Specify maximum number of files to open in each\n"\ " BitTorrent download.") -#define TEXT_BT_SEED \ -_(" --bt-seed[=true|false] Seed previously downloaded files without\n"\ - " validating piece hashes.") +#define TEXT_BT_SEED_UNVERIFIED \ +_(" --bt-seed-unverified[=true|false] Seed previously downloaded files without\n"\ + " verifying piece hashes.") #define TEXT_METALINK_FILE \ _(" -M, --metalink-file=METALINK_FILE The file path to the .metalink file.") #define TEXT_METALINK_SERVERS \ |
