2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

* src/FeatureConfig.cc
	(FEATURE_ASYNC_DNS): New definition.
	(FeatureConfig): Added aysnc DNS entry.

	To replace CommandUuid with Command* in SocketEntry and
	NameResolverEntry:
	
	* src/DownloadEngine.h
	(CommandUuids): Removed.
	(SocketEntry::commandUuid): Removed.
	(SocketEntry::command): New variable.
	(SocketEntry::SocketEntry): Updated.
	(SocketEntry::operator==): Updated.
	(NameResolverEntry::commandUuid): Removed.
	(NameResolverEntry::command): New variable.
	(NameResolverEntry::NameResolverEntry): Updated.
	(NameResolverEntry::operator==): Updated.
	(waitData): Changed the argument type.
	(addSocketForReadCheck): Changed the argument type.
	(deleteSocketForReadCheck): Changed the argument type.
	(addSocketForWriteCheck): Changed the argument type.
	(deleteSocketForWriteCheck): Changed the argument type.
	(addNameResolverCheck): Changed the argument type.
	(deleteNameResolverCheck): Changed the argument type.
	* src/DownloadEngine.cc
	(FindCommand): Removed.
	(run): Removed activeUuid. Added activeCommands instead.
	(AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
	(AccumulateActiveCommand): New function object.
	(waitData): Use AccumulateActiveCommand.
	(addSocketForReadCheck): Use Command instead of CommandUuid.
	(deleteSocketForReadCheck): Use Command instead of CommandUuid.
	(addSocketForWriteCheck): Use Command instead of CommandUuid.
	(deleteSocketForWriteCheck): Use Command instead of CommandUuid.
	(addNameResolverCheck): Use Command instead of CommandUuid.
	(deleteNameResolverCheck): Use Command instead of CommandUuid.	
	* src/AbstractCommand.cc
	(disableReadCheckSocket): Updated according to the changes in
	DownloadEngine.
	(setReadCheckSocket): Updated according to the changes in
	DownloadEngine.
	(disableWriteCheckSocket): Updated according to the changes in
	DownloadEngine.
	(setWriteCheckSocket): Updated according to the changes in
	DownloadEngine.
	(setNameResolverCheck): Updated according to the changes in
	DownloadEngine.
	(disableNameResolverCheck): Updated according to the changes in
	DownloadEngine.
	* src/AbstractCommand.cc
	(disableReadCheckSocket): Updated according to the changes in
	DownloadEngine.
	(setReadCheckSocket): Updated according to the changes in
	DownloadEngine.
	(disableWriteCheckSocket): Updated according to the changes in
	DownloadEngine.
	(setWriteCheckSocket): Updated according to the changes in
	DownloadEngine.

	* release 0.7.1
pull/1/head
Tatsuhiro Tsujikawa 2006-08-14 15:03:38 +00:00
parent e3b0153e85
commit 11dc664f83
19 changed files with 240 additions and 115 deletions

View File

@ -7,6 +7,67 @@
(printDownloadAbortMessage): Added a message to inform users that (printDownloadAbortMessage): Added a message to inform users that
transfer can be resumed. transfer can be resumed.
* src/FeatureConfig.cc
(FEATURE_ASYNC_DNS): New definition.
(FeatureConfig): Added aysnc DNS entry.
To replace CommandUuid with Command* in SocketEntry and
NameResolverEntry:
* src/DownloadEngine.h
(CommandUuids): Removed.
(SocketEntry::commandUuid): Removed.
(SocketEntry::command): New variable.
(SocketEntry::SocketEntry): Updated.
(SocketEntry::operator==): Updated.
(NameResolverEntry::commandUuid): Removed.
(NameResolverEntry::command): New variable.
(NameResolverEntry::NameResolverEntry): Updated.
(NameResolverEntry::operator==): Updated.
(waitData): Changed the argument type.
(addSocketForReadCheck): Changed the argument type.
(deleteSocketForReadCheck): Changed the argument type.
(addSocketForWriteCheck): Changed the argument type.
(deleteSocketForWriteCheck): Changed the argument type.
(addNameResolverCheck): Changed the argument type.
(deleteNameResolverCheck): Changed the argument type.
* src/DownloadEngine.cc
(FindCommand): Removed.
(run): Removed activeUuid. Added activeCommands instead.
(AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
(AccumulateActiveCommand): New function object.
(waitData): Use AccumulateActiveCommand.
(addSocketForReadCheck): Use Command instead of CommandUuid.
(deleteSocketForReadCheck): Use Command instead of CommandUuid.
(addSocketForWriteCheck): Use Command instead of CommandUuid.
(deleteSocketForWriteCheck): Use Command instead of CommandUuid.
(addNameResolverCheck): Use Command instead of CommandUuid.
(deleteNameResolverCheck): Use Command instead of CommandUuid.
* src/AbstractCommand.cc
(disableReadCheckSocket): Updated according to the changes in
DownloadEngine.
(setReadCheckSocket): Updated according to the changes in
DownloadEngine.
(disableWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setNameResolverCheck): Updated according to the changes in
DownloadEngine.
(disableNameResolverCheck): Updated according to the changes in
DownloadEngine.
* src/AbstractCommand.cc
(disableReadCheckSocket): Updated according to the changes in
DownloadEngine.
(setReadCheckSocket): Updated according to the changes in
DownloadEngine.
(disableWriteCheckSocket): Updated according to the changes in
DownloadEngine.
(setWriteCheckSocket): Updated according to the changes in
DownloadEngine.
* release 0.7.1
2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To handle the case where some BitTorrent tracker requires all letters To handle the case where some BitTorrent tracker requires all letters
@ -108,6 +169,8 @@
* src/RequestSlot.h: Replaced Time.h with TimeA2.h. * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
* src/SleepCommand.h: Replaced Time.h with TimeA2.h. * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
* src/DownloadEngine.cc: Replaced Time.h with TimeA2.h. * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
* release 0.7.0
2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

3
TODO
View File

@ -12,4 +12,5 @@
* Query resource by location * Query resource by location
* List available os, version, etc for metalink * List available os, version, etc for metalink
* ipv6(RFC2428 for ftp) * ipv6(RFC2428 for ftp)
* default prefix in libares.m4 must be the value of --prefex, not /usr/local * Add some criteria to stop seeding.
* Add silent mode.

32
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for aria2c 0.7.0. # Generated by GNU Autoconf 2.59 for aria2c 0.7.1.
# #
# Report bugs to <tujikawa@rednoah.com>. # Report bugs to <tujikawa@rednoah.com>.
# #
@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='aria2c' PACKAGE_NAME='aria2c'
PACKAGE_TARNAME='aria2c' PACKAGE_TARNAME='aria2c'
PACKAGE_VERSION='0.7.0' PACKAGE_VERSION='0.7.1'
PACKAGE_STRING='aria2c 0.7.0' PACKAGE_STRING='aria2c 0.7.1'
PACKAGE_BUGREPORT='tujikawa@rednoah.com' PACKAGE_BUGREPORT='tujikawa@rednoah.com'
ac_unique_file="src/Socket.h" ac_unique_file="src/Socket.h"
@ -788,7 +788,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures aria2c 0.7.0 to adapt to many kinds of systems. \`configure' configures aria2c 0.7.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -854,7 +854,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of aria2c 0.7.0:";; short | recursive ) echo "Configuration of aria2c 0.7.1:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -877,7 +877,7 @@ Optional Packages:
--with-gnutls use gnutls library if installed. Default: yes --with-gnutls use gnutls library if installed. Default: yes
--with-openssl use openssl library if installed. Default: yes --with-openssl use openssl library if installed. Default: yes
--with-libxml2 use libxml2 library if installed. Default: yes --with-libxml2 use libxml2 library if installed. Default: yes
--with-ares use ares library if installed. Default: yes --with-libares use ares library if installed. Default: yes
--with-xml-prefix=PFX Prefix where libxml is installed (optional) --with-xml-prefix=PFX Prefix where libxml is installed (optional)
--with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional) --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)
--with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional) --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)
@ -1002,7 +1002,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
aria2c configure 0.7.0 aria2c configure 0.7.1
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
@ -1016,7 +1016,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by aria2c $as_me 0.7.0, which was It was created by aria2c $as_me 0.7.1, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@ -1659,7 +1659,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='aria2c' PACKAGE='aria2c'
VERSION='0.7.0' VERSION='0.7.1'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -1950,9 +1950,9 @@ else
with_libxml2=yes with_libxml2=yes
fi; fi;
# Check whether --with-ares or --without-ares was given. # Check whether --with-libares or --without-libares was given.
if test "${with_ares+set}" = set; then if test "${with_libares+set}" = set; then
withval="$with_ares" withval="$with_libares"
with_libares=$withval with_libares=$withval
else else
with_libares=yes with_libares=yes
@ -4647,7 +4647,7 @@ else
fi; fi;
if test "x$libares_prefix" = "x"; then if test "x$libares_prefix" = "x"; then
libares_prefix="/usr/local" libares_prefix="/usr"
fi fi
libares_prefix_lib=$libares_prefix/lib libares_prefix_lib=$libares_prefix/lib
@ -4738,10 +4738,10 @@ _ACEOF
fi fi
LIBS=$LIBS_save LIBS=$LIBS_save
CPPFLAGS=$CPPFLAGS_save CPPFLAGS=$CPPFLAGS_save
fi fi
# Define variables based on the result of the checks for libraries. # Define variables based on the result of the checks for libraries.
@ -12101,7 +12101,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by aria2c $as_me 0.7.0, which was This file was extended by aria2c $as_me 0.7.1, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -12164,7 +12164,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
aria2c config.status 0.7.0 aria2c config.status 0.7.1
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
# #
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(aria2c, 0.7.0, tujikawa@rednoah.com) AC_INIT(aria2c, 0.7.1, tujikawa@rednoah.com)
AM_INIT_AUTOMAKE() AM_INIT_AUTOMAKE()
AM_PATH_CPPUNIT(1.10.2) AM_PATH_CPPUNIT(1.10.2)
AC_CONFIG_SRCDIR([src/Socket.h]) AC_CONFIG_SRCDIR([src/Socket.h])
@ -16,7 +16,7 @@ AC_SUBST(localedir)
AC_ARG_WITH([gnutls], [ --with-gnutls use gnutls library if installed. Default: yes], [with_gnutls=$withval], [with_gnutls=yes]) AC_ARG_WITH([gnutls], [ --with-gnutls use gnutls library if installed. Default: yes], [with_gnutls=$withval], [with_gnutls=yes])
AC_ARG_WITH([openssl], [ --with-openssl use openssl library if installed. Default: yes], [with_openssl=$withval], [with_openssl=yes]) AC_ARG_WITH([openssl], [ --with-openssl use openssl library if installed. Default: yes], [with_openssl=$withval], [with_openssl=yes])
AC_ARG_WITH([libxml2], [ --with-libxml2 use libxml2 library if installed. Default: yes], [with_libxml2=$withval], [with_libxml2=yes]) AC_ARG_WITH([libxml2], [ --with-libxml2 use libxml2 library if installed. Default: yes], [with_libxml2=$withval], [with_libxml2=yes])
AC_ARG_WITH([ares], [ --with-ares use ares library if installed. Default: yes], [with_libares=$withval], [with_libares=yes]) AC_ARG_WITH([libares], [ --with-libares use ares library if installed. Default: yes], [with_libares=$withval], [with_libares=yes])
AC_ARG_ENABLE([bittorrent], [ --enable-bittorrent enable BitTorrent support. Default: yes], [enable_bittorrent=$enableval], [enable_bittorrent=yes]) AC_ARG_ENABLE([bittorrent], [ --enable-bittorrent enable BitTorrent support. Default: yes], [enable_bittorrent=$enableval], [enable_bittorrent=yes])
AC_ARG_ENABLE([metalink], [ --enable-metalink enable Metalink support. Default: yes], [enable_metalink=$enableval], [enable_metalink=yes]) AC_ARG_ENABLE([metalink], [ --enable-metalink enable Metalink support. Default: yes], [enable_metalink=$enableval], [enable_metalink=yes])

View File

@ -6,7 +6,7 @@ AC_ARG_WITH([libares-prefix],
[libares_prefix=""]) [libares_prefix=""])
if test "x$libares_prefix" = "x"; then if test "x$libares_prefix" = "x"; then
libares_prefix="/usr/local" libares_prefix="/usr"
fi fi
libares_prefix_lib=$libares_prefix/lib libares_prefix_lib=$libares_prefix/lib
@ -27,7 +27,7 @@ if test "x$have_libares" = "xyes"; then
AC_SUBST(LIBARES_CPPFLAGS) AC_SUBST(LIBARES_CPPFLAGS)
fi fi
LIBS=$LIBS_save LIBS=$LIBS_save
CPPFLAGS=$CPPFLAGS_save CPPFLAGS=$CPPFLAGS_save
]) ])

View File

@ -9,7 +9,7 @@
# General Public License and is *not* in the public domain. # General Public License and is *not* in the public domain.
PACKAGE = aria2c PACKAGE = aria2c
VERSION = 0.7.0 VERSION = 0.7.1
SHELL = /bin/sh SHELL = /bin/sh

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
"POT-Creation-Date: 2006-08-08 01:22+0900\n" "POT-Creation-Date: 2006-08-14 23:18+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -27,6 +27,7 @@ msgstr ""
msgid "" msgid ""
"\n" "\n"
"The download was not complete because of errors. Check the log.\n" "The download was not complete because of errors. Check the log.\n"
"aria2 will resume download if the transfer is restarted."
msgstr "" msgstr ""
#: src/message.h:27 #: src/message.h:27
@ -790,3 +791,18 @@ msgstr ""
#: src/main.cc:614 #: src/main.cc:614
msgid "daemon failed" msgid "daemon failed"
msgstr "" msgstr ""
#: src/main.cc:676
msgid ""
"Now verifying checksum.\n"
"This may take some time depending on your PC environment and the size of "
"file."
msgstr ""
#: src/main.cc:680
msgid "checksum OK."
msgstr ""
#: src/main.cc:683
msgid "checksum ERROR."
msgstr ""

BIN
po/de.gmo

Binary file not shown.

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: de\n" "Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
"POT-Creation-Date: 2006-08-08 01:22+0900\n" "POT-Creation-Date: 2006-08-14 23:18+0900\n"
"PO-Revision-Date: 2006-05-05 19:44+0900\n" "PO-Revision-Date: 2006-05-05 19:44+0900\n"
"Last-Translator: Hermann J. Beckers <hj.beckers@onlinehome.de>\n" "Last-Translator: Hermann J. Beckers <hj.beckers@onlinehome.de>\n"
"Language-Team: deutsch <de@li.org>\n" "Language-Team: deutsch <de@li.org>\n"
@ -26,9 +26,11 @@ msgstr ""
"Abruf ist vollständig. <%s>\n" "Abruf ist vollständig. <%s>\n"
#: src/RequestInfo.h:92 #: src/RequestInfo.h:92
#, fuzzy
msgid "" msgid ""
"\n" "\n"
"The download was not complete because of errors. Check the log.\n" "The download was not complete because of errors. Check the log.\n"
"aria2 will resume download if the transfer is restarted."
msgstr "" msgstr ""
"\n" "\n"
"Abruf wegen Fehlern nicht vollständig. Überprüfen Sie die Log-Datei.\n" "Abruf wegen Fehlern nicht vollständig. Überprüfen Sie die Log-Datei.\n"
@ -926,3 +928,18 @@ msgstr "Geben Sie zumindest eine URL an"
#: src/main.cc:614 #: src/main.cc:614
msgid "daemon failed" msgid "daemon failed"
msgstr "Daemon-Start nicht erfolgreich" msgstr "Daemon-Start nicht erfolgreich"
#: src/main.cc:676
msgid ""
"Now verifying checksum.\n"
"This may take some time depending on your PC environment and the size of "
"file."
msgstr ""
#: src/main.cc:680
msgid "checksum OK."
msgstr ""
#: src/main.cc:683
msgid "checksum ERROR."
msgstr ""

BIN
po/ja.gmo

Binary file not shown.

View File

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: aria2c 0.2.1\n" "Project-Id-Version: aria2c 0.2.1\n"
"Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
"POT-Creation-Date: 2006-08-08 01:22+0900\n" "POT-Creation-Date: 2006-08-14 23:18+0900\n"
"PO-Revision-Date: 2006-08-08 01:27+0900\n" "PO-Revision-Date: 2006-08-14 23:22+0900\n"
"Last-Translator: Tatsuhiro Tsujikawa <tujikawa@rednoah.com>\n" "Last-Translator: Tatsuhiro Tsujikawa <tujikawa@rednoah.com>\n"
"Language-Team: Japanese <ja@li.org>\n" "Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -29,9 +29,11 @@ msgstr ""
msgid "" msgid ""
"\n" "\n"
"The download was not complete because of errors. Check the log.\n" "The download was not complete because of errors. Check the log.\n"
"aria2 will resume download if the transfer is restarted."
msgstr "" msgstr ""
"\n" "\n"
"ダウンロードはエラーのため完了していません. ログを確認してください.\n" "ダウンロードはエラーのため完了していません. ログを確認してください.\n"
"次回のダウンロードはエラーの時点から再開できます."
#: src/message.h:27 #: src/message.h:27
#, c-format #, c-format
@ -957,3 +959,20 @@ msgstr "
#: src/main.cc:614 #: src/main.cc:614
msgid "daemon failed" msgid "daemon failed"
msgstr "デーモン起動に失敗" msgstr "デーモン起動に失敗"
#: src/main.cc:676
msgid ""
"Now verifying checksum.\n"
"This may take some time depending on your PC environment and the size of "
"file."
msgstr ""
"チェックサムを検査しています.\n"
"お使いの PC 環境とファイルサイズにより, ある程度の時間がかかります."
#: src/main.cc:680
msgid "checksum OK."
msgstr "チェックサム OK."
#: src/main.cc:683
msgid "checksum ERROR."
msgstr "チェックサム エラー."

BIN
po/ru.gmo

Binary file not shown.

View File

@ -10,7 +10,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ru\n" "Project-Id-Version: ru\n"
"Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n" "Report-Msgid-Bugs-To: http://aria2.sourceforge.net/\n"
"POT-Creation-Date: 2006-08-08 01:22+0900\n" "POT-Creation-Date: 2006-08-14 23:18+0900\n"
"PO-Revision-Date: 2006-07-28 18:04+0600\n" "PO-Revision-Date: 2006-07-28 18:04+0600\n"
"Last-Translator: Azamat H. Hackimov <azamat.hackimov@gmail.com>\n" "Last-Translator: Azamat H. Hackimov <azamat.hackimov@gmail.com>\n"
"Language-Team: <ru@li.org>\n" "Language-Team: <ru@li.org>\n"
@ -31,9 +31,11 @@ msgstr ""
"Скачивание завершено. <%s>\n" "Скачивание завершено. <%s>\n"
#: src/RequestInfo.h:92 #: src/RequestInfo.h:92
#, fuzzy
msgid "" msgid ""
"\n" "\n"
"The download was not complete because of errors. Check the log.\n" "The download was not complete because of errors. Check the log.\n"
"aria2 will resume download if the transfer is restarted."
msgstr "" msgstr ""
"\n" "\n"
"Скачивание не завершено из-за ошибок. Проверьте лог-файл.\n" "Скачивание не завершено из-за ошибок. Проверьте лог-файл.\n"
@ -907,3 +909,18 @@ msgstr "укажите по крайней мере один URL"
#: src/main.cc:614 #: src/main.cc:614
msgid "daemon failed" msgid "daemon failed"
msgstr "ошибка демона" msgstr "ошибка демона"
#: src/main.cc:676
msgid ""
"Now verifying checksum.\n"
"This may take some time depending on your PC environment and the size of "
"file."
msgstr ""
#: src/main.cc:680
msgid "checksum OK."
msgstr ""
#: src/main.cc:683
msgid "checksum ERROR."
msgstr ""

View File

@ -120,7 +120,7 @@ void AbstractCommand::onAbort(Exception* ex) {
void AbstractCommand::disableReadCheckSocket() { void AbstractCommand::disableReadCheckSocket() {
if(checkSocketIsReadable) { if(checkSocketIsReadable) {
e->deleteSocketForReadCheck(readCheckTarget, getUuid()); e->deleteSocketForReadCheck(readCheckTarget, this);
checkSocketIsReadable = false; checkSocketIsReadable = false;
readCheckTarget = SocketHandle(); readCheckTarget = SocketHandle();
} }
@ -132,12 +132,12 @@ void AbstractCommand::setReadCheckSocket(const SocketHandle& socket) {
} else { } else {
if(checkSocketIsReadable) { if(checkSocketIsReadable) {
if(readCheckTarget != socket) { if(readCheckTarget != socket) {
e->deleteSocketForReadCheck(readCheckTarget, getUuid()); e->deleteSocketForReadCheck(readCheckTarget, this);
e->addSocketForReadCheck(socket, getUuid()); e->addSocketForReadCheck(socket, this);
readCheckTarget = socket; readCheckTarget = socket;
} }
} else { } else {
e->addSocketForReadCheck(socket, getUuid()); e->addSocketForReadCheck(socket, this);
checkSocketIsReadable = true; checkSocketIsReadable = true;
readCheckTarget = socket; readCheckTarget = socket;
} }
@ -146,7 +146,7 @@ void AbstractCommand::setReadCheckSocket(const SocketHandle& socket) {
void AbstractCommand::disableWriteCheckSocket() { void AbstractCommand::disableWriteCheckSocket() {
if(checkSocketIsWritable) { if(checkSocketIsWritable) {
e->deleteSocketForWriteCheck(writeCheckTarget, getUuid()); e->deleteSocketForWriteCheck(writeCheckTarget, this);
checkSocketIsWritable = false; checkSocketIsWritable = false;
writeCheckTarget = SocketHandle(); writeCheckTarget = SocketHandle();
} }
@ -158,12 +158,12 @@ void AbstractCommand::setWriteCheckSocket(const SocketHandle& socket) {
} else { } else {
if(checkSocketIsWritable) { if(checkSocketIsWritable) {
if(writeCheckTarget != socket) { if(writeCheckTarget != socket) {
e->deleteSocketForWriteCheck(writeCheckTarget, getUuid()); e->deleteSocketForWriteCheck(writeCheckTarget, this);
e->addSocketForWriteCheck(socket, getUuid()); e->addSocketForWriteCheck(socket, this);
writeCheckTarget = socket; writeCheckTarget = socket;
} }
} else { } else {
e->addSocketForWriteCheck(socket, getUuid()); e->addSocketForWriteCheck(socket, this);
checkSocketIsWritable = true; checkSocketIsWritable = true;
writeCheckTarget = socket; writeCheckTarget = socket;
} }
@ -172,11 +172,11 @@ void AbstractCommand::setWriteCheckSocket(const SocketHandle& socket) {
#ifdef HAVE_LIBARES #ifdef HAVE_LIBARES
void AbstractCommand::setNameResolverCheck(const NameResolverHandle& resolver) { void AbstractCommand::setNameResolverCheck(const NameResolverHandle& resolver) {
e->addNameResolverCheck(resolver, getUuid()); e->addNameResolverCheck(resolver, this);
} }
void AbstractCommand::disableNameResolverCheck(const NameResolverHandle& resolver) { void AbstractCommand::disableNameResolverCheck(const NameResolverHandle& resolver) {
e->deleteNameResolverCheck(resolver, getUuid()); e->deleteNameResolverCheck(resolver, this);
} }
bool AbstractCommand::resolveHostname(const string& hostname, bool AbstractCommand::resolveHostname(const string& hostname,

View File

@ -46,27 +46,11 @@ void DownloadEngine::cleanQueue() {
commands.clear(); commands.clear();
} }
class FindCommand {
private:
CommandUuid uuid;
public:
FindCommand(const CommandUuid& uuid):uuid(uuid) {}
bool operator()(const Command* command) {
if(command->getUuid() == uuid) {
return true;
} else {
return false;
}
}
};
void DownloadEngine::run() { void DownloadEngine::run() {
initStatistics(); initStatistics();
Time cp; Time cp;
cp.setTimeInSec(0); cp.setTimeInSec(0);
CommandUuids activeUuids; Commands activeCommands;
while(!commands.empty()) { while(!commands.empty()) {
if(cp.elapsed(1)) { if(cp.elapsed(1)) {
cp.reset(); cp.reset();
@ -79,22 +63,22 @@ void DownloadEngine::run() {
} }
} }
} else { } else {
for(CommandUuids::iterator itr = activeUuids.begin(); for(Commands::iterator itr = activeCommands.begin();
itr != activeUuids.end(); itr++) { itr != activeCommands.end(); itr++) {
Commands::iterator comItr = find_if(commands.begin(), commands.end(), Commands::iterator comItr = find(commands.begin(), commands.end(),
FindCommand(*itr)); *itr);
assert(comItr != commands.end()); assert(comItr != commands.end());
Command* com = *comItr; Command* command = *itr;
commands.erase(comItr); commands.erase(comItr);
if(com->execute()) { if(command->execute()) {
delete com; delete command;
} }
} }
} }
afterEachIteration(); afterEachIteration();
activeUuids.clear(); activeCommands.clear();
if(!noWait && !commands.empty()) { if(!noWait && !commands.empty()) {
waitData(activeUuids); waitData(activeCommands);
} }
noWait = false; noWait = false;
calculateStatistics(); calculateStatistics();
@ -146,34 +130,34 @@ public:
#endif // HAVE_LIBARES #endif // HAVE_LIBARES
}; };
class AccumulateActiveUuid { class AccumulateActiveCommand {
private: private:
CommandUuids* activeUuids_ptr; Commands* activeCommands_ptr;
fd_set* rfds_ptr; fd_set* rfds_ptr;
fd_set* wfds_ptr; fd_set* wfds_ptr;
public: public:
AccumulateActiveUuid(CommandUuids* activeUuids_ptr, AccumulateActiveCommand(Commands* activeCommands_ptr,
fd_set* rfds_ptr, fd_set* rfds_ptr,
fd_set* wfds_ptr): fd_set* wfds_ptr):
activeUuids_ptr(activeUuids_ptr), activeCommands_ptr(activeCommands_ptr),
rfds_ptr(rfds_ptr), rfds_ptr(rfds_ptr),
wfds_ptr(wfds_ptr) {} wfds_ptr(wfds_ptr) {}
void operator()(const SocketEntry& entry) { void operator()(const SocketEntry& entry) {
if(FD_ISSET(entry.socket->getSockfd(), rfds_ptr) || if(FD_ISSET(entry.socket->getSockfd(), rfds_ptr) ||
FD_ISSET(entry.socket->getSockfd(), wfds_ptr)) { FD_ISSET(entry.socket->getSockfd(), wfds_ptr)) {
activeUuids_ptr->push_back(entry.commandUuid); activeCommands_ptr->push_back(entry.command);
} }
/* /*
switch(entry.type) { switch(entry.type) {
case SocketEntry::TYPE_RD: case SocketEntry::TYPE_RD:
if(FD_ISSET(entry.socket->getSockfd(), rfds_ptr)) { if(FD_ISSET(entry.socket->getSockfd(), rfds_ptr)) {
activeUuids_ptr->push_back(entry.commandUuid); activeCommands_ptr->push_back(entry.command);
} }
break; break;
case SocketEntry::TYPE_WR: case SocketEntry::TYPE_WR:
if(FD_ISSET(entry.socket->getSockfd(), wfds_ptr)) { if(FD_ISSET(entry.socket->getSockfd(), wfds_ptr)) {
activeUuids_ptr->push_back(entry.commandUuid); activeCommands_ptr->push_back(entry.command);
} }
break; break;
} }
@ -185,7 +169,7 @@ public:
switch(entry.nameResolver->getStatus()) { switch(entry.nameResolver->getStatus()) {
case NameResolver::STATUS_SUCCESS: case NameResolver::STATUS_SUCCESS:
case NameResolver::STATUS_ERROR: case NameResolver::STATUS_ERROR:
activeUuids_ptr->push_back(entry.commandUuid); activeCommands_ptr->push_back(entry.command);
break; break;
default: default:
break; break;
@ -194,7 +178,7 @@ public:
#endif // HAVE_LIBARES #endif // HAVE_LIBARES
}; };
void DownloadEngine::waitData(CommandUuids& activeUuids) { void DownloadEngine::waitData(Commands& activeCommands) {
fd_set rfds; fd_set rfds;
fd_set wfds; fd_set wfds;
int retval = 0; int retval = 0;
@ -208,15 +192,15 @@ void DownloadEngine::waitData(CommandUuids& activeUuids) {
retval = select(fdmax+1, &rfds, &wfds, NULL, &tv); retval = select(fdmax+1, &rfds, &wfds, NULL, &tv);
if(retval > 0) { if(retval > 0) {
for_each(socketEntries.begin(), socketEntries.end(), for_each(socketEntries.begin(), socketEntries.end(),
AccumulateActiveUuid(&activeUuids, &rfds, &wfds)); AccumulateActiveCommand(&activeCommands, &rfds, &wfds));
#ifdef HAVE_LIBARES #ifdef HAVE_LIBARES
for_each(nameResolverEntries.begin(), nameResolverEntries.end(), for_each(nameResolverEntries.begin(), nameResolverEntries.end(),
AccumulateActiveUuid(&activeUuids, &rfds, &wfds)); AccumulateActiveCommand(&activeCommands, &rfds, &wfds));
#endif // HAVE_LIBARES #endif // HAVE_LIBARES
sort(activeUuids.begin(), activeUuids.end()); sort(activeCommands.begin(), activeCommands.end());
activeUuids.erase(unique(activeUuids.begin(), activeCommands.erase(unique(activeCommands.begin(),
activeUuids.end()), activeCommands.end()),
activeUuids.end()); activeCommands.end());
} }
} }
@ -257,33 +241,33 @@ bool DownloadEngine::deleteSocket(const SocketEntry& entry) {
} }
bool DownloadEngine::addSocketForReadCheck(const SocketHandle& socket, bool DownloadEngine::addSocketForReadCheck(const SocketHandle& socket,
const CommandUuid& commandUuid) { Command* command) {
SocketEntry entry(socket, commandUuid, SocketEntry::TYPE_RD); SocketEntry entry(socket, command, SocketEntry::TYPE_RD);
return addSocket(entry); return addSocket(entry);
} }
bool DownloadEngine::deleteSocketForReadCheck(const SocketHandle& socket, bool DownloadEngine::deleteSocketForReadCheck(const SocketHandle& socket,
const CommandUuid& commandUuid) { Command* command) {
SocketEntry entry(socket, commandUuid, SocketEntry::TYPE_RD); SocketEntry entry(socket, command, SocketEntry::TYPE_RD);
return deleteSocket(entry); return deleteSocket(entry);
} }
bool DownloadEngine::addSocketForWriteCheck(const SocketHandle& socket, bool DownloadEngine::addSocketForWriteCheck(const SocketHandle& socket,
const CommandUuid& commandUuid) { Command* command) {
SocketEntry entry(socket, commandUuid, SocketEntry::TYPE_WR); SocketEntry entry(socket, command, SocketEntry::TYPE_WR);
return addSocket(entry); return addSocket(entry);
} }
bool DownloadEngine::deleteSocketForWriteCheck(const SocketHandle& socket, bool DownloadEngine::deleteSocketForWriteCheck(const SocketHandle& socket,
const CommandUuid& commandUuid) { Command* command) {
SocketEntry entry(socket, commandUuid, SocketEntry::TYPE_WR); SocketEntry entry(socket, command, SocketEntry::TYPE_WR);
return deleteSocket(entry); return deleteSocket(entry);
} }
#ifdef HAVE_LIBARES #ifdef HAVE_LIBARES
bool DownloadEngine::addNameResolverCheck(const NameResolverHandle& resolver, bool DownloadEngine::addNameResolverCheck(const NameResolverHandle& resolver,
const CommandUuid& uuid) { Command* command) {
NameResolverEntry entry(resolver, uuid); NameResolverEntry entry(resolver, command);
NameResolverEntries::iterator itr = find(nameResolverEntries.begin(), NameResolverEntries::iterator itr = find(nameResolverEntries.begin(),
nameResolverEntries.end(), nameResolverEntries.end(),
entry); entry);
@ -297,8 +281,8 @@ bool DownloadEngine::addNameResolverCheck(const NameResolverHandle& resolver,
} }
bool DownloadEngine::deleteNameResolverCheck(const NameResolverHandle& resolver, bool DownloadEngine::deleteNameResolverCheck(const NameResolverHandle& resolver,
const CommandUuid& uuid) { Command* command) {
NameResolverEntry entry(resolver, uuid); NameResolverEntry entry(resolver, command);
NameResolverEntries::iterator itr = find(nameResolverEntries.begin(), NameResolverEntries::iterator itr = find(nameResolverEntries.begin(),
nameResolverEntries.end(), nameResolverEntries.end(),
entry); entry);

View File

@ -34,7 +34,6 @@
typedef deque<SocketHandle> Sockets; typedef deque<SocketHandle> Sockets;
typedef deque<Command*> Commands; typedef deque<Command*> Commands;
typedef deque<CommandUuid> CommandUuids;
class SocketEntry { class SocketEntry {
public: public:
@ -44,18 +43,18 @@ public:
}; };
SocketHandle socket; SocketHandle socket;
CommandUuid commandUuid; Command* command;
TYPE type; TYPE type;
public: public:
SocketEntry(const SocketHandle& socket, SocketEntry(const SocketHandle& socket,
const CommandUuid& commandUuid, Command* command,
TYPE type): TYPE type):
socket(socket), commandUuid(commandUuid), type(type) {} socket(socket), command(command), type(type) {}
~SocketEntry() {} ~SocketEntry() {}
bool operator==(const SocketEntry& entry) { bool operator==(const SocketEntry& entry) {
return socket == entry.socket && return socket == entry.socket &&
commandUuid == entry.commandUuid && command == entry.command &&
type == entry.type; type == entry.type;
} }
}; };
@ -66,16 +65,16 @@ typedef deque<SocketEntry> SocketEntries;
class NameResolverEntry { class NameResolverEntry {
public: public:
NameResolverHandle nameResolver; NameResolverHandle nameResolver;
CommandUuid commandUuid; Command* command;
public: public:
NameResolverEntry(const NameResolverHandle& nameResolver, NameResolverEntry(const NameResolverHandle& nameResolver,
const CommandUuid& commandUuid): Command* command):
nameResolver(nameResolver), commandUuid(commandUuid) {} nameResolver(nameResolver), command(command) {}
~NameResolverEntry() {} ~NameResolverEntry() {}
bool operator==(const NameResolverEntry& entry) { bool operator==(const NameResolverEntry& entry) {
return nameResolver == entry.nameResolver && return nameResolver == entry.nameResolver &&
commandUuid == entry.commandUuid; command == entry.command;
} }
}; };
@ -85,7 +84,7 @@ typedef deque<NameResolverEntry> NameResolverEntries;
class DownloadEngine { class DownloadEngine {
private: private:
void waitData(CommandUuids& activeUuids); void waitData(Commands& activeCommands);
SocketEntries socketEntries; SocketEntries socketEntries;
#ifdef HAVE_LIBARES #ifdef HAVE_LIBARES
NameResolverEntries nameResolverEntries; NameResolverEntries nameResolverEntries;
@ -119,18 +118,18 @@ public:
void updateFdSet(); void updateFdSet();
bool addSocketForReadCheck(const SocketHandle& socket, bool addSocketForReadCheck(const SocketHandle& socket,
const CommandUuid& commandUuid); Command* command);
bool deleteSocketForReadCheck(const SocketHandle& socket, bool deleteSocketForReadCheck(const SocketHandle& socket,
const CommandUuid& commandUuid); Command* command);
bool addSocketForWriteCheck(const SocketHandle& socket, bool addSocketForWriteCheck(const SocketHandle& socket,
const CommandUuid& commandUuid); Command* command);
bool deleteSocketForWriteCheck(const SocketHandle& socket, bool deleteSocketForWriteCheck(const SocketHandle& socket,
const CommandUuid& command); Command* command);
#ifdef HAVE_LIBARES #ifdef HAVE_LIBARES
bool addNameResolverCheck(const NameResolverHandle& resolver, bool addNameResolverCheck(const NameResolverHandle& resolver,
const CommandUuid& uuid); Command* command);
bool deleteNameResolverCheck(const NameResolverHandle& resolver, bool deleteNameResolverCheck(const NameResolverHandle& resolver,
const CommandUuid& uuid); Command* command);
#endif // HAVE_LIBARES #endif // HAVE_LIBARES
}; };

View File

@ -29,6 +29,7 @@ FeatureConfig* FeatureConfig::featureConfig = 0;
#define FEATURE_BITTORRENT "bittorrent" #define FEATURE_BITTORRENT "bittorrent"
#define FEATURE_METALINK "metalink" #define FEATURE_METALINK "metalink"
#define FEATURE_MESSAGE_DIGEST "message digest" #define FEATURE_MESSAGE_DIGEST "message digest"
#define FEATURE_ASYNC_DNS "async dns"
FeatureConfig::FeatureConfig() { FeatureConfig::FeatureConfig() {
static PortMap::value_type portArray[] = { static PortMap::value_type portArray[] = {
@ -71,6 +72,13 @@ FeatureConfig::FeatureConfig() {
false false
#endif // ENABLE_MESSAGE_DIGEST #endif // ENABLE_MESSAGE_DIGEST
), ),
FeatureMap::value_type(FEATURE_ASYNC_DNS,
#ifdef HAVE_LIBARES
true
#else
false
#endif // HAVE_LIBARES
),
}; };
int featureArraySize = sizeof(featureArray)/sizeof(FeatureMap::value_type); int featureArraySize = sizeof(featureArray)/sizeof(FeatureMap::value_type);

View File

@ -88,7 +88,7 @@ void PeerAbstractCommand::onAbort(Exception* ex) {
void PeerAbstractCommand::disableReadCheckSocket() { void PeerAbstractCommand::disableReadCheckSocket() {
if(checkSocketIsReadable) { if(checkSocketIsReadable) {
e->deleteSocketForReadCheck(readCheckTarget, getUuid()); e->deleteSocketForReadCheck(readCheckTarget, this);
checkSocketIsReadable = false; checkSocketIsReadable = false;
readCheckTarget = SocketHandle(); readCheckTarget = SocketHandle();
} }
@ -100,12 +100,12 @@ void PeerAbstractCommand::setReadCheckSocket(const SocketHandle& socket) {
} else { } else {
if(checkSocketIsReadable) { if(checkSocketIsReadable) {
if(readCheckTarget != socket) { if(readCheckTarget != socket) {
e->deleteSocketForReadCheck(readCheckTarget, getUuid()); e->deleteSocketForReadCheck(readCheckTarget, this);
e->addSocketForReadCheck(socket, getUuid()); e->addSocketForReadCheck(socket, this);
readCheckTarget = socket; readCheckTarget = socket;
} }
} else { } else {
e->addSocketForReadCheck(socket, getUuid()); e->addSocketForReadCheck(socket, this);
checkSocketIsReadable = true; checkSocketIsReadable = true;
readCheckTarget = socket; readCheckTarget = socket;
} }
@ -114,7 +114,7 @@ void PeerAbstractCommand::setReadCheckSocket(const SocketHandle& socket) {
void PeerAbstractCommand::disableWriteCheckSocket() { void PeerAbstractCommand::disableWriteCheckSocket() {
if(checkSocketIsWritable) { if(checkSocketIsWritable) {
e->deleteSocketForWriteCheck(writeCheckTarget, getUuid()); e->deleteSocketForWriteCheck(writeCheckTarget, this);
checkSocketIsWritable = false; checkSocketIsWritable = false;
writeCheckTarget = SocketHandle(); writeCheckTarget = SocketHandle();
} }
@ -126,12 +126,12 @@ void PeerAbstractCommand::setWriteCheckSocket(const SocketHandle& socket) {
} else { } else {
if(checkSocketIsWritable) { if(checkSocketIsWritable) {
if(writeCheckTarget != socket) { if(writeCheckTarget != socket) {
e->deleteSocketForWriteCheck(writeCheckTarget, getUuid()); e->deleteSocketForWriteCheck(writeCheckTarget, this);
e->addSocketForWriteCheck(socket, getUuid()); e->addSocketForWriteCheck(socket, this);
writeCheckTarget = socket; writeCheckTarget = socket;
} }
} else { } else {
e->addSocketForWriteCheck(socket, getUuid()); e->addSocketForWriteCheck(socket, this);
checkSocketIsWritable = true; checkSocketIsWritable = true;
writeCheckTarget = socket; writeCheckTarget = socket;
} }

View File

@ -45,6 +45,7 @@ void FeatureConfigTest::testGetConfigurationSummary() {
+"ftp: yes\n" +"ftp: yes\n"
+"bittorrent: yes\n" +"bittorrent: yes\n"
+"metalink: yes\n" +"metalink: yes\n"
+"message digest: yes\n", +"message digest: yes\n"
+"async dns: yes\n",
FeatureConfig::getInstance()->getConfigurationSummary()); FeatureConfig::getInstance()->getConfigurationSummary());
} }