summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-20 12:33:16 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-20 12:33:16 +0000
commit4708809094a67fd75276aed2794f14274f1122e6 (patch)
tree26fc51a17dd2994ede3da92ff0a30b9b92fefd0e /src
parent80bc9a8a21be66b3e59b2f830f16e0a9ddd7ad6e (diff)
2008-02-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Change the unit of --stop option from a minute to a second. * src/usage_text.h * src/DownloadEngineFactory.cc * src/OptionHandlerFactory.cc * src/message.h * src/TimedHaltCommand.cc
Diffstat (limited to 'src')
-rw-r--r--src/DownloadEngineFactory.cc6
-rw-r--r--src/OptionHandlerFactory.cc2
-rw-r--r--src/TimedHaltCommand.cc2
-rw-r--r--src/message.h2
-rw-r--r--src/usage_text.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc
index 308ebc6f..fc74fbd5 100644
--- a/src/DownloadEngineFactory.cc
+++ b/src/DownloadEngineFactory.cc
@@ -88,9 +88,9 @@ DownloadEngineFactory::newDownloadEngine(Option* op,
e->commands.push_back(new AutoSaveCommand(CUIDCounterSingletonHolder::instance()->newID(), e.get(), op->getAsInt(PREF_AUTO_SAVE_INTERVAL)));
e->commands.push_back(new HaveEraseCommand(CUIDCounterSingletonHolder::instance()->newID(), e.get(), 10));
{
- int32_t stopMin = op->getAsInt(PREF_STOP);
- if(stopMin > 0) {
- e->commands.push_back(new TimedHaltCommand(CUIDCounterSingletonHolder::instance()->newID(), e.get(), stopMin*60));
+ int32_t stopSec = op->getAsInt(PREF_STOP);
+ if(stopSec > 0) {
+ e->commands.push_back(new TimedHaltCommand(CUIDCounterSingletonHolder::instance()->newID(), e.get(), stopSec));
}
}
return e;
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index f01fbf3c..80e9fd83 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -118,7 +118,7 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
handlers.push_back(new HostPortOptionHandler(PREF_DHT_ENTRY_POINT,
PREF_DHT_ENTRY_POINT_HOST,
PREF_DHT_ENTRY_POINT_PORT));
- handlers.push_back(new NumberOptionHandler(PREF_STOP, 0, 35000000));
+ handlers.push_back(new NumberOptionHandler(PREF_STOP, 0, INT32_MAX));
handlers.push_back(new ParameterOptionHandler(PREF_BT_MIN_CRYPTO_LEVEL, V_PLAIN, V_ARC4));
handlers.push_back(new BooleanOptionHandler(PREF_BT_REQUIRE_CRYPTO));
diff --git a/src/TimedHaltCommand.cc b/src/TimedHaltCommand.cc
index 54db6cfe..75ac3b67 100644
--- a/src/TimedHaltCommand.cc
+++ b/src/TimedHaltCommand.cc
@@ -56,7 +56,7 @@ void TimedHaltCommand::preProcess()
void TimedHaltCommand::process()
{
if(!_e->isHaltRequested()) {
- logger->notice(MSG_TIME_HAS_PASSED, _interval/60);
+ logger->notice(MSG_TIME_HAS_PASSED, _interval);
_e->requestHalt();
}
}
diff --git a/src/message.h b/src/message.h
index 330c116b..da262ca1 100644
--- a/src/message.h
+++ b/src/message.h
@@ -139,7 +139,7 @@
#define MSG_SOMETHING_MISSING_IN_TORRENT _("Missing %s in torrent metainfo.")
#define MSG_NULL_TRACKER_RESPONSE _("Tracker returned null data.")
#define MSG_WINSOCK_INIT_FAILD _("Windows socket library initialization failed")
-#define MSG_TIME_HAS_PASSED _("%d minute(s) has passed. Stopping application.")
+#define MSG_TIME_HAS_PASSED _("%d second(s) has passed. Stopping application.")
#define EX_TIME_OUT _("Timeout.")
#define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")
diff --git a/src/usage_text.h b/src/usage_text.h
index 1bcf4696..062ed5cb 100644
--- a/src/usage_text.h
+++ b/src/usage_text.h
@@ -328,5 +328,5 @@ _(" --no-conf Disable loading aria2.conf file.")
#define TEXT_CONF_PATH \
_(" --conf-path=PATH Change the configuration file path to PATH.")
#define TEXT_STOP \
-_(" --stop=MINUTES Stop application after MINUTES minutes has passed.\n" \
+_(" --stop=SEC Stop application after SEC seconds has passed.\n" \
" If 0 is given, this feature is disabled.")