mirror of https://github.com/aria2/aria2
2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Introduce new preference PREF_BT_TIMEOUT. This is the timeout value for BitTorrent download. * src/PeerAbstractCommand.cc (PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT * src/main.cc: (timeoutSpecified): Removed. (main): Set the initial value of PREF_BT_TIMEOUT to 180. Removed timeoutSpecified. TODO: Add --bt-timeout command line option. * src/TorrentRequestInfo.cc (timeoutSpecified): Removed. (torrentHandler): Removed timeoutSpecified and the change of timeout value. * src/prefs.h (PREF_BT_TIMEOUT): New definition. Delete unused variables. * src/TorrentRequestInfo.cc (requestInfo): Removed.pull/1/head
parent
19c3a4204a
commit
3c1ecc7d30
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
|||
2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Introduce new preference PREF_BT_TIMEOUT. This is the timeout value
|
||||
for BitTorrent download.
|
||||
|
||||
* src/PeerAbstractCommand.cc
|
||||
(PeerAbstractCommand): PREF_TIMEOUT -> PREF_BT_TIMEOUT
|
||||
* src/main.cc:
|
||||
(timeoutSpecified): Removed.
|
||||
(main): Set the initial value of PREF_BT_TIMEOUT to 180.
|
||||
Removed timeoutSpecified. TODO: Add --bt-timeout command line option.
|
||||
* src/TorrentRequestInfo.cc
|
||||
(timeoutSpecified): Removed.
|
||||
(torrentHandler): Removed timeoutSpecified and the change of timeout
|
||||
value.
|
||||
* src/prefs.h
|
||||
(PREF_BT_TIMEOUT): New definition.
|
||||
|
||||
Delete unused variables.
|
||||
|
||||
* src/TorrentRequestInfo.cc
|
||||
(requestInfo): Removed.
|
||||
|
||||
|
||||
2006-11-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
To add Metalink location option:
|
||||
|
|
1
TODO
1
TODO
|
@ -18,3 +18,4 @@
|
|||
* Use SharedHandle where it is useful.
|
||||
* Rewrite Util::countBit
|
||||
* Add Turkish translation.
|
||||
* Add the message like "you can resume the transfer by invoking aria2 again" when the download stops.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# General Public License and is *not* in the public domain.
|
||||
|
||||
PACKAGE = aria2c
|
||||
VERSION = 0.8.1
|
||||
VERSION = 0.9.0
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ PeerAbstractCommand::PeerAbstractCommand(int cuid, const PeerHandle& peer,
|
|||
uploadLimitCheck(false), uploadLimit(0), noCheck(false)
|
||||
{
|
||||
setReadCheckSocket(socket);
|
||||
timeout = e->option->getAsInt(PREF_TIMEOUT);
|
||||
timeout = e->option->getAsInt(PREF_BT_TIMEOUT);
|
||||
btRuntime->increaseConnections();
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,7 @@
|
|||
#include "BtRegistry.h"
|
||||
#include "DefaultBtContext.h"
|
||||
|
||||
extern RequestInfo* requestInfo;
|
||||
extern void setSignalHander(int signal, void (*handler)(int), int flags);
|
||||
extern bool timeoutSpecified;
|
||||
extern volatile sig_atomic_t btHaltRequested;
|
||||
|
||||
void torrentHandler(int signal) {
|
||||
|
@ -56,9 +54,6 @@ RequestInfos TorrentRequestInfo::execute() {
|
|||
showFileEntry(btContext);
|
||||
return RequestInfos();
|
||||
}
|
||||
if(!timeoutSpecified) {
|
||||
op->put(PREF_TIMEOUT, "180");
|
||||
}
|
||||
// set max_tries to 1. AnnounceList handles retries.
|
||||
op->put(PREF_MAX_TRIES, "1");
|
||||
SharedHandle<TorrentDownloadEngine>
|
||||
|
|
|
@ -72,8 +72,6 @@ extern int optind, opterr, optopt;
|
|||
|
||||
using namespace std;
|
||||
|
||||
bool timeoutSpecified;
|
||||
|
||||
void setSignalHander(int signal, void (*handler)(int), int flags) {
|
||||
struct sigaction sigact;
|
||||
sigact.sa_handler = handler;
|
||||
|
@ -288,7 +286,6 @@ int main(int argc, char* argv[]) {
|
|||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
#endif // ENABLE_NLS
|
||||
timeoutSpecified = false;
|
||||
|
||||
int c;
|
||||
Option* op = new Option();
|
||||
|
@ -318,6 +315,7 @@ int main(int argc, char* argv[]) {
|
|||
op->put(PREF_TIMEOUT, "60");
|
||||
op->put(PREF_DNS_TIMEOUT, "10");
|
||||
op->put(PREF_PEER_CONNECTION_TIMEOUT, "60");
|
||||
op->put(PREF_BT_TIMEOUT, "180");
|
||||
op->put(PREF_MIN_SEGMENT_SIZE, "1048576");// 1M
|
||||
op->put(PREF_MAX_TRIES, "5");
|
||||
op->put(PREF_HTTP_AUTH_SCHEME, V_BASIC);
|
||||
|
@ -644,7 +642,6 @@ int main(int argc, char* argv[]) {
|
|||
int timeout = (int)strtol(optarg, NULL, 10);
|
||||
if(1 <= timeout && timeout <= 600) {
|
||||
op->put(PREF_TIMEOUT, Util::itos(timeout));
|
||||
timeoutSpecified = true;
|
||||
} else {
|
||||
cerr << _("timeout must be between 1 and 600") << endl;
|
||||
showUsage();
|
||||
|
|
|
@ -129,6 +129,8 @@
|
|||
*/
|
||||
// values: 1*digit
|
||||
#define PREF_PEER_CONNECTION_TIMEOUT "peer_connection_timeout"
|
||||
// values: 1*digit
|
||||
#define PREF_BT_TIMEOUT "bt_timeout"
|
||||
// values: true | false
|
||||
#define PREF_SHOW_FILES "show_files"
|
||||
// values: true | false
|
||||
|
|
Loading…
Reference in New Issue