mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
80bc9a8a21
commit
4708809094
|
@ -1,3 +1,12 @@
|
|||
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
|
||||
|
||||
2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Make listening socket non-block mode.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.")
|
||||
|
|
|
@ -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.")
|
||||
|
|
Loading…
Reference in New Issue