2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

* src/PeerAbstractCommand.h
	(beforeSocketCheck): Removed.
	* src/PeerAbstractCommand.cc
	Modified in order to call executeInternal() even if socket check
	and upload limit check fail.
	* src/PeerInteractionCommand.h
	(keepAlive): Removed.
	(sendKeepAlive): New function.
	(checkHave): New function.
	(beforeSocketCheck): Removed.
	* src/PeerInteractionCommand.cc
	(executeInternal): Use peerInteraction->checkRequestSlot(). 
Added
	calls to checkHave() and sendKeepAlive().
	(keepAlive): Renamed to sendKeepAlive().
	(sendKeepAlive): New function.
	(beforeSocketCheck): Removed.
	(checkHave): New function.
	* src/BitfieldMan.cc
	(getMissingIndex): Don't call getMissingIndexRandomly() if max 
is 0.
	(getMissingUnusedIndex): Don't call getMissingIndexRandomly() if 
max is
	0.
	(getMissingIndex): Dont't call getMissingIndexRandomly() if max 
is 0.
	* src/TorrentMan.h
	(UsedPieces): Removed.
	(Pieces): New type definition.
	* src/Piece.h: Updated doc.
	* src/Peer.h
	(totalLength): Removed.
	* src/Peer.cc
	(updateLatency): Fixed the latency calculation.
	* src/TorrentMan.cc
	(addPeer): Call deleteOldErrorPeers() only if peers.size() is 
higher
	than or equal to MAX_PEER_LIST_SIZE.
	If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
	then return false.
	(deleteOldErrorPeers): Rewritten.
	(deleteUsedPiece): Fixed the miss use of STL remove.
	* src/PeerInteraction.h
	(Pieces): Removed.
	(deleteTimeoutRequestSlot): Removed.
	(deleteCompletedRequestSlot): Removed.
	(checkRequestSlot): New function.
	* src/PeerInteraction.cc
	(deleteTimeoutRequestSlot): Merged to checkRequestSlot().
	(deleteCompletedRequestSlot): Merged to checkRequestSlot().
	(checkRequestSlot): New function.
	* src/DownloadEngine.cc
	(run): Clear activeSockets before calling waitData().
	(waitData): Removed a call to activeSockets.clear().
pull/1/head
Tatsuhiro Tsujikawa 2006-05-26 15:28:19 +00:00
parent b72c6805e4
commit ca5e332df9
26 changed files with 374 additions and 334 deletions

View File

@ -1,3 +1,55 @@
2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/PeerAbstractCommand.h
(beforeSocketCheck): Removed.
* src/PeerAbstractCommand.cc
Modified in order to call executeInternal() even if socket check
and upload limit check fail.
* src/PeerInteractionCommand.h
(keepAlive): Removed.
(sendKeepAlive): New function.
(checkHave): New function.
(beforeSocketCheck): Removed.
* src/PeerInteractionCommand.cc
(executeInternal): Use peerInteraction->checkRequestSlot(). Added
calls to checkHave() and sendKeepAlive().
(keepAlive): Renamed to sendKeepAlive().
(sendKeepAlive): New function.
(beforeSocketCheck): Removed.
(checkHave): New function.
* src/BitfieldMan.cc
(getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
(getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
0.
(getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
* src/TorrentMan.h
(UsedPieces): Removed.
(Pieces): New type definition.
* src/Piece.h: Updated doc.
* src/Peer.h
(totalLength): Removed.
* src/Peer.cc
(updateLatency): Fixed the latency calculation.
* src/TorrentMan.cc
(addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
than or equal to MAX_PEER_LIST_SIZE.
If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
then return false.
(deleteOldErrorPeers): Rewritten.
(deleteUsedPiece): Fixed the miss use of STL remove.
* src/PeerInteraction.h
(Pieces): Removed.
(deleteTimeoutRequestSlot): Removed.
(deleteCompletedRequestSlot): Removed.
(checkRequestSlot): New function.
* src/PeerInteraction.cc
(deleteTimeoutRequestSlot): Merged to checkRequestSlot().
(deleteCompletedRequestSlot): Merged to checkRequestSlot().
(checkRequestSlot): New function.
* src/DownloadEngine.cc
(run): Clear activeSockets before calling waitData().
(waitData): Removed a call to activeSockets.clear().
2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To attempt to handle EINTR: To attempt to handle EINTR:

2
README
View File

@ -20,7 +20,7 @@ aria2 is in very early development stage. Currently it has following features:
* Segmented download * Segmented download
* Cookie support(currently aria2 ignores "expires") * Cookie support(currently aria2 ignores "expires")
* It can run as a daemon process. * It can run as a daemon process.
* BitTorrent protocol support * BitTorrent protocol support with fast extension.
* Selective download in multi-file torrent * Selective download in multi-file torrent
3. How to build 3. How to build

3
TODO
View File

@ -15,6 +15,3 @@
* Add Message stream encryption support * Add Message stream encryption support
* Add announce-list support * Add announce-list support
* Refacturing HttpConnection and FtpConnection * Refacturing HttpConnection and FtpConnection
* HTTP/FTP downloading regression test
* Fast extension test
* compile test(OpenSSL, non-ssl, non-torrent)

21
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.4.2. # Generated by GNU Autoconf 2.59 for aria2c 0.5.0.
# #
# 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.4.2' PACKAGE_VERSION='0.5.0'
PACKAGE_STRING='aria2c 0.4.2' PACKAGE_STRING='aria2c 0.5.0'
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.4.2 to adapt to many kinds of systems. \`configure' configures aria2c 0.5.0 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.4.2:";; short | recursive ) echo "Configuration of aria2c 0.5.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -994,7 +994,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.4.2 aria2c configure 0.5.0
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.
@ -1008,7 +1008,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.4.2, which was It was created by aria2c $as_me 0.5.0, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@ -1651,7 +1651,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='aria2c' PACKAGE='aria2c'
VERSION='0.4.2' VERSION='0.5.0'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -1917,7 +1917,6 @@ localedir=${datadir}/locale
# Checks for arguments. # Checks for arguments.
#AC_ARG_ENABLE([ssl], [ --enable-ssl enalbe SSL support if libssl is installed. Default: yes], [enable_ssl=$enableval], [enable_ssl=yes])
# Check whether --with-gnutls or --without-gnutls was given. # Check whether --with-gnutls or --without-gnutls was given.
if test "${with_gnutls+set}" = set; then if test "${with_gnutls+set}" = set; then
@ -11529,7 +11528,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by aria2c $as_me 0.4.2, which was This file was extended by aria2c $as_me 0.5.0, 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
@ -11592,7 +11591,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
aria2c config.status 0.4.2 aria2c config.status 0.5.0
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.4.2, tujikawa@rednoah.com) AC_INIT(aria2c, 0.5.0, 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])
@ -13,7 +13,6 @@ localedir=${datadir}/locale
AC_SUBST(localedir) AC_SUBST(localedir)
# Checks for arguments. # Checks for arguments.
#AC_ARG_ENABLE([ssl], [ --enable-ssl enalbe SSL support if libssl is installed. Default: yes], [enable_ssl=$enableval], [enable_ssl=yes])
AC_ARG_WITH([gnutls], [ --with-gnutls use gnutls library if installed. Default: yes], [with_gnutls=$enableval], [with_gnutls=yes]) AC_ARG_WITH([gnutls], [ --with-gnutls use gnutls library if installed. Default: yes], [with_gnutls=$enableval], [with_gnutls=yes])
AC_ARG_WITH([openssl], [ --with-openssl use openssl library if installed. Default: yes], [with_openssl=$enableval], [with_openssl=yes]) AC_ARG_WITH([openssl], [ --with-openssl use openssl library if installed. Default: yes], [with_openssl=$enableval], [with_openssl=yes])

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.4.2 VERSION = 0.5.0
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-05-10 00:53+0900\n" "POT-Creation-Date: 2006-05-27 00:27+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"
@ -342,26 +342,26 @@ msgid ""
"The download was not complete because of errors. Check the log.\n" "The download was not complete because of errors. Check the log.\n"
msgstr "" msgstr ""
#: src/main.cc:88 src/main.cc:99 #: src/main.cc:88
msgid "" msgid ""
"\n" "\n"
"stopping application...\n" "stopping application...\n"
msgstr "" msgstr ""
#: src/main.cc:94 src/main.cc:111 #: src/main.cc:94
msgid "done\n" msgid "done\n"
msgstr "" msgstr ""
#: src/main.cc:122 #: src/main.cc:125
#, c-format #, c-format
msgid "Unrecognized URL or unsupported protocol: %s\n" msgid "Unrecognized URL or unsupported protocol: %s\n"
msgstr "" msgstr ""
#: src/main.cc:128 #: src/main.cc:131
msgid " version " msgid " version "
msgstr "" msgstr ""
#: src/main.cc:132 #: src/main.cc:135
msgid "" msgid ""
"This program is free software; you can redistribute it and/or modify\n" "This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n" "it under the terms of the GNU General Public License as published by\n"
@ -378,45 +378,45 @@ msgid ""
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
msgstr "" msgstr ""
#: src/main.cc:146 #: src/main.cc:149
#, c-format #, c-format
msgid "Contact Info: %s\n" msgid "Contact Info: %s\n"
msgstr "" msgstr ""
#: src/main.cc:152 #: src/main.cc:155
#, c-format #, c-format
msgid "Usage: %s [options] URL ...\n" msgid "Usage: %s [options] URL ...\n"
msgstr "" msgstr ""
#: src/main.cc:154 #: src/main.cc:157
#, c-format #, c-format
msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgid " %s [options] -T TORRENT_FILE FILE ...\n"
msgstr "" msgstr ""
#: src/main.cc:157 #: src/main.cc:160
msgid "Options:" msgid "Options:"
msgstr "" msgstr ""
#: src/main.cc:158 #: src/main.cc:161
msgid " -d, --dir=DIR The directory to store downloaded file." msgid " -d, --dir=DIR The directory to store downloaded file."
msgstr "" msgstr ""
#: src/main.cc:159 #: src/main.cc:162
msgid " -o, --out=FILE The file name for downloaded file." msgid " -o, --out=FILE The file name for downloaded file."
msgstr "" msgstr ""
#: src/main.cc:160 #: src/main.cc:163
msgid "" msgid ""
" -l, --log=LOG The file path to store log. If '-' is " " -l, --log=LOG The file path to store log. If '-' is "
"specified,\n" "specified,\n"
" log is written to stdout." " log is written to stdout."
msgstr "" msgstr ""
#: src/main.cc:162 #: src/main.cc:165
msgid " -D, --daemon Run as daemon." msgid " -D, --daemon Run as daemon."
msgstr "" msgstr ""
#: src/main.cc:163 #: src/main.cc:166
msgid "" msgid ""
" -s, --split=N Download a file using N connections. N must " " -s, --split=N Download a file using N connections. N must "
"be\n" "be\n"
@ -426,24 +426,24 @@ msgid ""
" N connections." " N connections."
msgstr "" msgstr ""
#: src/main.cc:167 #: src/main.cc:170
msgid "" msgid ""
" --retry-wait=SEC Set amount of time in second between requests\n" " --retry-wait=SEC Set amount of time in second between requests\n"
" for errors. Specify a value between 0 and 60.\n" " for errors. Specify a value between 0 and 60.\n"
" Default: 5" " Default: 5"
msgstr "" msgstr ""
#: src/main.cc:170 #: src/main.cc:173
msgid " -t, --timeout=SEC Set timeout in second. Default: 60" msgid " -t, --timeout=SEC Set timeout in second. Default: 60"
msgstr "" msgstr ""
#: src/main.cc:171 #: src/main.cc:174
msgid "" msgid ""
" -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
" Default: 5" " Default: 5"
msgstr "" msgstr ""
#: src/main.cc:173 #: src/main.cc:176
msgid "" msgid ""
" --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n" " --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n"
" K or M(1K = 1024, 1M = 1024K). This\n" " K or M(1K = 1024, 1M = 1024K). This\n"
@ -451,40 +451,40 @@ msgid ""
" 1024." " 1024."
msgstr "" msgstr ""
#: src/main.cc:177 #: src/main.cc:180
msgid "" msgid ""
" --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n"
" URLs." " URLs."
msgstr "" msgstr ""
#: src/main.cc:179 #: src/main.cc:182
msgid " --http-user=USER Set HTTP user. This affects to all URLs." msgid " --http-user=USER Set HTTP user. This affects to all URLs."
msgstr "" msgstr ""
#: src/main.cc:180 #: src/main.cc:183
msgid "" msgid ""
" --http-passwd=PASSWD Set HTTP password. This affects to all URLs." " --http-passwd=PASSWD Set HTTP password. This affects to all URLs."
msgstr "" msgstr ""
#: src/main.cc:181 #: src/main.cc:184
msgid "" msgid ""
" --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs" " --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs"
msgstr "" msgstr ""
#: src/main.cc:182 #: src/main.cc:185
msgid "" msgid ""
" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all " " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all "
"URLs." "URLs."
msgstr "" msgstr ""
#: src/main.cc:183 #: src/main.cc:186
msgid "" msgid ""
" --http-proxy-method=METHOD Set the method to use in proxy request.\n" " --http-proxy-method=METHOD Set the method to use in proxy request.\n"
" METHOD is either 'get' or 'tunnel'.\n" " METHOD is either 'get' or 'tunnel'.\n"
" Default: tunnel" " Default: tunnel"
msgstr "" msgstr ""
#: src/main.cc:186 #: src/main.cc:189
msgid "" msgid ""
" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, "
"basic\n" "basic\n"
@ -492,23 +492,23 @@ msgid ""
" Default: basic" " Default: basic"
msgstr "" msgstr ""
#: src/main.cc:189 #: src/main.cc:192
msgid " --referer=REFERER Set Referer. This affects to all URLs." msgid " --referer=REFERER Set Referer. This affects to all URLs."
msgstr "" msgstr ""
#: src/main.cc:190 #: src/main.cc:193
msgid "" msgid ""
" --ftp-user=USER Set FTP user. This affects to all URLs.\n" " --ftp-user=USER Set FTP user. This affects to all URLs.\n"
" Default: anonymous" " Default: anonymous"
msgstr "" msgstr ""
#: src/main.cc:192 #: src/main.cc:195
msgid "" msgid ""
" --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n" " --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n"
" Default: ARIA2USER@" " Default: ARIA2USER@"
msgstr "" msgstr ""
#: src/main.cc:194 #: src/main.cc:197
msgid "" msgid ""
" --ftp-type=TYPE Set FTP transfer type. TYPE is either " " --ftp-type=TYPE Set FTP transfer type. TYPE is either "
"'binary'\n" "'binary'\n"
@ -516,11 +516,11 @@ msgid ""
" Default: binary" " Default: binary"
msgstr "" msgstr ""
#: src/main.cc:197 #: src/main.cc:200
msgid " -p, --ftp-pasv Use passive mode in FTP." msgid " -p, --ftp-pasv Use passive mode in FTP."
msgstr "" msgstr ""
#: src/main.cc:198 #: src/main.cc:201
msgid "" msgid ""
" --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' "
"or\n" "or\n"
@ -528,11 +528,11 @@ msgid ""
" Default: tunnel" " Default: tunnel"
msgstr "" msgstr ""
#: src/main.cc:202 #: src/main.cc:205
msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file." msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file."
msgstr "" msgstr ""
#: src/main.cc:203 #: src/main.cc:206
msgid "" msgid ""
" --follow-torrent=true|false Setting this option to false prevents aria2 " " --follow-torrent=true|false Setting this option to false prevents aria2 "
"to\n" "to\n"
@ -541,25 +541,25 @@ msgid ""
" Default: true" " Default: true"
msgstr "" msgstr ""
#: src/main.cc:207 #: src/main.cc:210
msgid "" msgid ""
" -S, --show-files Print file listing of .torrent file and exit." " -S, --show-files Print file listing of .torrent file and exit."
msgstr "" msgstr ""
#: src/main.cc:208 #: src/main.cc:211
msgid "" msgid ""
" --direct-file-mapping=true|false Directly read from and write to each file\n" " --direct-file-mapping=true|false Directly read from and write to each file\n"
" mentioned in .torrent file.\n" " mentioned in .torrent file.\n"
" Default: true" " Default: true"
msgstr "" msgstr ""
#: src/main.cc:211 #: src/main.cc:214
msgid "" msgid ""
" --listen-port=PORT Set port number to listen to for peer " " --listen-port=PORT Set port number to listen to for peer "
"connection." "connection."
msgstr "" msgstr ""
#: src/main.cc:212 #: src/main.cc:215
msgid "" msgid ""
" --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries " " --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries "
"to\n" "to\n"
@ -567,7 +567,7 @@ msgid ""
"unlimited." "unlimited."
msgstr "" msgstr ""
#: src/main.cc:214 #: src/main.cc:217
msgid "" msgid ""
" --select-file=INDEX... Set file to download by specifing its index.\n" " --select-file=INDEX... Set file to download by specifing its index.\n"
" You can know file index through --show-files\n" " You can know file index through --show-files\n"
@ -579,135 +579,135 @@ msgid ""
" ',' and '-' can be used together." " ',' and '-' can be used together."
msgstr "" msgstr ""
#: src/main.cc:221 #: src/main.cc:224
msgid " -v, --version Print the version number and exit." msgid " -v, --version Print the version number and exit."
msgstr "" msgstr ""
#: src/main.cc:222 #: src/main.cc:225
msgid " -h, --help Print this message and exit." msgid " -h, --help Print this message and exit."
msgstr "" msgstr ""
#: src/main.cc:225 #: src/main.cc:228
msgid "" msgid ""
" You can specify multiple URLs. All URLs must point to the same file\n" " You can specify multiple URLs. All URLs must point to the same file\n"
" or downloading fails." " or downloading fails."
msgstr "" msgstr ""
#: src/main.cc:230 #: src/main.cc:233
msgid "" msgid ""
" Specify files in multi-file torrent to download. Use conjunction with\n" " Specify files in multi-file torrent to download. Use conjunction with\n"
" -T option. This arguments are ignored if you specify --select-file option." " -T option. This arguments are ignored if you specify --select-file option."
msgstr "" msgstr ""
#: src/main.cc:234 #: src/main.cc:237
msgid "Examples:" msgid "Examples:"
msgstr "" msgstr ""
#: src/main.cc:235 #: src/main.cc:238
msgid " Download a file by 1 connection:" msgid " Download a file by 1 connection:"
msgstr "" msgstr ""
#: src/main.cc:237 #: src/main.cc:240
msgid " Download a file by 2 connections:" msgid " Download a file by 2 connections:"
msgstr "" msgstr ""
#: src/main.cc:239 #: src/main.cc:242
msgid " Download a file by 2 connections, each connects to a different server:" msgid " Download a file by 2 connections, each connects to a different server:"
msgstr "" msgstr ""
#: src/main.cc:241 #: src/main.cc:244
msgid " You can mix up different protocols:" msgid " You can mix up different protocols:"
msgstr "" msgstr ""
#: src/main.cc:244 #: src/main.cc:247
msgid " Download a torrent:" msgid " Download a torrent:"
msgstr "" msgstr ""
#: src/main.cc:246 #: src/main.cc:249
msgid " Download a torrent using local .torrent file:" msgid " Download a torrent using local .torrent file:"
msgstr "" msgstr ""
#: src/main.cc:248 #: src/main.cc:251
msgid " Download only selected files:" msgid " Download only selected files:"
msgstr "" msgstr ""
#: src/main.cc:250 #: src/main.cc:253
msgid " Print file listing of .torrent file:" msgid " Print file listing of .torrent file:"
msgstr "" msgstr ""
#: src/main.cc:254 #: src/main.cc:257
#, c-format #, c-format
msgid "Report bugs to %s" msgid "Report bugs to %s"
msgstr "" msgstr ""
#: src/main.cc:350 #: src/main.cc:353
msgid "unrecognized proxy format" msgid "unrecognized proxy format"
msgstr "" msgstr ""
#: src/main.cc:377 #: src/main.cc:380
msgid "Currently, supported authentication scheme is basic." msgid "Currently, supported authentication scheme is basic."
msgstr "" msgstr ""
#: src/main.cc:386 #: src/main.cc:389
msgid "retry-wait must be between 0 and 60." msgid "retry-wait must be between 0 and 60."
msgstr "" msgstr ""
#: src/main.cc:403 #: src/main.cc:406
msgid "ftp-type must be either 'binary' or 'ascii'." msgid "ftp-type must be either 'binary' or 'ascii'."
msgstr "" msgstr ""
#: src/main.cc:412 #: src/main.cc:415
msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'." msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'."
msgstr "" msgstr ""
#: src/main.cc:430 #: src/main.cc:433
msgid "min-segment-size invalid" msgid "min-segment-size invalid"
msgstr "" msgstr ""
#: src/main.cc:441 #: src/main.cc:444
msgid "http-proxy-method must be either 'get' or 'tunnel'." msgid "http-proxy-method must be either 'get' or 'tunnel'."
msgstr "" msgstr ""
#: src/main.cc:449 #: src/main.cc:452
msgid "listen-port must be between 1024 and 65535." msgid "listen-port must be between 1024 and 65535."
msgstr "" msgstr ""
#: src/main.cc:460 #: src/main.cc:463
msgid "follow-torrent must be either 'true' or 'false'." msgid "follow-torrent must be either 'true' or 'false'."
msgstr "" msgstr ""
#: src/main.cc:474 #: src/main.cc:477
msgid "direct-file-mapping must be either 'true' or 'false'." msgid "direct-file-mapping must be either 'true' or 'false'."
msgstr "" msgstr ""
#: src/main.cc:482 #: src/main.cc:485
msgid "upload-limit must be greater than or equal to 0." msgid "upload-limit must be greater than or equal to 0."
msgstr "" msgstr ""
#: src/main.cc:514 #: src/main.cc:517
msgid "split must be between 1 and 5." msgid "split must be between 1 and 5."
msgstr "" msgstr ""
#: src/main.cc:524 #: src/main.cc:527
msgid "timeout must be between 1 and 600" msgid "timeout must be between 1 and 600"
msgstr "" msgstr ""
#: src/main.cc:533 #: src/main.cc:536
msgid "max-tries invalid" msgid "max-tries invalid"
msgstr "" msgstr ""
#: src/main.cc:562 #: src/main.cc:565
msgid "specify at least one URL" msgid "specify at least one URL"
msgstr "" msgstr ""
#: src/main.cc:569 #: src/main.cc:572
msgid "daemon failed" msgid "daemon failed"
msgstr "" msgstr ""
#: src/main.cc:670 #: src/main.cc:673
msgid "Files:" msgid "Files:"
msgstr "" msgstr ""
#: src/main.cc:701 #: src/main.cc:704
msgid "Errors occurred while binding port.\n" msgid "Errors occurred while binding port.\n"
msgstr "" msgstr ""

BIN
po/de.gmo

Binary file not shown.

142
po/de.po
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-05-10 00:53+0900\n" "POT-Creation-Date: 2006-05-27 00:27+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"
@ -355,7 +355,7 @@ 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"
#: src/main.cc:88 src/main.cc:99 #: src/main.cc:88
msgid "" msgid ""
"\n" "\n"
"stopping application...\n" "stopping application...\n"
@ -363,20 +363,20 @@ msgstr ""
"\n" "\n"
"Anwendung wird gestoppt ...\n" "Anwendung wird gestoppt ...\n"
#: src/main.cc:94 src/main.cc:111 #: src/main.cc:94
msgid "done\n" msgid "done\n"
msgstr "erledigt\n" msgstr "erledigt\n"
#: src/main.cc:122 #: src/main.cc:125
#, c-format #, c-format
msgid "Unrecognized URL or unsupported protocol: %s\n" msgid "Unrecognized URL or unsupported protocol: %s\n"
msgstr "URL nicht erkannt oder nicht unterstütztes Protokoll: %s\n" msgstr "URL nicht erkannt oder nicht unterstütztes Protokoll: %s\n"
#: src/main.cc:128 #: src/main.cc:131
msgid " version " msgid " version "
msgstr " Version " msgstr " Version "
#: src/main.cc:132 #: src/main.cc:135
msgid "" msgid ""
"This program is free software; you can redistribute it and/or modify\n" "This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n" "it under the terms of the GNU General Public License as published by\n"
@ -406,36 +406,36 @@ msgstr ""
"along with this program; if not, write to the Free Software\n" "along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
#: src/main.cc:146 #: src/main.cc:149
#, c-format #, c-format
msgid "Contact Info: %s\n" msgid "Contact Info: %s\n"
msgstr "Kontakt-Info: %s\n" msgstr "Kontakt-Info: %s\n"
#: src/main.cc:152 #: src/main.cc:155
#, c-format #, c-format
msgid "Usage: %s [options] URL ...\n" msgid "Usage: %s [options] URL ...\n"
msgstr "Aufruf: %s [Optionen] URL ...\n" msgstr "Aufruf: %s [Optionen] URL ...\n"
#: src/main.cc:154 #: src/main.cc:157
#, c-format #, c-format
msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgid " %s [options] -T TORRENT_FILE FILE ...\n"
msgstr " %s [Optionen] -T TORRENT_FILE FILE ...\n" msgstr " %s [Optionen] -T TORRENT_FILE FILE ...\n"
#: src/main.cc:157 #: src/main.cc:160
msgid "Options:" msgid "Options:"
msgstr "Optionen:" msgstr "Optionen:"
#: src/main.cc:158 #: src/main.cc:161
msgid " -d, --dir=DIR The directory to store downloaded file." msgid " -d, --dir=DIR The directory to store downloaded file."
msgstr "" msgstr ""
" -d, --dir=DIR Verzeichnis zum Speichern der abgerufenen " " -d, --dir=DIR Verzeichnis zum Speichern der abgerufenen "
"Datei." "Datei."
#: src/main.cc:159 #: src/main.cc:162
msgid " -o, --out=FILE The file name for downloaded file." msgid " -o, --out=FILE The file name for downloaded file."
msgstr " -o, --out=FILE Dateiname für die abgerufene Datei." msgstr " -o, --out=FILE Dateiname für die abgerufene Datei."
#: src/main.cc:160 #: src/main.cc:163
msgid "" msgid ""
" -l, --log=LOG The file path to store log. If '-' is " " -l, --log=LOG The file path to store log. If '-' is "
"specified,\n" "specified,\n"
@ -446,11 +446,11 @@ msgstr ""
" wird das Log auf die Standardausgabe " " wird das Log auf die Standardausgabe "
"geschrieben." "geschrieben."
#: src/main.cc:162 #: src/main.cc:165
msgid " -D, --daemon Run as daemon." msgid " -D, --daemon Run as daemon."
msgstr " -D, --daemon Start als Daemon-Prozeß." msgstr " -D, --daemon Start als Daemon-Prozeß."
#: src/main.cc:163 #: src/main.cc:166
msgid "" msgid ""
" -s, --split=N Download a file using N connections. N must " " -s, --split=N Download a file using N connections. N must "
"be\n" "be\n"
@ -466,7 +466,7 @@ msgstr ""
" Daher verbindet sich aria2 zu jeder URL mit\n" " Daher verbindet sich aria2 zu jeder URL mit\n"
" N Verbindungen." " N Verbindungen."
#: src/main.cc:167 #: src/main.cc:170
msgid "" msgid ""
" --retry-wait=SEC Set amount of time in second between requests\n" " --retry-wait=SEC Set amount of time in second between requests\n"
" for errors. Specify a value between 0 and 60.\n" " for errors. Specify a value between 0 and 60.\n"
@ -478,12 +478,12 @@ msgstr ""
"und 60 an.\n" "und 60 an.\n"
" Fehlwert: 5" " Fehlwert: 5"
#: src/main.cc:170 #: src/main.cc:173
msgid " -t, --timeout=SEC Set timeout in second. Default: 60" msgid " -t, --timeout=SEC Set timeout in second. Default: 60"
msgstr "" msgstr ""
" -t, --timeout=SEC Setzt Wartezeit in Sekunden. Fehlwert: 60" " -t, --timeout=SEC Setzt Wartezeit in Sekunden. Fehlwert: 60"
#: src/main.cc:171 #: src/main.cc:174
msgid "" msgid ""
" -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
" Default: 5" " Default: 5"
@ -491,7 +491,7 @@ msgstr ""
" -m, --max-tries=N Anzahl Versuche. 0 bedeutet unbegrenzt.\n" " -m, --max-tries=N Anzahl Versuche. 0 bedeutet unbegrenzt.\n"
" Fehlwert: 5" " Fehlwert: 5"
#: src/main.cc:173 #: src/main.cc:176
msgid "" msgid ""
" --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n" " --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n"
" K or M(1K = 1024, 1M = 1024K). This\n" " K or M(1K = 1024, 1M = 1024K). This\n"
@ -504,7 +504,7 @@ msgstr ""
" Wert muss größer oder gleich \n" " Wert muss größer oder gleich \n"
" 1024 sein." " 1024 sein."
#: src/main.cc:177 #: src/main.cc:180
msgid "" msgid ""
" --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n"
" URLs." " URLs."
@ -512,26 +512,26 @@ msgstr ""
" --http-proxy=HOST:PORT HTTP-Proxyserver benutzen. Dies betrifft alle\n" " --http-proxy=HOST:PORT HTTP-Proxyserver benutzen. Dies betrifft alle\n"
" URLs." " URLs."
#: src/main.cc:179 #: src/main.cc:182
msgid " --http-user=USER Set HTTP user. This affects to all URLs." msgid " --http-user=USER Set HTTP user. This affects to all URLs."
msgstr "" msgstr ""
" --http-user=USER HTTP-Anwendername angeben. Dies betrifft alle " " --http-user=USER HTTP-Anwendername angeben. Dies betrifft alle "
"URLs." "URLs."
#: src/main.cc:180 #: src/main.cc:183
msgid "" msgid ""
" --http-passwd=PASSWD Set HTTP password. This affects to all URLs." " --http-passwd=PASSWD Set HTTP password. This affects to all URLs."
msgstr "" msgstr ""
" --http-passwd=PASSWD HTTP-Passwort setzen. Dies betrifft alle URLs." " --http-passwd=PASSWD HTTP-Passwort setzen. Dies betrifft alle URLs."
#: src/main.cc:181 #: src/main.cc:184
msgid "" msgid ""
" --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs" " --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs"
msgstr "" msgstr ""
" --http-proxy-user=USER HTTP-Proxy-Anwender setzen. Dies betrifft alle " " --http-proxy-user=USER HTTP-Proxy-Anwender setzen. Dies betrifft alle "
"URLs." "URLs."
#: src/main.cc:182 #: src/main.cc:185
msgid "" msgid ""
" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all " " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all "
"URLs." "URLs."
@ -539,7 +539,7 @@ msgstr ""
" --http-proxy-passwd=PASSWD HTTP-Proxy-Passwort setzen. Dies betrifft alle " " --http-proxy-passwd=PASSWD HTTP-Proxy-Passwort setzen. Dies betrifft alle "
"URLs." "URLs."
#: src/main.cc:183 #: src/main.cc:186
msgid "" msgid ""
" --http-proxy-method=METHOD Set the method to use in proxy request.\n" " --http-proxy-method=METHOD Set the method to use in proxy request.\n"
" METHOD is either 'get' or 'tunnel'.\n" " METHOD is either 'get' or 'tunnel'.\n"
@ -550,7 +550,7 @@ msgstr ""
" METHOD ist entweder 'get' oder 'tunnel'.\n" " METHOD ist entweder 'get' oder 'tunnel'.\n"
" Fehlwert: tunnel" " Fehlwert: tunnel"
#: src/main.cc:186 #: src/main.cc:189
msgid "" msgid ""
" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, "
"basic\n" "basic\n"
@ -562,11 +562,11 @@ msgstr ""
" das einzig zulässige Schema.\n" " das einzig zulässige Schema.\n"
" Fehlwert: basic" " Fehlwert: basic"
#: src/main.cc:189 #: src/main.cc:192
msgid " --referer=REFERER Set Referer. This affects to all URLs." msgid " --referer=REFERER Set Referer. This affects to all URLs."
msgstr " --referer=REFERER Referer setzen. Dies betrifft alle URLs." msgstr " --referer=REFERER Referer setzen. Dies betrifft alle URLs."
#: src/main.cc:190 #: src/main.cc:193
msgid "" msgid ""
" --ftp-user=USER Set FTP user. This affects to all URLs.\n" " --ftp-user=USER Set FTP user. This affects to all URLs.\n"
" Default: anonymous" " Default: anonymous"
@ -574,7 +574,7 @@ msgstr ""
" --ftp-user=USER FTP-Anwender setzen. Dies betrifft alle URLs.\n" " --ftp-user=USER FTP-Anwender setzen. Dies betrifft alle URLs.\n"
" Fehlwert: anonymous" " Fehlwert: anonymous"
#: src/main.cc:192 #: src/main.cc:195
msgid "" msgid ""
" --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n" " --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n"
" Default: ARIA2USER@" " Default: ARIA2USER@"
@ -582,7 +582,7 @@ msgstr ""
" --ftp-passwd=PASSWD FTP-Passwort setzen. Dies betrifft alle URLs.\n" " --ftp-passwd=PASSWD FTP-Passwort setzen. Dies betrifft alle URLs.\n"
" Fehlwert: ARIA2USER@" " Fehlwert: ARIA2USER@"
#: src/main.cc:194 #: src/main.cc:197
msgid "" msgid ""
" --ftp-type=TYPE Set FTP transfer type. TYPE is either " " --ftp-type=TYPE Set FTP transfer type. TYPE is either "
"'binary'\n" "'binary'\n"
@ -594,11 +594,11 @@ msgstr ""
" oder 'ascii'.\n" " oder 'ascii'.\n"
" Fehlwert: binary" " Fehlwert: binary"
#: src/main.cc:197 #: src/main.cc:200
msgid " -p, --ftp-pasv Use passive mode in FTP." msgid " -p, --ftp-pasv Use passive mode in FTP."
msgstr " -p, --ftp-pasv Passiv-Modus für FTP benutzen." msgstr " -p, --ftp-pasv Passiv-Modus für FTP benutzen."
#: src/main.cc:198 #: src/main.cc:201
msgid "" msgid ""
" --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' "
"or\n" "or\n"
@ -610,11 +610,11 @@ msgstr ""
" 'tunnel'.\n" " 'tunnel'.\n"
" Fehlwert: tunnel" " Fehlwert: tunnel"
#: src/main.cc:202 #: src/main.cc:205
msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file." msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file."
msgstr " -T, --torrent-file=TORRENT_FILE Datenpfad zur torrent-Datei." msgstr " -T, --torrent-file=TORRENT_FILE Datenpfad zur torrent-Datei."
#: src/main.cc:203 #: src/main.cc:206
msgid "" msgid ""
" --follow-torrent=true|false Setting this option to false prevents aria2 " " --follow-torrent=true|false Setting this option to false prevents aria2 "
"to\n" "to\n"
@ -629,14 +629,14 @@ msgstr ""
" auf .torrent endet.\n" " auf .torrent endet.\n"
" Fehlwert: true" " Fehlwert: true"
#: src/main.cc:207 #: src/main.cc:210
msgid "" msgid ""
" -S, --show-files Print file listing of .torrent file and exit." " -S, --show-files Print file listing of .torrent file and exit."
msgstr "" msgstr ""
" -S, --show-files Dateiliste der .torrent-Datei ausgeben und " " -S, --show-files Dateiliste der .torrent-Datei ausgeben und "
"beenden." "beenden."
#: src/main.cc:208 #: src/main.cc:211
msgid "" msgid ""
" --direct-file-mapping=true|false Directly read from and write to each file\n" " --direct-file-mapping=true|false Directly read from and write to each file\n"
" mentioned in .torrent file.\n" " mentioned in .torrent file.\n"
@ -646,7 +646,7 @@ msgstr ""
" .torrent-Datei erwähnten Datei.\n" " .torrent-Datei erwähnten Datei.\n"
" Fehlwert: true" " Fehlwert: true"
#: src/main.cc:211 #: src/main.cc:214
msgid "" msgid ""
" --listen-port=PORT Set port number to listen to for peer " " --listen-port=PORT Set port number to listen to for peer "
"connection." "connection."
@ -654,7 +654,7 @@ msgstr ""
" --listen-port=PORT Port-Nummer zum Lauschen auf Peer-Verbindungen " " --listen-port=PORT Port-Nummer zum Lauschen auf Peer-Verbindungen "
"setzen." "setzen."
#: src/main.cc:212 #: src/main.cc:215
msgid "" msgid ""
" --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries " " --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries "
"to\n" "to\n"
@ -666,7 +666,7 @@ msgstr ""
" Sendegeschwindigkeit unter SPEED zu halten. 0 " " Sendegeschwindigkeit unter SPEED zu halten. 0 "
"bedeutet keine Begrenzung." "bedeutet keine Begrenzung."
#: src/main.cc:214 #: src/main.cc:217
msgid "" msgid ""
" --select-file=INDEX... Set file to download by specifing its index.\n" " --select-file=INDEX... Set file to download by specifing its index.\n"
" You can know file index through --show-files\n" " You can know file index through --show-files\n"
@ -686,15 +686,15 @@ msgstr ""
" Sie können auch '-' verwenden wie in \"1-5\".\n" " Sie können auch '-' verwenden wie in \"1-5\".\n"
" ',' und '-' können zusammen benutzt werden." " ',' und '-' können zusammen benutzt werden."
#: src/main.cc:221 #: src/main.cc:224
msgid " -v, --version Print the version number and exit." msgid " -v, --version Print the version number and exit."
msgstr " -v, --version Versionsnummer ausgeben und beenden." msgstr " -v, --version Versionsnummer ausgeben und beenden."
#: src/main.cc:222 #: src/main.cc:225
msgid " -h, --help Print this message and exit." msgid " -h, --help Print this message and exit."
msgstr " -h, --help Diese Anzeige ausgeben und beenden." msgstr " -h, --help Diese Anzeige ausgeben und beenden."
#: src/main.cc:225 #: src/main.cc:228
msgid "" msgid ""
" You can specify multiple URLs. All URLs must point to the same file\n" " You can specify multiple URLs. All URLs must point to the same file\n"
" or downloading fails." " or downloading fails."
@ -703,7 +703,7 @@ msgstr ""
"verweisen\n" "verweisen\n"
"oder der Abruf schlägt fehl." "oder der Abruf schlägt fehl."
#: src/main.cc:230 #: src/main.cc:233
msgid "" msgid ""
" Specify files in multi-file torrent to download. Use conjunction with\n" " Specify files in multi-file torrent to download. Use conjunction with\n"
" -T option. This arguments are ignored if you specify --select-file option." " -T option. This arguments are ignored if you specify --select-file option."
@ -713,117 +713,117 @@ msgstr ""
" -T-Option. Diese Argumente werden ignoriert, wenn sie die Option --select-" " -T-Option. Diese Argumente werden ignoriert, wenn sie die Option --select-"
"file angeben." "file angeben."
#: src/main.cc:234 #: src/main.cc:237
msgid "Examples:" msgid "Examples:"
msgstr "Beispiele:" msgstr "Beispiele:"
#: src/main.cc:235 #: src/main.cc:238
msgid " Download a file by 1 connection:" msgid " Download a file by 1 connection:"
msgstr " Abruf einer Datei über 1 Verbindung:" msgstr " Abruf einer Datei über 1 Verbindung:"
#: src/main.cc:237 #: src/main.cc:240
msgid " Download a file by 2 connections:" msgid " Download a file by 2 connections:"
msgstr " Abruf einer Datei mit 2 Verbindungen:" msgstr " Abruf einer Datei mit 2 Verbindungen:"
#: src/main.cc:239 #: src/main.cc:242
msgid " Download a file by 2 connections, each connects to a different server:" msgid " Download a file by 2 connections, each connects to a different server:"
msgstr "" msgstr ""
" Abruf einer Datei über 2 Verbindungen, jede verbindet zu einem anderen " " Abruf einer Datei über 2 Verbindungen, jede verbindet zu einem anderen "
"Server:" "Server:"
#: src/main.cc:241 #: src/main.cc:244
msgid " You can mix up different protocols:" msgid " You can mix up different protocols:"
msgstr " Sie können verschiedene Protokolle mischen:" msgstr " Sie können verschiedene Protokolle mischen:"
#: src/main.cc:244 #: src/main.cc:247
msgid " Download a torrent:" msgid " Download a torrent:"
msgstr " Einen torrent abrufen:" msgstr " Einen torrent abrufen:"
#: src/main.cc:246 #: src/main.cc:249
msgid " Download a torrent using local .torrent file:" msgid " Download a torrent using local .torrent file:"
msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:" msgstr " Einen torrent mit einer lokalen .torrent-Datei abrufen:"
#: src/main.cc:248 #: src/main.cc:251
msgid " Download only selected files:" msgid " Download only selected files:"
msgstr " Nur ausgewählte Dateien abrufen:" msgstr " Nur ausgewählte Dateien abrufen:"
#: src/main.cc:250 #: src/main.cc:253
msgid " Print file listing of .torrent file:" msgid " Print file listing of .torrent file:"
msgstr " Dateiliste einer .torrent-Datei ausgeben:" msgstr " Dateiliste einer .torrent-Datei ausgeben:"
#: src/main.cc:254 #: src/main.cc:257
#, c-format #, c-format
msgid "Report bugs to %s" msgid "Report bugs to %s"
msgstr "Fehler an %s melden" msgstr "Fehler an %s melden"
#: src/main.cc:350 #: src/main.cc:353
msgid "unrecognized proxy format" msgid "unrecognized proxy format"
msgstr "nicht erkanntes Proxy-Format" msgstr "nicht erkanntes Proxy-Format"
#: src/main.cc:377 #: src/main.cc:380
msgid "Currently, supported authentication scheme is basic." msgid "Currently, supported authentication scheme is basic."
msgstr "Derzeit unterstütztes Authentifizierungsschema ist basic." msgstr "Derzeit unterstütztes Authentifizierungsschema ist basic."
#: src/main.cc:386 #: src/main.cc:389
msgid "retry-wait must be between 0 and 60." msgid "retry-wait must be between 0 and 60."
msgstr "retry-wait muss zwischen 0 und 60 liegen." msgstr "retry-wait muss zwischen 0 und 60 liegen."
#: src/main.cc:403 #: src/main.cc:406
msgid "ftp-type must be either 'binary' or 'ascii'." msgid "ftp-type must be either 'binary' or 'ascii'."
msgstr "ftp-type muss entweder 'binary' oder 'ascii' sein." msgstr "ftp-type muss entweder 'binary' oder 'ascii' sein."
#: src/main.cc:412 #: src/main.cc:415
msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'." msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'."
msgstr "ftp-via-http-proxy muss entweder 'get' oder 'tunnel' sein." msgstr "ftp-via-http-proxy muss entweder 'get' oder 'tunnel' sein."
#: src/main.cc:430 #: src/main.cc:433
msgid "min-segment-size invalid" msgid "min-segment-size invalid"
msgstr "min-segment-size ungültig" msgstr "min-segment-size ungültig"
#: src/main.cc:441 #: src/main.cc:444
msgid "http-proxy-method must be either 'get' or 'tunnel'." msgid "http-proxy-method must be either 'get' or 'tunnel'."
msgstr "http-proxy-method muss entweder 'get' oder 'tunnel' sein." msgstr "http-proxy-method muss entweder 'get' oder 'tunnel' sein."
#: src/main.cc:449 #: src/main.cc:452
msgid "listen-port must be between 1024 and 65535." msgid "listen-port must be between 1024 and 65535."
msgstr "listen-port muss zwischen 1024 und 65535 liegen." msgstr "listen-port muss zwischen 1024 und 65535 liegen."
#: src/main.cc:460 #: src/main.cc:463
msgid "follow-torrent must be either 'true' or 'false'." msgid "follow-torrent must be either 'true' or 'false'."
msgstr "follow-torrent muss entweder 'true' oder 'false' sein." msgstr "follow-torrent muss entweder 'true' oder 'false' sein."
#: src/main.cc:474 #: src/main.cc:477
msgid "direct-file-mapping must be either 'true' or 'false'." msgid "direct-file-mapping must be either 'true' or 'false'."
msgstr "direct-file-mapping muss entweder 'true' oder 'false' sein." msgstr "direct-file-mapping muss entweder 'true' oder 'false' sein."
#: src/main.cc:482 #: src/main.cc:485
msgid "upload-limit must be greater than or equal to 0." msgid "upload-limit must be greater than or equal to 0."
msgstr "upload-limit muss größer oder gleich 0 sein." msgstr "upload-limit muss größer oder gleich 0 sein."
#: src/main.cc:514 #: src/main.cc:517
msgid "split must be between 1 and 5." msgid "split must be between 1 and 5."
msgstr "split muss zwischen 1 und 5 liegen." msgstr "split muss zwischen 1 und 5 liegen."
#: src/main.cc:524 #: src/main.cc:527
msgid "timeout must be between 1 and 600" msgid "timeout must be between 1 and 600"
msgstr "timeout muss zwischen 1 und 600 liegen." msgstr "timeout muss zwischen 1 und 600 liegen."
#: src/main.cc:533 #: src/main.cc:536
msgid "max-tries invalid" msgid "max-tries invalid"
msgstr "max-tries ungültig" msgstr "max-tries ungültig"
#: src/main.cc:562 #: src/main.cc:565
msgid "specify at least one URL" msgid "specify at least one URL"
msgstr "Geben Sie zumindest eine URL an" msgstr "Geben Sie zumindest eine URL an"
#: src/main.cc:569 #: src/main.cc:572
msgid "daemon failed" msgid "daemon failed"
msgstr "Daemon-Start nicht erfolgreich" msgstr "Daemon-Start nicht erfolgreich"
#: src/main.cc:670 #: src/main.cc:673
msgid "Files:" msgid "Files:"
msgstr "Dateien:" msgstr "Dateien:"
#: src/main.cc:701 #: src/main.cc:704
msgid "Errors occurred while binding port.\n" msgid "Errors occurred while binding port.\n"
msgstr "Fehler beim Binden an Port aufgetreten.\n" msgstr "Fehler beim Binden an Port aufgetreten.\n"

BIN
po/ja.gmo

Binary file not shown.

167
po/ja.po
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-05-10 00:53+0900\n" "POT-Creation-Date: 2006-05-27 00:27+0900\n"
"PO-Revision-Date: 2006-05-05 19:45+0900\n" "PO-Revision-Date: 2006-05-27 00:25+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"
@ -358,7 +358,7 @@ msgstr ""
"\n" "\n"
"ダウンロードはエラーのため完了していません. ログを確認してください.\n" "ダウンロードはエラーのため完了していません. ログを確認してください.\n"
#: src/main.cc:88 src/main.cc:99 #: src/main.cc:88
msgid "" msgid ""
"\n" "\n"
"stopping application...\n" "stopping application...\n"
@ -366,22 +366,22 @@ msgstr ""
"\n" "\n"
"アプリケーションを終了しています...\n" "アプリケーションを終了しています...\n"
#: src/main.cc:94 src/main.cc:111 #: src/main.cc:94
msgid "done\n" msgid "done\n"
msgstr "完了\n" msgstr "完了\n"
#: src/main.cc:122 #: src/main.cc:125
#, c-format #, c-format
msgid "Unrecognized URL or unsupported protocol: %s\n" msgid "Unrecognized URL or unsupported protocol: %s\n"
msgstr "" msgstr ""
"%s は, 理解できない URL フォーマット, または, サポートされないプロトコルで" "%s は, 理解できない URL フォーマット, または, サポートされないプロトコルで"
"す.\n" "す.\n"
#: src/main.cc:128 #: src/main.cc:131
msgid " version " msgid " version "
msgstr " バージョン " msgstr " バージョン "
#: src/main.cc:132 #: src/main.cc:135
msgid "" msgid ""
"This program is free software; you can redistribute it and/or modify\n" "This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n" "it under the terms of the GNU General Public License as published by\n"
@ -397,51 +397,50 @@ msgid ""
"along with this program; if not, write to the Free Software\n" "along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
msgstr "" msgstr ""
"このプログラムはフリーソフトウェアです。あなたはこれを、フリーソフトウェ\n" "This program is free software; you can redistribute it and/or modify\n"
"ア財団によって発行された GNU 一般公衆利用許諾契約書(バージョン2か、希\n" "it under the terms of the GNU General Public License as published by\n"
"望によってはそれ以降のバージョンのうちどれか)の定める条件の下で再頒布\n" "the Free Software Foundation; either version 2 of the License, or\n"
"または改変することができます。\n" "(at your option) any later version.\n"
"\n" "\n"
"このプログラムは有用であることを願って頒布されますが、*全くの無保証* \n" "This program is distributed in the hope that it will be useful,\n"
"です。商業可能性の保証や特定の目的への適合性は、言外に示されたものも含\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"め全く存在しません。詳しくはGNU 一般公衆利用許諾契約書をご覧ください。\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n" "\n"
"あなたはこのプログラムと共に、GNU 一般公衆利用許諾契約書の複製物を一部\n" "You should have received a copy of the GNU General Public License\n"
"受け取ったはずです。もし受け取っていなければ、フリーソフトウェア財団ま\n" "along with this program; if not, write to the Free Software\n"
"で請求してください(宛先は the Free Software Foundation, Inc., 59\n" "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
"Temple Place, Suite 330, Boston, MA 02111-1307 USA)。\n"
"(訳: http://www.opensource.jp/gpl/gpl.ja.html.euc-jp)\n"
#: src/main.cc:146 #: src/main.cc:149
#, c-format #, c-format
msgid "Contact Info: %s\n" msgid "Contact Info: %s\n"
msgstr "連絡先: %s\n" msgstr "連絡先: %s\n"
#: src/main.cc:152 #: src/main.cc:155
#, c-format #, c-format
msgid "Usage: %s [options] URL ...\n" msgid "Usage: %s [options] URL ...\n"
msgstr "使い方: %s [オプション] URL ...\n" msgstr "使い方: %s [オプション] URL ...\n"
#: src/main.cc:154 #: src/main.cc:157
#, c-format #, c-format
msgid " %s [options] -T TORRENT_FILE FILE ...\n" msgid " %s [options] -T TORRENT_FILE FILE ...\n"
msgstr " %s [オプション] -T TORRENT_FILE FILE ...\n" msgstr " %s [オプション] -T TORRENT_FILE FILE ...\n"
#: src/main.cc:157 #: src/main.cc:160
msgid "Options:" msgid "Options:"
msgstr "オプション:" msgstr "オプション:"
#: src/main.cc:158 #: src/main.cc:161
msgid " -d, --dir=DIR The directory to store downloaded file." msgid " -d, --dir=DIR The directory to store downloaded file."
msgstr "" msgstr ""
" -d, --dir=DIR ダウンロードしたファイルを保存するディレクトリ." " -d, --dir=DIR ダウンロードしたファイルを保存するディレクトリ."
#: src/main.cc:159 #: src/main.cc:162
msgid " -o, --out=FILE The file name for downloaded file." msgid " -o, --out=FILE The file name for downloaded file."
msgstr "" msgstr ""
" -o, --out=FILE ダウンロードしたファイルの保存先ファイル名." " -o, --out=FILE ダウンロードしたファイルの保存先ファイル名."
#: src/main.cc:160 #: src/main.cc:163
msgid "" msgid ""
" -l, --log=LOG The file path to store log. If '-' is " " -l, --log=LOG The file path to store log. If '-' is "
"specified,\n" "specified,\n"
@ -451,11 +450,11 @@ msgstr ""
"力\n" "力\n"
" に出力します." " に出力します."
#: src/main.cc:162 #: src/main.cc:165
msgid " -D, --daemon Run as daemon." msgid " -D, --daemon Run as daemon."
msgstr " -D, --daemon デーモンとして起動します." msgstr " -D, --daemon デーモンとして起動します."
#: src/main.cc:163 #: src/main.cc:166
msgid "" msgid ""
" -s, --split=N Download a file using N connections. N must " " -s, --split=N Download a file using N connections. N must "
"be\n" "be\n"
@ -474,7 +473,7 @@ msgstr ""
"ショ\n" "ショ\n"
" ンを確立します." " ンを確立します."
#: src/main.cc:167 #: src/main.cc:170
msgid "" msgid ""
" --retry-wait=SEC Set amount of time in second between requests\n" " --retry-wait=SEC Set amount of time in second between requests\n"
" for errors. Specify a value between 0 and 60.\n" " for errors. Specify a value between 0 and 60.\n"
@ -485,13 +484,13 @@ msgstr ""
" す. 0 - 60 の値を指定してください.\n" " す. 0 - 60 の値を指定してください.\n"
" デフォルト値: 5" " デフォルト値: 5"
#: src/main.cc:170 #: src/main.cc:173
msgid " -t, --timeout=SEC Set timeout in second. Default: 60" msgid " -t, --timeout=SEC Set timeout in second. Default: 60"
msgstr "" msgstr ""
" -t, --timeout=SEC タイムアウトとなる時間を秒で指定します.\n" " -t, --timeout=SEC タイムアウトとなる時間を秒で指定します.\n"
" デフォルト値: 60" " デフォルト値: 60"
#: src/main.cc:171 #: src/main.cc:174
msgid "" msgid ""
" -m, --max-tries=N Set number of tries. 0 means unlimited.\n" " -m, --max-tries=N Set number of tries. 0 means unlimited.\n"
" Default: 5" " Default: 5"
@ -500,7 +499,7 @@ msgstr ""
"行\n" "行\n"
" します. デフォルト値: 5" " します. デフォルト値: 5"
#: src/main.cc:173 #: src/main.cc:176
msgid "" msgid ""
" --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n" " --min-segment-size=SIZE[K|M] Set minimum segment size. You can append\n"
" K or M(1K = 1024, 1M = 1024K). This\n" " K or M(1K = 1024, 1M = 1024K). This\n"
@ -513,7 +512,7 @@ msgstr ""
"1024K).\n" "1024K).\n"
" 1024 以上の値を指定してください." " 1024 以上の値を指定してください."
#: src/main.cc:177 #: src/main.cc:180
msgid "" msgid ""
" --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n" " --http-proxy=HOST:PORT Use HTTP proxy server. This affects to all\n"
" URLs." " URLs."
@ -522,14 +521,14 @@ msgstr ""
"シ\n" "シ\n"
" ョンはすべての URL に影響します." " ョンはすべての URL に影響します."
#: src/main.cc:179 #: src/main.cc:182
msgid " --http-user=USER Set HTTP user. This affects to all URLs." msgid " --http-user=USER Set HTTP user. This affects to all URLs."
msgstr "" msgstr ""
" --http-user=USER HTTP での認証ユーザーを指定します. このオプショ" " --http-user=USER HTTP での認証ユーザーを指定します. このオプショ"
"ン\n" "ン\n"
" はすべての URL に影響します." " はすべての URL に影響します."
#: src/main.cc:180 #: src/main.cc:183
msgid "" msgid ""
" --http-passwd=PASSWD Set HTTP password. This affects to all URLs." " --http-passwd=PASSWD Set HTTP password. This affects to all URLs."
msgstr "" msgstr ""
@ -537,7 +536,7 @@ msgstr ""
"ショ\n" "ショ\n"
" ンはすべての URL に影響します." " ンはすべての URL に影響します."
#: src/main.cc:181 #: src/main.cc:184
msgid "" msgid ""
" --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs" " --http-proxy-user=USER Set HTTP proxy user. This affects to all URLs"
msgstr "" msgstr ""
@ -547,7 +546,7 @@ msgstr ""
"ま\n" "ま\n"
" す." " す."
#: src/main.cc:182 #: src/main.cc:185
msgid "" msgid ""
" --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all " " --http-proxy-passwd=PASSWD Set HTTP proxy password. This affects to all "
"URLs." "URLs."
@ -558,7 +557,7 @@ msgstr ""
"し\n" "し\n"
" ます." " ます."
#: src/main.cc:183 #: src/main.cc:186
msgid "" msgid ""
" --http-proxy-method=METHOD Set the method to use in proxy request.\n" " --http-proxy-method=METHOD Set the method to use in proxy request.\n"
" METHOD is either 'get' or 'tunnel'.\n" " METHOD is either 'get' or 'tunnel'.\n"
@ -569,7 +568,7 @@ msgstr ""
" す. 'get' または 'tunnel' を指定してください.\n" " す. 'get' または 'tunnel' を指定してください.\n"
" デフォルト値: tunnel" " デフォルト値: tunnel"
#: src/main.cc:186 #: src/main.cc:189
msgid "" msgid ""
" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, " " --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, "
"basic\n" "basic\n"
@ -581,14 +580,14 @@ msgstr ""
" いるのは basic です. \n" " いるのは basic です. \n"
" デフォルト値: basic" " デフォルト値: basic"
#: src/main.cc:189 #: src/main.cc:192
msgid " --referer=REFERER Set Referer. This affects to all URLs." msgid " --referer=REFERER Set Referer. This affects to all URLs."
msgstr "" msgstr ""
" --referer=REFERER リファラーを指定します. このオプションはすべて" " --referer=REFERER リファラーを指定します. このオプションはすべて"
"の\n" "の\n"
" URL に影響します." " URL に影響します."
#: src/main.cc:190 #: src/main.cc:193
msgid "" msgid ""
" --ftp-user=USER Set FTP user. This affects to all URLs.\n" " --ftp-user=USER Set FTP user. This affects to all URLs.\n"
" Default: anonymous" " Default: anonymous"
@ -598,7 +597,7 @@ msgstr ""
" はすべての URL に影響します.\n" " はすべての URL に影響します.\n"
" デフォルト値: anonymous" " デフォルト値: anonymous"
#: src/main.cc:192 #: src/main.cc:195
msgid "" msgid ""
" --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n" " --ftp-passwd=PASSWD Set FTP password. This affects to all URLs.\n"
" Default: ARIA2USER@" " Default: ARIA2USER@"
@ -608,7 +607,7 @@ msgstr ""
" ンはすべての URL に影響します.\n" " ンはすべての URL に影響します.\n"
" デフォルト値: ARIA2USER@" " デフォルト値: ARIA2USER@"
#: src/main.cc:194 #: src/main.cc:197
msgid "" msgid ""
" --ftp-type=TYPE Set FTP transfer type. TYPE is either " " --ftp-type=TYPE Set FTP transfer type. TYPE is either "
"'binary'\n" "'binary'\n"
@ -619,11 +618,11 @@ msgstr ""
" 'ascii' を指定してください. デフォルト値: " " 'ascii' を指定してください. デフォルト値: "
"binary" "binary"
#: src/main.cc:197 #: src/main.cc:200
msgid " -p, --ftp-pasv Use passive mode in FTP." msgid " -p, --ftp-pasv Use passive mode in FTP."
msgstr " -p, --ftp-pasv FTP で passive モードを使用します." msgstr " -p, --ftp-pasv FTP で passive モードを使用します."
#: src/main.cc:198 #: src/main.cc:201
msgid "" msgid ""
" --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' " " --ftp-via-http-proxy=METHOD Use HTTP proxy in FTP. METHOD is either 'get' "
"or\n" "or\n"
@ -636,11 +635,11 @@ msgstr ""
"く\n" "く\n"
" ださい. デフォルト値: tunnel" " ださい. デフォルト値: tunnel"
#: src/main.cc:202 #: src/main.cc:205
msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file." msgid " -T, --torrent-file=TORRENT_FILE The file path to .torrent file."
msgstr " -T, --torrent-file=TORRENT_FILE .torrent ファイルのパスを指定." msgstr " -T, --torrent-file=TORRENT_FILE .torrent ファイルのパスを指定."
#: src/main.cc:203 #: src/main.cc:206
msgid "" msgid ""
" --follow-torrent=true|false Setting this option to false prevents aria2 " " --follow-torrent=true|false Setting this option to false prevents aria2 "
"to\n" "to\n"
@ -655,7 +654,7 @@ msgstr ""
" は, BitTorrent モードに入りません.\n" " は, BitTorrent モードに入りません.\n"
" デフォルト値: true" " デフォルト値: true"
#: src/main.cc:207 #: src/main.cc:210
msgid "" msgid ""
" -S, --show-files Print file listing of .torrent file and exit." " -S, --show-files Print file listing of .torrent file and exit."
msgstr "" msgstr ""
@ -663,7 +662,7 @@ msgstr ""
"し\n" "し\n"
" 終了します." " 終了します."
#: src/main.cc:208 #: src/main.cc:211
msgid "" msgid ""
" --direct-file-mapping=true|false Directly read from and write to each file\n" " --direct-file-mapping=true|false Directly read from and write to each file\n"
" mentioned in .torrent file.\n" " mentioned in .torrent file.\n"
@ -674,14 +673,14 @@ msgstr ""
" します.\n" " します.\n"
" デフォルト値: true" " デフォルト値: true"
#: src/main.cc:211 #: src/main.cc:214
msgid "" msgid ""
" --listen-port=PORT Set port number to listen to for peer " " --listen-port=PORT Set port number to listen to for peer "
"connection." "connection."
msgstr "" msgstr ""
" --listen-port=PORT ピアからの接続を受け付けるポート番号を指定." " --listen-port=PORT ピアからの接続を受け付けるポート番号を指定."
#: src/main.cc:212 #: src/main.cc:215
msgid "" msgid ""
" --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries " " --upload-limit=SPEED Set upload speed limit in KB/sec. aria2 tries "
"to\n" "to\n"
@ -694,7 +693,7 @@ msgstr ""
"し\n" "し\n"
" ます. 0 は速度無制限を意味します." " ます. 0 は速度無制限を意味します."
#: src/main.cc:214 #: src/main.cc:217
msgid "" msgid ""
" --select-file=INDEX... Set file to download by specifing its index.\n" " --select-file=INDEX... Set file to download by specifing its index.\n"
" You can know file index through --show-files\n" " You can know file index through --show-files\n"
@ -715,16 +714,16 @@ msgstr ""
" また, '-' を使って範囲指定もできます: \"1-5\"\n" " また, '-' を使って範囲指定もできます: \"1-5\"\n"
" ',' と '-' は組み合わせて使うことができます." " ',' と '-' は組み合わせて使うことができます."
#: src/main.cc:221 #: src/main.cc:224
msgid " -v, --version Print the version number and exit." msgid " -v, --version Print the version number and exit."
msgstr " -v, --version バージョン番号を表示し, 終了します." msgstr " -v, --version バージョン番号を表示し, 終了します."
#: src/main.cc:222 #: src/main.cc:225
msgid " -h, --help Print this message and exit." msgid " -h, --help Print this message and exit."
msgstr "" msgstr ""
" -h, --help このヘルプメッセージを表示し, 終了します." " -h, --help このヘルプメッセージを表示し, 終了します."
#: src/main.cc:225 #: src/main.cc:228
msgid "" msgid ""
" You can specify multiple URLs. All URLs must point to the same file\n" " You can specify multiple URLs. All URLs must point to the same file\n"
" or downloading fails." " or downloading fails."
@ -733,7 +732,7 @@ msgstr ""
"れ\n" "れ\n"
" ばなりません. さもなくばダウンロードは失敗します." " ばなりません. さもなくばダウンロードは失敗します."
#: src/main.cc:230 #: src/main.cc:233
msgid "" msgid ""
" Specify files in multi-file torrent to download. Use conjunction with\n" " Specify files in multi-file torrent to download. Use conjunction with\n"
" -T option. This arguments are ignored if you specify --select-file option." " -T option. This arguments are ignored if you specify --select-file option."
@ -742,115 +741,115 @@ msgstr ""
"ン\n" "ン\n"
" と共に使用します. --select-file オプションと併用はできません." " と共に使用します. --select-file オプションと併用はできません."
#: src/main.cc:234 #: src/main.cc:237
msgid "Examples:" msgid "Examples:"
msgstr "例:" msgstr "例:"
#: src/main.cc:235 #: src/main.cc:238
msgid " Download a file by 1 connection:" msgid " Download a file by 1 connection:"
msgstr " 1 コネクションでのダウンロード:" msgstr " 1 コネクションでのダウンロード:"
#: src/main.cc:237 #: src/main.cc:240
msgid " Download a file by 2 connections:" msgid " Download a file by 2 connections:"
msgstr " 2 コネクションでのダウンロード:" msgstr " 2 コネクションでのダウンロード:"
#: src/main.cc:239 #: src/main.cc:242
msgid " Download a file by 2 connections, each connects to a different server:" msgid " Download a file by 2 connections, each connects to a different server:"
msgstr " 二つの異なるサーバーに接続してダウンロード:" msgstr " 二つの異なるサーバーに接続してダウンロード:"
#: src/main.cc:241 #: src/main.cc:244
msgid " You can mix up different protocols:" msgid " You can mix up different protocols:"
msgstr " 異なるプロトコルを混合させてダウンロード:" msgstr " 異なるプロトコルを混合させてダウンロード:"
#: src/main.cc:244 #: src/main.cc:247
msgid " Download a torrent:" msgid " Download a torrent:"
msgstr "torrent をダウンロード:" msgstr "torrent をダウンロード:"
#: src/main.cc:246 #: src/main.cc:249
msgid " Download a torrent using local .torrent file:" msgid " Download a torrent using local .torrent file:"
msgstr " ローカル .torrent ファイルを使ってダウンロード:" msgstr " ローカル .torrent ファイルを使ってダウンロード:"
#: src/main.cc:248 #: src/main.cc:251
msgid " Download only selected files:" msgid " Download only selected files:"
msgstr " ファイルを指定してダウンロード:" msgstr " ファイルを指定してダウンロード:"
#: src/main.cc:250 #: src/main.cc:253
msgid " Print file listing of .torrent file:" msgid " Print file listing of .torrent file:"
msgstr " この .torrent ファイルに含まれるファイルリストを表示:" msgstr " この .torrent ファイルに含まれるファイルリストを表示:"
#: src/main.cc:254 #: src/main.cc:257
#, c-format #, c-format
msgid "Report bugs to %s" msgid "Report bugs to %s"
msgstr "バグレポートはこちらへ: %s" msgstr "バグレポートはこちらへ: %s"
#: src/main.cc:350 #: src/main.cc:353
msgid "unrecognized proxy format" msgid "unrecognized proxy format"
msgstr "理解できないProxyフォーマットです." msgstr "理解できないProxyフォーマットです."
#: src/main.cc:377 #: src/main.cc:380
msgid "Currently, supported authentication scheme is basic." msgid "Currently, supported authentication scheme is basic."
msgstr "現在サポートされている認証方法は basic です." msgstr "現在サポートされている認証方法は basic です."
#: src/main.cc:386 #: src/main.cc:389
msgid "retry-wait must be between 0 and 60." msgid "retry-wait must be between 0 and 60."
msgstr "retry-wait は 0 から 60 の間で指定してください." msgstr "retry-wait は 0 から 60 の間で指定してください."
#: src/main.cc:403 #: src/main.cc:406
msgid "ftp-type must be either 'binary' or 'ascii'." msgid "ftp-type must be either 'binary' or 'ascii'."
msgstr "ftp-type は 'binary' または 'ascii' を指定してください." msgstr "ftp-type は 'binary' または 'ascii' を指定してください."
#: src/main.cc:412 #: src/main.cc:415
msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'." msgid "ftp-via-http-proxy must be either 'get' or 'tunnel'."
msgstr "ftp-via-http-proxy は 'get' または 'tunnel' を指定してください." msgstr "ftp-via-http-proxy は 'get' または 'tunnel' を指定してください."
#: src/main.cc:430 #: src/main.cc:433
msgid "min-segment-size invalid" msgid "min-segment-size invalid"
msgstr "min-segment-size が不正です." msgstr "min-segment-size が不正です."
#: src/main.cc:441 #: src/main.cc:444
msgid "http-proxy-method must be either 'get' or 'tunnel'." msgid "http-proxy-method must be either 'get' or 'tunnel'."
msgstr "http-proxy-method は 'get' または 'tunnel' を指定してください." msgstr "http-proxy-method は 'get' または 'tunnel' を指定してください."
#: src/main.cc:449 #: src/main.cc:452
msgid "listen-port must be between 1024 and 65535." msgid "listen-port must be between 1024 and 65535."
msgstr "listen-port は 1024 - 65535 の値を指定してください." msgstr "listen-port は 1024 - 65535 の値を指定してください."
#: src/main.cc:460 #: src/main.cc:463
msgid "follow-torrent must be either 'true' or 'false'." msgid "follow-torrent must be either 'true' or 'false'."
msgstr "follow-torrent は 'true' または 'false を指定してください." msgstr "follow-torrent は 'true' または 'false を指定してください."
#: src/main.cc:474 #: src/main.cc:477
msgid "direct-file-mapping must be either 'true' or 'false'." msgid "direct-file-mapping must be either 'true' or 'false'."
msgstr "direct-file-mapping は 'true' または 'false を指定してください." msgstr "direct-file-mapping は 'true' または 'false を指定してください."
#: src/main.cc:482 #: src/main.cc:485
msgid "upload-limit must be greater than or equal to 0." msgid "upload-limit must be greater than or equal to 0."
msgstr "upload-limit は 0 以上の数を指定してください." msgstr "upload-limit は 0 以上の数を指定してください."
#: src/main.cc:514 #: src/main.cc:517
msgid "split must be between 1 and 5." msgid "split must be between 1 and 5."
msgstr "split は 1 - 5 の値を指定してください." msgstr "split は 1 - 5 の値を指定してください."
#: src/main.cc:524 #: src/main.cc:527
msgid "timeout must be between 1 and 600" msgid "timeout must be between 1 and 600"
msgstr "timeout は 1 - 600 の値を指定してください." msgstr "timeout は 1 - 600 の値を指定してください."
#: src/main.cc:533 #: src/main.cc:536
msgid "max-tries invalid" msgid "max-tries invalid"
msgstr "max-tries が不正です." msgstr "max-tries が不正です."
#: src/main.cc:562 #: src/main.cc:565
msgid "specify at least one URL" msgid "specify at least one URL"
msgstr "一個以上の URL を指定してください." msgstr "一個以上の URL を指定してください."
#: src/main.cc:569 #: src/main.cc:572
msgid "daemon failed" msgid "daemon failed"
msgstr "デーモン起動に失敗" msgstr "デーモン起動に失敗"
#: src/main.cc:670 #: src/main.cc:673
msgid "Files:" msgid "Files:"
msgstr "ファイル:" msgstr "ファイル:"
#: src/main.cc:701 #: src/main.cc:704
msgid "Errors occurred while binding port.\n" msgid "Errors occurred while binding port.\n"
msgstr "ポートをバインド中にエラーが発生しました.\n" msgstr "ポートをバインド中にエラーが発生しました.\n"

View File

@ -188,7 +188,10 @@ int BitfieldMan::getMissingIndex(const unsigned char* peerBitfield, int length)
} }
} }
int max = countSetBit(tempBitfield, bitfieldLength); int max = countSetBit(tempBitfield, bitfieldLength);
int index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max); int index = -1;
if(max > 0) {
index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max);
}
delete [] tempBitfield; delete [] tempBitfield;
return index; return index;
} }
@ -205,7 +208,10 @@ int BitfieldMan::getMissingUnusedIndex(const unsigned char* peerBitfield, int le
} }
} }
int max = countSetBit(tempBitfield, bitfieldLength); int max = countSetBit(tempBitfield, bitfieldLength);
int index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max); int index = -1;
if(max > 0) {
index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max);
}
delete [] tempBitfield; delete [] tempBitfield;
return index; return index;
} }
@ -254,7 +260,10 @@ int BitfieldMan::getMissingIndex() const {
} }
} }
int max = countSetBit(tempBitfield, bitfieldLength); int max = countSetBit(tempBitfield, bitfieldLength);
int index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max); int index = -1;
if(max > 0) {
index = getMissingIndexRandomly(tempBitfield, bitfieldLength, max);
}
delete [] tempBitfield; delete [] tempBitfield;
return index; return index;
} }

View File

@ -80,7 +80,7 @@ void DownloadEngine::run() {
} }
} }
afterEachIteration(); afterEachIteration();
//shortSleep(); activeSockets.clear();
if(!noWait && !commands.empty()) { if(!noWait && !commands.empty()) {
waitData(activeSockets); waitData(activeSockets);
} }
@ -100,7 +100,6 @@ void DownloadEngine::shortSleep() const {
} }
void DownloadEngine::waitData(Sockets& activeSockets) { void DownloadEngine::waitData(Sockets& activeSockets) {
activeSockets.clear();
fd_set rfds; fd_set rfds;
fd_set wfds; fd_set wfds;
int retval = 0; int retval = 0;

View File

@ -79,5 +79,5 @@ void Peer::setAllBitfield() {
} }
void Peer::updateLatency(int latency) { void Peer::updateLatency(int latency) {
this->latency = (this->latency*80+latency*20)/200; this->latency = (this->latency*20+latency*80)/200;
} }

View File

@ -55,7 +55,6 @@ private:
long long int peerUpload; long long int peerUpload;
long long int peerDownload; long long int peerDownload;
int pieceLength; int pieceLength;
long long int totalLength;
int deltaUpload; int deltaUpload;
int deltaDownload; int deltaDownload;
int latency; int latency;
@ -69,7 +68,7 @@ public:
bitfield(NULL), bitfield(NULL),
fastExtensionEnabled(false), fastExtensionEnabled(false),
peerUpload(0), peerDownload(0), peerUpload(0), peerDownload(0),
pieceLength(pieceLength), totalLength(totalLength), pieceLength(pieceLength),
deltaUpload(0), deltaDownload(0), deltaUpload(0), deltaDownload(0),
latency(DEFAULT_LATENCY) { latency(DEFAULT_LATENCY) {
this->bitfield = new BitfieldMan(pieceLength, totalLength); this->bitfield = new BitfieldMan(pieceLength, totalLength);

View File

@ -78,24 +78,19 @@ bool PeerAbstractCommand::execute() {
return true; return true;
} }
try { try {
beforeSocketCheck();
if(uploadLimitCheck && (uploadLimit == 0 || if(uploadLimitCheck && (uploadLimit == 0 ||
e->getUploadSpeed() <= uploadLimit*1024) || e->getUploadSpeed() <= uploadLimit*1024) ||
checkSocketIsReadable && readCheckTarget->isReadable(0) || checkSocketIsReadable && readCheckTarget->isReadable(0) ||
checkSocketIsWritable && writeCheckTarget->isWritable(0) || checkSocketIsWritable && writeCheckTarget->isWritable(0)) {
!checkSocketIsReadable && !checkSocketIsWritable) {
updateCheckPoint(); updateCheckPoint();
return executeInternal();
} else {
if(isTimeoutDetected()) {
// TODO
checkPoint.tv_sec = 0;
checkPoint.tv_usec = 0;
throw new DlRetryEx(EX_TIME_OUT);
}
e->commands.push_back(this);
return false;
} }
if(isTimeoutDetected()) {
// TODO following 2 lines will be deleted.
checkPoint.tv_sec = 0;
checkPoint.tv_usec = 0;
throw new DlRetryEx(EX_TIME_OUT);
}
return executeInternal();
} catch(Exception* err) { } catch(Exception* err) {
logger->error(MSG_DOWNLOAD_ABORTED, err, cuid); logger->error(MSG_DOWNLOAD_ABORTED, err, cuid);
onAbort(err); onAbort(err);

View File

@ -42,7 +42,6 @@ protected:
virtual bool prepareForRetry(int wait); virtual bool prepareForRetry(int wait);
virtual void onAbort(Exception* ex); virtual void onAbort(Exception* ex);
virtual bool executeInternal() = 0; virtual bool executeInternal() = 0;
virtual void beforeSocketCheck() {}
void setReadCheckSocket(Socket* socket); void setReadCheckSocket(Socket* socket);
void setWriteCheckSocket(Socket* socket); void setWriteCheckSocket(Socket* socket);
void setUploadLimit(int uploadLimit); void setUploadLimit(int uploadLimit);

View File

@ -28,6 +28,7 @@
#include "TorrentMan.h" #include "TorrentMan.h"
#include "PeerMessage.h" #include "PeerMessage.h"
#include "HandshakeMessage.h" #include "HandshakeMessage.h"
#include "common.h"
// we assume maximum length of incoming message is "piece" message with 16KB // we assume maximum length of incoming message is "piece" message with 16KB
// data. Messages beyond that size are dropped. // data. Messages beyond that size are dropped.

View File

@ -219,7 +219,7 @@ void PeerInteraction::deleteRequestSlot(const RequestSlot& requestSlot) {
} }
} }
void PeerInteraction::deleteTimeoutRequestSlot() { void PeerInteraction::checkRequestSlot() {
for(RequestSlots::iterator itr = requestSlots.begin(); for(RequestSlots::iterator itr = requestSlots.begin();
itr != requestSlots.end();) { itr != requestSlots.end();) {
RequestSlot& slot = *itr; RequestSlot& slot = *itr;
@ -232,32 +232,24 @@ void PeerInteraction::deleteTimeoutRequestSlot() {
piece.cancelBlock(slot.getBlockIndex()); piece.cancelBlock(slot.getBlockIndex());
itr = requestSlots.erase(itr); itr = requestSlots.erase(itr);
} else { } else {
itr++; Piece piece = getDownloadPiece(slot.getIndex());
if(piece.hasBlock(slot.getBlockIndex()) ||
torrentMan->hasPiece(piece.getIndex())) {
logger->debug("CUID#%d - Deleting request slot blockIndex=%d because"
" the block has been acquired.", cuid,
slot.getBlockIndex());
addMessage(createCancelMessage(slot.getIndex(),
slot.getBegin(),
slot.getLength()));
itr = requestSlots.erase(itr);
} else {
itr++;
}
} }
} }
updatePiece(); updatePiece();
} }
void PeerInteraction::deleteCompletedRequestSlot() {
for(RequestSlots::iterator itr = requestSlots.begin();
itr != requestSlots.end();) {
RequestSlot& slot = *itr;
Piece piece = getDownloadPiece(slot.getIndex());
if(piece.hasBlock(slot.getBlockIndex()) ||
torrentMan->hasPiece(piece.getIndex())) {
logger->debug("CUID#%d - Deleting request slot blockIndex=%d because"
" the block has been acquired.", cuid,
slot.getBlockIndex());
addMessage(createCancelMessage(slot.getIndex(),
slot.getBegin(),
slot.getLength()));
itr = requestSlots.erase(itr);
} else {
itr++;
}
}
}
bool PeerInteraction::isInRequestSlot(int index, int blockIndex) const { bool PeerInteraction::isInRequestSlot(int index, int blockIndex) const {
for(RequestSlots::const_iterator itr = requestSlots.begin(); for(RequestSlots::const_iterator itr = requestSlots.begin();
itr != requestSlots.end(); itr++) { itr != requestSlots.end(); itr++) {
@ -469,7 +461,7 @@ void PeerInteraction::addRequests() {
} }
} }
int MAX_PENDING_REQUEST; int MAX_PENDING_REQUEST;
if(peer->getLatency() < 900) { if(peer->getLatency() < 500) {
MAX_PENDING_REQUEST = 24; MAX_PENDING_REQUEST = 24;
} else if(peer->getLatency() < 1500) { } else if(peer->getLatency() < 1500) {
MAX_PENDING_REQUEST = 12; MAX_PENDING_REQUEST = 12;

View File

@ -48,7 +48,6 @@
typedef deque<RequestSlot> RequestSlots; typedef deque<RequestSlot> RequestSlots;
typedef deque<PeerMessage*> MessageQueue; typedef deque<PeerMessage*> MessageQueue;
typedef deque<Piece> Pieces;
class PeerInteraction { class PeerInteraction {
private: private:
@ -87,8 +86,7 @@ public:
bool isSendingMessageInProgress() const; bool isSendingMessageInProgress() const;
void deleteRequestSlot(const RequestSlot& requestSlot); void deleteRequestSlot(const RequestSlot& requestSlot);
void deleteTimeoutRequestSlot(); void checkRequestSlot();
void deleteCompletedRequestSlot();
RequestSlot getCorrespondingRequestSlot(int index, int begin, int length) const; RequestSlot getCorrespondingRequestSlot(int index, int begin, int length) const;
bool isInRequestSlot(int index, int blockIndex) const; bool isInRequestSlot(int index, int blockIndex) const;

View File

@ -115,12 +115,12 @@ bool PeerInteractionCommand::executeInternal() {
decideChoking(); decideChoking();
receiveMessages(); receiveMessages();
detectMessageFlooding(); detectMessageFlooding();
//checkLongTimePeerChoking();
peerInteraction->deleteTimeoutRequestSlot(); peerInteraction->checkRequestSlot();
peerInteraction->deleteCompletedRequestSlot();
peerInteraction->addRequests(); peerInteraction->addRequests();
checkHave();
peerInteraction->sendMessages(e->getUploadSpeed()); peerInteraction->sendMessages(e->getUploadSpeed());
sendKeepAlive();
break; break;
} }
if(peerInteraction->countMessageInQueue() > 0) { if(peerInteraction->countMessageInQueue() > 0) {
@ -250,7 +250,7 @@ void PeerInteractionCommand::onAbort(Exception* ex) {
PeerAbstractCommand::onAbort(ex); PeerAbstractCommand::onAbort(ex);
} }
void PeerInteractionCommand::keepAlive() { void PeerInteractionCommand::sendKeepAlive() {
if(keepAliveCheckPoint.tv_sec == 0 && keepAliveCheckPoint.tv_usec == 0) { if(keepAliveCheckPoint.tv_sec == 0 && keepAliveCheckPoint.tv_usec == 0) {
gettimeofday(&keepAliveCheckPoint, NULL); gettimeofday(&keepAliveCheckPoint, NULL);
} else { } else {
@ -266,27 +266,22 @@ void PeerInteractionCommand::keepAlive() {
} }
} }
void PeerInteractionCommand::beforeSocketCheck() { void PeerInteractionCommand::checkHave() {
if(sequence == WIRED) { e->torrentMan->unadvertisePiece(cuid);
e->torrentMan->unadvertisePiece(cuid); PieceIndexes indexes = e->torrentMan->getAdvertisedPieceIndexes(cuid);
detectMessageFlooding(); if(indexes.size() >= 20) {
//checkLongTimePeerChoking(); if(peer->isFastExtensionEnabled()) {
PieceIndexes indexes = e->torrentMan->getAdvertisedPieceIndexes(cuid); if(e->torrentMan->hasAllPieces()) {
if(indexes.size() >= 20) { peerInteraction->addMessage(peerInteraction->createHaveAllMessage());
if(peer->isFastExtensionEnabled()) {
if(e->torrentMan->hasAllPieces()) {
peerInteraction->addMessage(peerInteraction->createHaveAllMessage());
} else {
peerInteraction->addMessage(peerInteraction->createBitfieldMessage());
}
} else { } else {
peerInteraction->addMessage(peerInteraction->createBitfieldMessage()); peerInteraction->addMessage(peerInteraction->createBitfieldMessage());
} }
} else { } else {
for(PieceIndexes::iterator itr = indexes.begin(); itr != indexes.end(); itr++) { peerInteraction->addMessage(peerInteraction->createBitfieldMessage());
peerInteraction->addMessage(peerInteraction->createHaveMessage(*itr)); }
} } else {
for(PieceIndexes::iterator itr = indexes.begin(); itr != indexes.end(); itr++) {
peerInteraction->addMessage(peerInteraction->createHaveMessage(*itr));
} }
keepAlive();
} }
} }

View File

@ -46,13 +46,13 @@ private:
void checkLongTimePeerChoking(); void checkLongTimePeerChoking();
void detectTimeoutAndDuplicateBlock(); void detectTimeoutAndDuplicateBlock();
void decideChoking(); void decideChoking();
void keepAlive(); void sendKeepAlive();
void checkHave();
protected: protected:
bool executeInternal(); bool executeInternal();
bool prepareForRetry(int wait); bool prepareForRetry(int wait);
bool prepareForNextPeer(int wait); bool prepareForNextPeer(int wait);
void onAbort(Exception* ex); void onAbort(Exception* ex);
void beforeSocketCheck();
public: public:
PeerInteractionCommand(int cuid, Peer* peer, TorrentDownloadEngine* e, const Socket* s, int sequence); PeerInteractionCommand(int cuid, Peer* peer, TorrentDownloadEngine* e, const Socket* s, int sequence);
~PeerInteractionCommand(); ~PeerInteractionCommand();

View File

@ -37,6 +37,7 @@
#include "HaveAllMessage.h" #include "HaveAllMessage.h"
#include "HaveNoneMessage.h" #include "HaveNoneMessage.h"
#include "PeerConnection.h" #include "PeerConnection.h"
#include "common.h"
#define MAX_BLOCK_LENGTH (128*1024) #define MAX_BLOCK_LENGTH (128*1024)

View File

@ -56,7 +56,10 @@ public:
bool hasBlock(int blockIndex) const { bool hasBlock(int blockIndex) const {
return bitfield->isBitSet(blockIndex); return bitfield->isBitSet(blockIndex);
} }
/**
* Returns true if all blocks of this piece have been downloaded, otherwise
* returns false.
*/
bool pieceComplete() const; bool pieceComplete() const;
int countBlock() const { return bitfield->countBlock(); } int countBlock() const { return bitfield->countBlock(); }
int getBlockLength(int index) const { int getBlockLength(int index) const {

View File

@ -74,7 +74,9 @@ void TorrentMan::updatePeers(const Peers& peers) {
} }
bool TorrentMan::addPeer(Peer* peer, bool duplicate) { bool TorrentMan::addPeer(Peer* peer, bool duplicate) {
deleteOldErrorPeers(MAX_PEER_LIST_SIZE); if(peers.size() >= MAX_PEER_LIST_SIZE) {
deleteOldErrorPeers();
}
if(duplicate) { if(duplicate) {
for(Peers::iterator itr = peers.begin(); itr != peers.end(); itr++) { for(Peers::iterator itr = peers.begin(); itr != peers.end(); itr++) {
Peer* p = *itr; Peer* p = *itr;
@ -83,6 +85,9 @@ bool TorrentMan::addPeer(Peer* peer, bool duplicate) {
} }
} }
} else { } else {
if(peers.size() >= MAX_PEER_LIST_SIZE) {
return false;
}
for(Peers::iterator itr = peers.begin(); itr != peers.end(); itr++) { for(Peers::iterator itr = peers.begin(); itr != peers.end(); itr++) {
Peer* p = *itr; Peer* p = *itr;
if(p->ipaddr == peer->ipaddr && p->port == peer->port) { if(p->ipaddr == peer->ipaddr && p->port == peer->port) {
@ -112,22 +117,16 @@ bool TorrentMan::isPeerAvailable() const {
return getPeer() != Peer::nullPeer; return getPeer() != Peer::nullPeer;
} }
int TorrentMan::deleteOldErrorPeers(int maxNum) { void TorrentMan::deleteOldErrorPeers() {
int counter = 0;
for(Peers::iterator itr = peers.begin(); itr != peers.end();) { for(Peers::iterator itr = peers.begin(); itr != peers.end();) {
Peer* p = *itr; Peer* p = *itr;
if(p->error >= MAX_PEER_ERROR && p->cuid == 0) { if(p->error >= MAX_PEER_ERROR && p->cuid == 0) {
delete p; delete p;
itr = peers.erase(itr); itr = peers.erase(itr);
counter++;
if(maxNum <= counter) {
break;
}
} else { } else {
itr++; itr++;
} }
} }
return counter;
} }
Peer* TorrentMan::getPeer() const { Peer* TorrentMan::getPeer() const {
@ -213,7 +212,7 @@ Piece TorrentMan::checkOutPiece(int index) {
int TorrentMan::deleteUsedPiecesByFillRate(int fillRate, int toDelete) { int TorrentMan::deleteUsedPiecesByFillRate(int fillRate, int toDelete) {
int deleted = 0; int deleted = 0;
for(UsedPieces::iterator itr = usedPieces.begin(); for(Pieces::iterator itr = usedPieces.begin();
itr != usedPieces.end() && deleted < toDelete;) { itr != usedPieces.end() && deleted < toDelete;) {
Piece& piece = *itr; Piece& piece = *itr;
if(!bitfield->isUseBitSet(piece.getIndex()) && if(!bitfield->isUseBitSet(piece.getIndex()) &&
@ -248,11 +247,12 @@ void TorrentMan::reduceUsedPieces(int max) {
} }
void TorrentMan::addUsedPiece(const Piece& piece) { void TorrentMan::addUsedPiece(const Piece& piece) {
// TODO ? if nullPiece
usedPieces.push_back(piece); usedPieces.push_back(piece);
} }
Piece TorrentMan::findUsedPiece(int index) const { Piece TorrentMan::findUsedPiece(int index) const {
for(UsedPieces::const_iterator itr = usedPieces.begin(); itr != usedPieces.end(); itr++) { for(Pieces::const_iterator itr = usedPieces.begin(); itr != usedPieces.end(); itr++) {
const Piece& piece = *itr; const Piece& piece = *itr;
if(piece.getIndex() == index) { if(piece.getIndex() == index) {
return piece; return piece;
@ -265,7 +265,10 @@ void TorrentMan::deleteUsedPiece(const Piece& piece) {
if(Piece::isNull(piece)) { if(Piece::isNull(piece)) {
return; return;
} }
usedPieces.erase(std::remove(usedPieces.begin(), usedPieces.end(), piece)); Pieces::iterator itr = find(usedPieces.begin(), usedPieces.end(), piece);
if(itr != usedPieces.end()) {
usedPieces.erase(itr);
}
} }
void TorrentMan::completePiece(const Piece& piece) { void TorrentMan::completePiece(const Piece& piece) {
@ -300,8 +303,8 @@ void TorrentMan::updatePiece(const Piece& piece) {
if(Piece::isNull(piece)) { if(Piece::isNull(piece)) {
return; return;
} }
UsedPieces::iterator itr = find(usedPieces.begin(), usedPieces.end(), Pieces::iterator itr = find(usedPieces.begin(), usedPieces.end(),
piece); piece);
if(itr != usedPieces.end()) { if(itr != usedPieces.end()) {
*itr = piece; *itr = piece;
} }
@ -311,8 +314,8 @@ void TorrentMan::syncPiece(Piece& piece) {
if(Piece::isNull(piece)) { if(Piece::isNull(piece)) {
return; return;
} }
UsedPieces::iterator itr = find(usedPieces.begin(), usedPieces.end(), Pieces::iterator itr = find(usedPieces.begin(), usedPieces.end(),
piece); piece);
if(itr != usedPieces.end()) { if(itr != usedPieces.end()) {
piece = *itr; piece = *itr;
return; return;

View File

@ -52,8 +52,8 @@ using namespace std;
typedef deque<Peer*> Peers; typedef deque<Peer*> Peers;
typedef multimap<int, int> Haves; typedef multimap<int, int> Haves;
typedef deque<Piece> UsedPieces;
typedef deque<int> PieceIndexes; typedef deque<int> PieceIndexes;
typedef deque<Piece> Pieces;
class TorrentMan { class TorrentMan {
private: private:
@ -74,7 +74,7 @@ private:
string storeDir; string storeDir;
int port; int port;
Haves haves; Haves haves;
UsedPieces usedPieces; Pieces usedPieces;
bool setupComplete; bool setupComplete;
const Logger* logger; const Logger* logger;
Peers activePeers; Peers activePeers;
@ -126,7 +126,7 @@ public:
const Peers& getPeers() const { return peers; } const Peers& getPeers() const { return peers; }
Peer* getPeer() const; Peer* getPeer() const;
bool isPeerAvailable() const; bool isPeerAvailable() const;
int deleteOldErrorPeers(int maxNum); void deleteOldErrorPeers();
bool hasMissingPiece(const Peer* peer) const; bool hasMissingPiece(const Peer* peer) const;
int getMissingPieceIndex(const Peer* peer) const; int getMissingPieceIndex(const Peer* peer) const;