Commit Graph

325 Commits (1849ccfbba57038f1fa57fd0621b80e77a198a4c)

Author SHA1 Message Date
Tatsuhiro Tsujikawa e00b5dcf1b Bump up version number to 1.11.0 2011-03-17 10:55:36 +09:00
Tatsuhiro Tsujikawa b21cce0002 Use pkg-config for libcares. Dropped c-ares pre-1.5 support. 2011-02-18 23:36:39 +09:00
Tatsuhiro Tsujikawa 395212f47f Replaced HAVE_LIBSSL with HAVE_OPENSSL 2011-02-18 22:43:50 +09:00
Tatsuhiro Tsujikawa 7230fbd2f7 Replaced HAVE_LIBZ with HAVE_ZLIB 2011-02-18 22:34:38 +09:00
Tatsuhiro Tsujikawa 5b62fa9ab1 Use PKG_CONFIG_PATH along with PKG_CHECK_MODULES in openssl.m4 and libz.m4.
Replaced LIBZ_LIB and LIBZ_CPPFLAGS with ZLIB_LIB and ZLIB_CFLAGS
respectively.
2011-02-18 21:51:23 +09:00
Tatsuhiro Tsujikawa 3f125dce21 Use LIBS and CPPFLAGS instead of substituting them individually per
library.
2011-02-18 18:53:53 +09:00
Tatsuhiro Tsujikawa 2ba2511dd5 Check presence of ar.
This change allows configure to find appropriate ar at cross compile.
2011-01-29 21:33:57 +09:00
Tatsuhiro Tsujikawa 91a4f2d210 Bump up version number to 1.10.9. 2011-01-10 12:51:52 +09:00
Tatsuhiro Tsujikawa 7a7c95fa15 Bump up version number to 1.10.8 2010-12-18 21:26:38 +09:00
Tatsuhiro Tsujikawa 479f71efaf Bump up version number to 1.10.7 2010-12-03 11:41:16 +09:00
Tatsuhiro Tsujikawa 7a3faa625b Check a2x, asciidoc presence and only build documents when they are
available.
2010-12-02 23:55:52 +09:00
Tatsuhiro Tsujikawa e39dd96171 Removed autogenerated files by automake/autoconf.
To generate these files, run 'autoreconf -i'.

Since libgnutls.m4 is no longer distributed, we removed
AM_PATH_LIBGNUTLS from configure.ac.
2010-11-27 23:31:17 +09:00
Tatsuhiro Tsujikawa 17e0d93ef0 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.6
	* configure.ac
	* doc/aria2c.1.txt
2010-10-31 08:53:15 +00:00
Tatsuhiro Tsujikawa 6f189138c4 2010-10-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.5
	* configure.ac
	* doc/aria2c.1.txt
2010-10-19 14:50:54 +00:00
Tatsuhiro Tsujikawa f207f3cea5 2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.4
	* configure.ac
	* doc/aria2c.1.txt
2010-10-10 15:18:18 +00:00
Tatsuhiro Tsujikawa 5db7b123b5 2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does
	not handle IPv6 address, IPv6 support is limited in this
	case. Fixed unit test error under mingw32.
	* configure.ac
	* src/AsyncNameResolver.cc
	* src/SocketCore.cc
	* src/bittorrent_helper.cc
	* test/BittorrentHelperTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-10-04 14:33:49 +00:00
Tatsuhiro Tsujikawa 880c6b5498 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated autoconf 2.67
	* configure.ac
2010-09-11 12:28:34 +00:00
Tatsuhiro Tsujikawa 350b6f616c 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.3
	* configure.ac
	* doc/aria2c.1.txt
2010-09-11 12:23:12 +00:00
Tatsuhiro Tsujikawa 13cb9d5bfe 2010-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.2
	* configure.ac
	* doc/aria2c.1.txt
2010-08-31 13:52:40 +00:00
Tatsuhiro Tsujikawa a478cfecc4 2010-08-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number 1.10.1
	* configure.ac
	* doc/aria2c.1.txt
2010-08-25 12:38:21 +00:00
Tatsuhiro Tsujikawa 27e96877b7 2010-07-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten check for fallocate using AC_COMPILE_IFELSE.
	* configure.ac
	* m4/fallocate.m4
2010-07-27 14:37:25 +00:00
Tatsuhiro Tsujikawa 253c0ba353 2010-07-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that HAVE_SOME_FALLOCATE gets undefined if fallocate
	is not available even if posix_fallocate is available. This causes
	FallocFileAllocationIterator.cc is out of compile targets and
	linker error.
	* configure.ac
2010-07-26 12:20:19 +00:00
Tatsuhiro Tsujikawa e7ca63949c 2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.0
	* configure.ac
	* doc/aria2c.1.txt
2010-07-17 03:41:43 +00:00
Tatsuhiro Tsujikawa a5cc350dcf 2010-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
When allocating disk space, for Linux system with fallocate()
	system call, first check file system supports fallocate.  This
	just run fallocate with small chunk and see it succeeds or fails.
	If it succeeds, use fallocate() to allocate entire file otherwise
	fall back to traditional slower method: writing zeros. This
	behavior is enabled in --file-allocation=prealloc, so this is
	enabled by default for most modern Linux.
	* configure.ac
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/AdaptiveFileAllocationIterator.cc
	* src/AdaptiveFileAllocationIterator.h
	* src/DefaultPieceStorage.cc
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/FallocFileAllocationIterator.cc
	* src/Makefile.am
	* src/MultiFileAllocationIterator.cc
	* src/OptionHandlerFactory.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/Makefile.am
2010-07-04 15:03:35 +00:00
Tatsuhiro Tsujikawa 1d8bceba2f 2010-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.5
	* configure.ac
	* doc/aria2c.1.txt
2010-06-28 12:17:36 +00:00
Tatsuhiro Tsujikawa fdf5c0109b 2010-06-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.4
	* configure.ac
	* doc/aria2c.1.txt
2010-06-01 12:56:21 +00:00
Tatsuhiro Tsujikawa 5cd6baa13e 2010-05-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.3.
	* configure.ac
2010-05-07 03:54:26 +00:00
Tatsuhiro Tsujikawa 2480b0efcc 2010-04-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.2
	* configure.ac
	* doc/aria2c.1.txt
2010-04-25 10:15:00 +00:00
Tatsuhiro Tsujikawa 5d636df361 2010-04-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added kqueue support. We use poll() for
	SocketCore::isReadable()/isWritable() when kqueue is used.
	* configure.ac
	* src/DownloadEngineFactory.cc
	* src/KqueueEventPoll.cc
	* src/KqueueEventPoll.h
	* src/Makefile.am
	* src/Makefile.in
	* src/OptionHandlerFactory.cc
	* src/main.cc
	* src/prefs.cc
	* src/prefs.h
2010-04-24 13:07:35 +00:00
Tatsuhiro Tsujikawa 9cf05b7115 2010-04-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added opensolaris port_associate() support.
	* src/DownloadEngineFactory.cc
	* src/Makefile.am
	* src/OptionHandlerFactory.cc
	* src/PortEventPoll.cc
	* src/PortEventPoll.h
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/configure.ac
	* src/main.cc
	* src/prefs.cc
	* src/prefs.h
2010-04-21 14:31:44 +00:00
Tatsuhiro Tsujikawa 0ec50a8d50 2010-04-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Supported poll() for socket event notification.  --event-poll can
	take value "poll". Fixed the bug that timeout for
	SocketCore::isReadable()/isWritable() is ignored when epoll is
	used.
	* src/OptionHandlerFactory.cc
	* src/a2io.h
	* src/prefs.h
	* src/SocketCore.h
	* src/Makefile.am
	* src/main.cc
	* src/PollEventPoll.h
	* src/SocketCore.cc
	* src/DownloadEngineFactory.cc
	* src/PollEventPoll.cc
	* src/prefs.cc
	* configure.ac
2010-04-19 12:53:58 +00:00
Tatsuhiro Tsujikawa fb9590d176 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added AC_SEARCH_LIBS for inet_aton on opensolaris.  opensolaris
	needs -lnsl for inet_aton.
	* configure.ac
2010-04-14 13:59:10 +00:00
Tatsuhiro Tsujikawa 91e7127396 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Implemented clock_gettime() using mach_absolute_time in Mac OS X.
	* configure.ac
	* src/Makefile.am
	* src/a2time.h
	* src/clock_gettime_osx.cc
	* src/clock_gettime_osx.h
2010-04-13 16:06:59 +00:00
Tatsuhiro Tsujikawa 7e22cc38bb 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Implemented clock_gettime() using timeGetTime in mingw.
	* configure.ac
	* src/Makefile.am
	* src/a2time.h
	* src/clock_gettime_mingw.cc
	* src/clock_gettime_mingw.h
	* src/timespec.h
	* test/Makefile.am
2010-04-13 15:36:56 +00:00
Tatsuhiro Tsujikawa 6e9a25798c 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added nsl to search-libs for getaddrinfo on opensolaris
	* configure.ac
2010-04-11 15:57:45 +00:00
Tatsuhiro Tsujikawa f2697552ae 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on opensolaris
	* configure.ac
	* src/Logger.h
	* src/GZipEncoder.h
2010-04-11 15:44:37 +00:00
Tatsuhiro Tsujikawa 0529e78187 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use clock_gettime(CLOCK_MONOTONIC, ...) if it is available and
	usable to prevent from aria2 from being affected by system time
	change.
2010-04-11 08:28:22 +00:00
Tatsuhiro Tsujikawa f98319469f 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.1
	* configure.ac
2010-04-03 14:13:26 +00:00
Tatsuhiro Tsujikawa a7c2cafeac 2010-03-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.0
	* configure.ac
2010-03-08 15:03:02 +00:00
Tatsuhiro Tsujikawa 674eff7da3 2010-02-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Print CXXFLAGS
	* configure.ac
2010-02-16 14:54:49 +00:00
Tatsuhiro Tsujikawa 34916ad0ea 2010-02-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.0a
	* configure.ac
	* doc/aria2c.1.txt
2010-02-14 08:40:02 +00:00
Tatsuhiro Tsujikawa 403e8c5754 2010-01-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.8.2
	* configure.ac
2010-01-28 15:06:10 +00:00
Tatsuhiro Tsujikawa c398a73343 2010-01-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.8.1
	* configure.ac
2010-01-17 14:15:55 +00:00
Tatsuhiro Tsujikawa 62e4ae20f6 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Run autoupdate
	* configure.ac
2010-01-06 15:01:27 +00:00
Tatsuhiro Tsujikawa 3465e87167 2009-12-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.8.0.
	* configure.ac
2009-12-27 03:20:53 +00:00
Tatsuhiro Tsujikawa b19e292157 2009-12-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that if --without-sqlite3 is given, pkg-config is
	not properly used in configure script and failed to detect gnutls.
	This is because explicit call of PKG_PROG_PKG_CONFIG is missing
	and the initialization of pkg-config is done in first occurrence
	of PKG_CHECK_MODULES which is not executed because it is inside of
	sqlite3.m4. Added explicit PKG_PROG_PKG_CONFIG call.
	* configure.ac
2009-12-16 12:04:40 +00:00
Tatsuhiro Tsujikawa 52f652d46d 2009-12-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.7.2
	* configure.ac
2009-12-12 12:59:22 +00:00
Tatsuhiro Tsujikawa 431b58196c 2009-12-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.7.1
	* configure.ac
2009-12-06 12:45:25 +00:00
Tatsuhiro Tsujikawa 80f832cd19 2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.7.0
	* configure.ac
2009-12-05 11:46:50 +00:00
Tatsuhiro Tsujikawa d2816a2a19 2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
In configure script, if --with-PACKAGE and --enable-FEATURE are
	given and PACKAGE is missing in the system or FEATURE cannot be
	enabled, print error message and stop the script.
	* configure.ac
	* m4/aria2_arg.m4
2009-12-05 06:33:07 +00:00
Tatsuhiro Tsujikawa 4156debe5c 2009-12-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --interface option.  This feature binds sockets to given
	interface. You can specify interface name, IP address and
	hostname.
	* configure.ac
	* src/OptionHandlerFactory.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/main.cc
	* src/message.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2009-12-03 14:41:08 +00:00
Tatsuhiro Tsujikawa b63cd3a82a 2009-10-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.6.3
	* configure.ac
2009-10-29 14:59:06 +00:00
Tatsuhiro Tsujikawa f92983cc81 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.6.2
	* configure.ac
2009-10-10 08:36:26 +00:00
Tatsuhiro Tsujikawa fb70a0e69c 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added AC_FUNC_STRTOD and AC_TYPE_PID_T.  Check function for pow,
	utime. Check header for utime.h.
	* configure.ac
2009-10-10 08:16:44 +00:00
Tatsuhiro Tsujikawa 1af73e306c 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use AC_FUNC_FORK. Replaced HAVE_FORK with HAVE_WORKING_FORK.
	* configure.ac
	* src/daemon.cc
2009-10-10 08:09:16 +00:00
Tatsuhiro Tsujikawa cb69cca675 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't set localedir manually. Leave it to autoconf.
	* configure.ac
	* src/Makefile.am
2009-10-10 08:03:27 +00:00
Tatsuhiro Tsujikawa f31fa015bb 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --install to ACLOCAL_AMFLAGS.
	Removed m4 from SUBDIRS.
	Updated automake 1.11 and autoconf 2.64.
	Replaced some obsolute macros with new one.
	* Makefile.am
	* configure.ac
	* m4/aria2_arg.m4
2009-10-10 07:54:39 +00:00
Tatsuhiro Tsujikawa 52e4d99384 2009-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed Makefile.am in m4 directory.
	* configure.ac
	* m4/ChangeLog
	* m4/Makefile.am
	* m4/Makefile.in
2009-10-10 07:29:12 +00:00
Tatsuhiro Tsujikawa 97b921ef17 2009-10-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.6.1
	* configure.ac
2009-10-06 13:11:39 +00:00
Ross Smith II 263aebc558 Add check for fork(), which is missing on MinGW
* src/daemon.cc
* configure.ac
2009-09-23 21:35:10 +00:00
Tatsuhiro Tsujikawa 6293908a9d 2009-09-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added our own daemon() function for systems which desn't have
	daemon(3).
	* configure.ac
	* src/Makefile.am
	* src/daemon.cc
	* src/daemon.h
	* src/option_processing.cc
2009-09-19 09:05:20 +00:00
Tatsuhiro Tsujikawa 9eb3242216 2009-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.6.0.
	* configure.ac
2009-09-05 15:11:06 +00:00
Tatsuhiro Tsujikawa 2b290421d8 2009-08-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.5.2
	* configure.ac
2009-08-19 14:12:04 +00:00
Tatsuhiro Tsujikawa bbae39572d 2009-07-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.5.1
	* configure.ac
2009-07-26 13:57:51 +00:00
Tatsuhiro Tsujikawa 55a35ad2a2 2009-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Handle the situation where struct option.name is char *.
	* configure.ac
	* src/OptionParser.cc
2009-07-14 13:22:26 +00:00
Tatsuhiro Tsujikawa 0fdbf1b09c 2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.5.0
	* configure.ac
2009-07-05 09:20:18 +00:00
Tatsuhiro Tsujikawa 1f35ea536a 2009-06-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.4.1.
	* configure.ac
2009-06-07 07:52:40 +00:00
Tatsuhiro Tsujikawa b60f5d7338 2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed typo
	* configure.ac
2009-05-23 05:22:05 +00:00
Tatsuhiro Tsujikawa aafbe6f74b 2009-05-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Since upcoming libgnutls 2.8 doesn't have libgnutls-config, Check
	presence of libgnutls using pkg-config first. If it fails, fall
	back to old macro libgnutls.m4.
	* configure.ac
2009-05-23 05:20:21 +00:00
Tatsuhiro Tsujikawa 770d84cec4 2009-05-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.4.0
	* configure.ac
2009-05-16 07:58:43 +00:00
Tatsuhiro Tsujikawa 0666b1ea98 2009-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined ENABLE_XML_RPC
	* configure.ac
	* configure
	* config.h.in
2009-05-15 08:24:56 +00:00
Tatsuhiro Tsujikawa 3e4c549c01 2009-05-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added missing AM_CONDITIONAL
	* configure.ac
2009-05-08 08:03:36 +00:00
Tatsuhiro Tsujikawa aba7efb95c 2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Generated configure and Makefile.in using autoconf 2.63 and
	automake 1.10.2.  Removed AC_GNU_SOURCE from configure.ac because
	it is subset of AC_USE_SYSTEM_EXTENSIONS and we use latter.
	* configure.ac
2009-05-06 08:00:57 +00:00
Tatsuhiro Tsujikawa 7893340cb3 2009-05-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.3.3
	* configure.ac
2009-05-05 03:32:13 +00:00
Tatsuhiro Tsujikawa f80abe91d2 2009-04-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.3.2
	* configure.ac
2009-04-27 12:33:21 +00:00
Tatsuhiro Tsujikawa 933cdd6949 2009-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Set conditional HAVE_GETADDRINFO true for mingw32. It was
	accidentally set to false in r1162.	
	* configure.ac
2009-04-14 12:23:31 +00:00
Tatsuhiro Tsujikawa 72b43d378e 2009-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.3.1
	* configure.ac
2009-04-12 15:40:23 +00:00
Tatsuhiro Tsujikawa 4c950934a0 2009-03-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed AC_FUNC_MALLOC and AC_FUNC_REALLOC because 0-byte
	malloc/realloc is not used.
	* src/configure.ac
2009-03-28 16:33:45 +00:00
Tatsuhiro Tsujikawa 29c5ef9215 2009-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added 'falloc' parameter for --file-allocation option.  'falloc'
	allocation mode uses posix_fallocate() system call to allocate
	file on disk.  If you are using newer file systems such as ext4
        (with extents support), btrfs or xfs, 'falloc' is your best
	choice. It allocates large(few GiB) files almost instantly.
	Don't use 'falloc' with legacy file systems such as ext3 because
	it takes almost same time as 'prealloc' and it blocks aria2
	entirely until allocation finishes. 'falloc' may not be
	available if your system doesn't have posix_fallocate() system
	call.
	* configure.ac
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/BinaryStream.h
	* src/BtCheckIntegrityEntry.cc
	* src/ByteArrayDiskWriter.h
	* src/CheckIntegrityEntry.cc
	* src/CheckIntegrityEntry.h
	* src/DefaultPieceStorage.cc
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/DiskWriter.h
	* src/FallocFileAllocationIterator.cc
	* src/FallocFileAllocationIterator.h
	* src/FileAllocationEntry.cc
	* src/FileAllocationEntry.h
	* src/Makefile.am
	* src/MultiFileAllocationIterator.cc
	* src/MultiFileAllocationIterator.h
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/StreamCheckIntegrityEntry.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/FallocFileAllocationIteratorTest.cc
	* test/Makefile.am
2009-03-25 05:43:07 +00:00
Tatsuhiro Tsujikawa baeee19593 2009-03-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.3.0
	* configure.ac
2009-03-13 13:46:48 +00:00
Tatsuhiro Tsujikawa 44e574e2fe 2009-02-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed HAVE_SOCKADDR_SIN_LEN as HAVE_SOCKADDR_IN_SIN_LEN
	* configure.ac
2009-02-11 16:14:22 +00:00
Tatsuhiro Tsujikawa c0f13f9e69 2009-02-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added a check to see struct sockaddr_in has sin_len member.
	* configure.ac
2009-02-11 16:12:07 +00:00
Tatsuhiro Tsujikawa bbb3589293 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed configure error with --disable-epoll
	* configure.ac
2009-02-06 16:51:00 +00:00
Tatsuhiro Tsujikawa 970b887fbc 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.2.0
	* configure.ac
2009-02-01 03:56:40 +00:00
Tatsuhiro Tsujikawa 1ab8ade5d1 2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --event-poll option to select the method for polling
	events.
	The available methods are "select" and "epoll". "epoll" is
	available on Linux only. The earlier release has the compile
	option to choose from these methods.
	* configure.ac
	* src/RequestGroupMan.cc
	* src/OptionHandlerFactory.cc
	* src/EpollEventPoll.h
	* src/StreamFileAllocationEntry.cc
	* src/a2io.h
	* src/SelectEventPoll.h
	* src/option_processing.cc
	* src/prefs.h
	* src/EpollEventPoll.cc
	* src/EventPoll.h
	* src/SocketCore.h
	* src/Makefile.am
	* src/main.cc
	* src/DownloadEngine.h
	* src/SelectEventPoll.cc
	* src/DownloadEngine.cc
	* src/SocketCore.cc
	* src/DownloadEngineFactory.cc
	* src/Makefile.in
	* src/prefs.cc
	* src/usage_text.h
2009-01-15 15:23:16 +00:00
Tatsuhiro Tsujikawa 2d5a2e7c16 2008-12-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.1.2
	* configure.ac
2008-12-29 14:08:11 +00:00
Tatsuhiro Tsujikawa fb466a6a40 2008-12-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.1.1.
	* configure.ac
2008-12-24 11:04:43 +00:00
Tatsuhiro Tsujikawa f7c4a1f728 2008-12-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.1.0.
	* configure.ac
2008-12-17 12:10:37 +00:00
Tatsuhiro Tsujikawa 63ddc1f147 2008-12-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Enabled --check-certificate by default.  Added compile
	time(configure) option --with-ca-bundle to specify CA bundle.
	Warn if --check-certificate=true and --ca-certificate is not
	specified or loading CA certificate is failed.
	* configure.ac
	* src/MultiUrlRequestInfo.cc
	* src/OptionHandlerFactory.cc
	* src/message.h
2008-12-03 16:07:14 +00:00
Tatsuhiro Tsujikawa 94f912ffef 2008-12-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed the package name from `aria2c' to `aria2' in order to
	fix the packaging issue in Debian and Fedora.  The name of the
	executable is not changed.
	* configure.ac
2008-12-02 11:07:21 +00:00
Tatsuhiro Tsujikawa c881532c65 2008-11-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.0.1
	* configure.ac
2008-11-24 11:21:13 +00:00
Tatsuhiro Tsujikawa 0867efec33 2008-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.0.0
	* configure.ac
2008-11-18 12:18:52 +00:00
Tatsuhiro Tsujikawa 091dad70cc 2008-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Dropped ares support.
	* README
	* configure.ac
	* m4/libares.m4: Removed.
	* src/AsyncNameResolver.cc
	* src/Makefile.am
	* test/Makefile.am
2008-11-18 11:20:53 +00:00
Tatsuhiro Tsujikawa cc1546feb5 2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.0.0b
	* configure.ac
2008-11-13 16:15:16 +00:00
Tatsuhiro Tsujikawa 9a581e2cab 2008-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed error when SSL library is not found.
	* configure.ac
2008-11-11 12:47:26 +00:00
Tatsuhiro Tsujikawa 383be271a2 2008-11-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.0.0a.
	* configure.ac
2008-11-09 09:16:29 +00:00
Tatsuhiro Tsujikawa e62d27e28e 2008-11-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated configure.ac
	* configure.ac
2008-11-09 09:15:03 +00:00
Tatsuhiro Tsujikawa 4ecdba5979 2008-10-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.16.2
	* configure.ac
2008-10-19 15:02:07 +00:00
Tatsuhiro Tsujikawa a0559baf8e 2008-10-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.16.1.
	* configure.ac
2008-10-13 14:05:54 +00:00
Tatsuhiro Tsujikawa 529477ccda 2008-10-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.16.0.
	* configure.ac
2008-10-06 08:13:42 +00:00
Tatsuhiro Tsujikawa 60b37d3367 2008-10-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Check the availability of winsock2.h and ws2tcpip.h only for 
mingw32
	build.
	* configure.ac
2008-10-04 03:19:22 +00:00
Tatsuhiro Tsujikawa 40c1d08c5a 2008-09-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.16.0b
	* configure.ac
2008-09-05 13:18:39 +00:00
Tatsuhiro Tsujikawa 0cac0dabde 2008-08-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added firefox3 cookie support based on the patch submitted by
	tizianomueller.
	firefox3 cookie is SQLite3 database. libsqlite3 is required to 
enable
	this functionality.
	* configure.ac
	* m4/sqlite3.m4
	* src/CookieBoxFactory.cc
	* src/CookieBoxFactory.h
	* src/Makefile.am
	* src/Makefile.in
	* src/Sqlite3MozCookieParser.cc
	* src/Sqlite3MozCookieParser.h
	* src/main.cc
	* test/CookieBoxFactoryTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/Sqlite3MozCookieParserTest.cc
	* test/badcookies.sqlite
	* test/cookies.sqlite
2008-08-17 10:44:12 +00:00
Tatsuhiro Tsujikawa 057516d1bc 2008-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added AC_C_BIGENDIAN
	* src/configure.ac
2008-08-07 15:33:29 +00:00
Tatsuhiro Tsujikawa 37f9607189 2008-08-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.1+2
	* configure.ac
2008-08-04 15:25:54 +00:00
Tatsuhiro Tsujikawa 919f775110 2008-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.1+1
	* configure.ac
2008-08-03 13:42:09 +00:00
Tatsuhiro Tsujikawa b6538b9c7a 2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.1
	* configure.ac
2008-07-31 15:29:26 +00:00
Tatsuhiro Tsujikawa 48abc5abcb 2008-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.0
	* configure.ac
2008-07-23 13:08:48 +00:00
Tatsuhiro Tsujikawa 9074b79635 2008-07-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.0b
	* configure.ac
2008-07-13 12:18:12 +00:00
Tatsuhiro Tsujikawa 570837b325 2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Cleaned up configure.ac.
	* configure.ac
2008-06-29 15:35:04 +00:00
Tatsuhiro Tsujikawa dd97f4f0a4 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use ARIA2_ARG_WITH and ARIA2_ARG_ENABLE instead of AC_ARG_WITH 
and
	AC_ARG_ENABLE.
	* configure.ac
2008-06-29 14:35:32 +00:00
Tatsuhiro Tsujikawa d791807add 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added gzip, deflate decoding support in HTTP using libz. If 
compiled
	with this feature, aria2 sends "Accept-Encoding: deflate, gzip" 
header
	to a HTTP server. If a server returns "Content-Encoding: gzip" 
or
	"Content-Encoding: deflate" then, aria2 decodes the response 
body on the
	fly and writes decoded data to a local disk.
	* README
	* README.html
	* configure.ac
	* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, 
they are
	wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
	* m4/libz.m4
	* src/Decoder.h
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/Exception.h
	* src/GZipDecoder.cc
	* src/GZipDecoder.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/Makefile.am
	* test/GZipDecoderTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/gzip_decode_test.gz
2008-06-29 14:29:36 +00:00
Tatsuhiro Tsujikawa 459f2f16a6 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.15.0dev. "dev" means "development"
	version, which means I started the development of the next 
release! 
	* src/configure.ac
2008-06-24 14:56:23 +00:00
Tatsuhiro Tsujikawa cfcf9bfc65 2008-06-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.14.0+1
	* src/configure.ac
2008-06-24 11:17:02 +00:00
Tatsuhiro Tsujikawa 5f8402b40d 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.14.0
	* src/configure.ac
2008-06-20 13:11:25 +00:00
Tatsuhiro Tsujikawa 5c28bb3beb 2008-06-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added configure option to enable/disable epoll support.
	* configure.ac
2008-06-20 12:04:49 +00:00
Tatsuhiro Tsujikawa b559054701 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied Ross's aria2-0.13.2+1-mingw.patch and
	aria2-0.13.2+1-mingw-2.patch.
	* src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for 
the
	systems	which don't have termious.h. I moved the directive 
inside of
	if(isTTY) { ... clause so that line is wiped out without 
termious.h.
	I also removed HAVE_ASCTIME_R clause because asctime_r is 
provided
	anyway.
	* src/asctime_r.h
	* src/asctime_r.c: Added for the systems don't have asctime_r 
function.
	I added 2nd argument to the prototype declaration.
	* src/StringFormat.cc: Get rid of vasprintf.
	* src/getaddrinfo.h: Fixed constants.
	* configure.ac: Added the check for asctime_r function.
	* src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
2008-06-16 11:19:45 +00:00
Tatsuhiro Tsujikawa 95ca33bba3 2008-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.14.0b.
	* src/configure.ac
2008-06-10 14:31:08 +00:00
Tatsuhiro Tsujikawa 54ee6c4627 2008-05-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added epoll support. Use epoll if it is available. If not, use 
select.
	When async dns is enabled in compile time, epoll support is 
enabled
	only when aria2 is built with c-ares. This condition statement 
is
	defined in a2io.h.
	Currently aria2 supports both c-ares and ares, but ares is 
maintained
	for quite a while and debian already has c-ares package, ares 
support
	will be dropped in the future version.
	* configure.ac
	* src/AbstractCommand.cc
	* src/AsyncNameResolver.cc
	* src/AsyncNameResolver.h
	* src/Command.cc
	* src/Command.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/PeerAbstractCommand.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/a2io.h
2008-05-31 10:31:07 +00:00
Tatsuhiro Tsujikawa 4a0c657d8b 2008-05-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2+1
	* src/configure.ac
2008-05-27 15:34:45 +00:00
Tatsuhiro Tsujikawa 19ec823a7a 2008-05-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2
	* src/configure.ac
2008-05-25 01:19:00 +00:00
Tatsuhiro Tsujikawa 9cf401f45d 2008-05-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2rc.
	* src/configure.ac
2008-05-21 07:57:27 +00:00
Tatsuhiro Tsujikawa a2c91b5831 2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2b.
	* configure.ac
2008-05-10 05:47:06 +00:00
Tatsuhiro Tsujikawa b892b54e4b 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.2a
	* configure.ac
2008-04-27 10:50:24 +00:00
Tatsuhiro Tsujikawa 63d7b5039f 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated configure.ac using the result of autoscan.
	* configure.ac
2008-04-27 10:47:43 +00:00
Tatsuhiro Tsujikawa 7578d5fb22 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0+1
	* configure.ac
	
	* Release 0.13.0+1
2008-03-07 11:48:19 +00:00
Tatsuhiro Tsujikawa 62e1cbd0c0 2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's mingw patch.
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* src/Platform.{h, cc}
	* src/timegm.h
	* src/gettimeofday.h
	* src/getaddrinfo.h
	* src/SocketCore.h
	* src/common.h
	* src/inet_aton.h
	* src/DownloadEngine.h
	* src/gai_strerror.h
	* src/a2netcompat.h
	* configure.ac
	* configure
	* aclocal.m4
2008-03-03 15:41:58 +00:00
Tatsuhiro Tsujikawa a31cd44130 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0
	* configure.ac
	
	* Release 0.13.0
2008-03-01 04:44:13 +00:00
Tatsuhiro Tsujikawa b1aeb277aa 2008-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated Makfefile.am to make 'make dist' work.
	Now packaged filename is aria2c-VERSION.tar.bz2.
	Added README, README.html, and aria2c.1.html to dist_doc_DATA.
	Added LICENSE.OpenSSL to dist_noinst_DATA.

	Large file support is now configured by configure script.
	* configure.ac
	
	Removed unsused source files
	* src/
	* test/

	Removed PeerDecl.h and BtContextDecl.h. typedefs are removed to
	Peer.h and BtContext.h respectively.
	* src/Peer.h
	* src/BtContext.h

	Updated translations.
	Added Polish, Thai, Indonesian, Norwegian Nynorsk, Hungarian
	translations. Great thanks to all translators!;)
	* po/*.{po, gmo}
2008-03-01 04:42:53 +00:00
Tatsuhiro Tsujikawa 88cd57f7a2 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0rc
	* configure.ac
2008-02-21 14:41:23 +00:00
Tatsuhiro Tsujikawa c37539eb25 2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump version number to 0.13.0b
	* configure.ac
2008-02-17 16:17:26 +00:00
Tatsuhiro Tsujikawa 79764a1f11 2008-02-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compiler warning about redefinition of SIZE_MAX.
	Use common.h instead of config.h directly here.
	* src/Platform.{h, cc}

	The check of ENABLE_NLS is made in gettext.h, so it is not 
required
	here.
	* common.h
	
2008-02-02  gettextize  <bug-gnu-gettext@gnu.org>

	Updated gettext related files.
	* configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
2008-02-02 04:38:24 +00:00
Tatsuhiro Tsujikawa 3ea4fe447a 2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed possible memory leak when an exception is thrown.
	* src/XML2SAXMetalinkProcessor.cc

	Added Expat support. If both libxml2 and Expat are installed, 
then
	libxml2 is used by default.
	MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor 
and
	ExpatMetalinkProcessor according to the configuration.
	* src/ExpatMetalinkProcessor.{h, cc}
	* src/main.cc: Removed libxml2 specific header and init/free 
function.
	* src/MetalinkProcessorFactory.{h, cc}
	* src/MetalinkHelper.cc
	* src/Metalinker.h: Removed unnecessary libxml2 header.
	* src/MetalinkProcessor.h
	* test/XML2SAXMetalinkProcessorTest.cc: Removed because
	MetalinkProcessorTest is used instead.
	* test/MetalinkProcessorTest.cc: Added. It is actually the same 
with
	XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
	MetalinkProcessorFactory::newInstance().
	* m4/libexpat.m4
	* configure.ac: Added configuration options for libexpat.
2007-12-14 00:46:32 +00:00
Tatsuhiro Tsujikawa 059406ae50 2007-12-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Release 0.12.0
2007-12-08 15:14:26 +00:00
Tatsuhiro Tsujikawa 5a2f398eca 2007-11-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added direct I/O support. The current implementation uses O_DIRECT,
	which is not posix standard and is tested on linux 2.6.21.
	Currently only file allocation uses direct I/O.
	* src/SingleFileAllocationIterator.{h, cc}
	* test/SingleFileAllocationIteratorTest.cc
	* src/MultiFileAllocationIterator.{h, cc}
	* test/MultiFileAllocationIteratorTest.cc
	* src/BinaryStream.h
	* src/DiskWriter.h
	* src/AbstractDiskWriter.{h, cc}
	* src/ByteArrayDiskWriter.h
	* src/DiskAdaptor.h
	* src/AbstractSingleDiskAdaptor.{h, cc}
	* src/MultiDiskAdaptor.{h, cc}
	* src/FileAllocationEntry.cc
	* src/Util.{h, cc}
	* src/OptionHandlerFactory.cc
	* src/prefs.h
	* src/version_usage.cc
	* src/option_processing.cc

	Moved FileAllocationMan::markCurrentFileAllocationEntryDone() to
	handleException.
	* src/MultiFileAllocationIterator.cc

	Added EINTR handling
	* src/SocketCore.cc
2007-11-28 14:22:28 +00:00
Tatsuhiro Tsujikawa 9aee8878be 2007-11-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the check to see whether ares_host_callback accepts 
timeouts
	with c-ares; only c-ares 1.5.0 or newer accepts it.
	* src/NameResolver.{h, cc}
	* m4/libcares.m4
	* configure.ac: Set C++ for language choice.
2007-11-25 04:41:31 +00:00
Tatsuhiro Tsujikawa 59fb4066fb 2007-11-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/version_usage.cc
	(showVersion): Reworked.
	(showUsage): Added examples.

	Removed Hint for total length and file name.
	* src/Metalink2RequestGroup.cc
	* src/RequestGroup.{h, cc}
	* src/HttpResponseCommand.cc
	* src/FtpNegotiationCommand.cc

	Now --follow-torrent and --follow-metalink option work properly.
	* src/RequestGroup.cc

	Updated man page
	* doc/aria2c.1.txt
	* doc/aria2c.1
2007-11-18 11:59:42 +00:00
Tatsuhiro Tsujikawa a31dbb5804 2007-11-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added ifdef and some modifications to compile without 
BitTorrent,
	Metalink, MessageDigest
	support.
	* src/PieceHashCheckIntegrityEntry.cc
	* src/MetalinkEntry.h
	* src/version_usage.cc
	* src/main.cc
	* src/DownloadEngine.{h, cc}
	* src/Metalink2RequestGroup.cc
	* src/Peer.cc
	* src/RequestGroup.cc
	* src/MetalinkHelper.cc
	* test/DefaultPieceStorageTest.cc
	* test/MetalinkPostDownloadHandlerTest.cc
	* test/Metalink2RequestGroupTest.cc

	Hide TOTAL SPD when all downloads complete.
	* src/ConsoleStatCalc.cc

	Log target system information.
	* src/main.cc
2007-11-14 10:10:38 +00:00
Tatsuhiro Tsujikawa 048a2cf597 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
	I've rewritten lots of files and now some headers have forward
	class declarations to reduce compile time.
	The implementation is extremely alpha stage, I recommend to use this
	for testing purpose only.
2007-10-11 16:58:24 +00:00
Tatsuhiro Tsujikawa 295c36c767 2007-09-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated man page.
	* doc/aria2c.1.txt
	
	* Release 0.11.3
2007-09-09 16:17:35 +00:00
Tatsuhiro Tsujikawa 9c1bef16c2 2007-09-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Updated man page.
	* doc/aria2.1.txt
	
	* Release 0.11.3-rc
2007-09-03 14:17:10 +00:00
Tatsuhiro Tsujikawa eb335ef44c 2007-08-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's patch: Removed setmode(). Use _CRT_fmode to enable 
binary
	IO.
	* src/DefaultBtProgressInfoFile.cc
	* src/MetaFileUtil.cc
	* src/SimpleLogger.cc
	* src/SegmentMan.cc
	* src/Util.cc
	* src/Platform.cc
2007-08-26 03:10:09 +00:00
Tatsuhiro Tsujikawa 6aa98f9b9f 2007-08-10 Ross Smith II <aria2spam at smithii dot com>
Move sleep functions to Util class:
	* src/Util.cc
	(sleep): New function.
	(usleep): New function.
	* src/DownloadCommand.cc: sleep -> Util::sleep
	* test/TimeSeedCriteriaTest.cc: sleep -> Util::sleep

	MinGW build enhancements. The following files are added:
	* src/timegm.{c,h}

	Changes to support the above new files:
	* configure.ac
	* src/Makefile.am
	* src/a2time.h
	* src/Util.cc:
	* src/strptime.c: Added support for %Z option.

	Miscellenous build fixes/enhancements.
	* configure.ac: Added summary report.
	* src/Platform.h: Tweaked #include's.
	* src/a2netcompat.h: Tweaked #include's.
	* src/strptime.h: Tweaked #include's.
	* src/gai_strerror.c: Tweaked #include's.
	* src/gai_strerror.h: _D_GETADDRINFO_H -> _D_GAI_STRERROR_H
	* src/getaddrinfo.h: Moved #ifndef __MINGW32__
	* src/gettimeofday.h: Added HAVE_CONFIG_H
2007-08-14 14:51:08 +00:00
Tatsuhiro Tsujikawa 1232c9fc7f Marked 0.11.2 release
Updated man page
2007-08-09 15:34:03 +00:00
Tatsuhiro Tsujikawa 46e8c332cd 2007-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Make a2netcompat.h include a2io.h to fix compilation error:
	* src/a2netcompat.h
	* src/SocketCore.cc: Removed include of a2io.h
	* src/Util.cc: Removed include of a2io.h
	
	Gather time related functions to a2time.h:
	* src/a2time.h: New file.
	* src/DefaultPeerStorage.cc
	* src/SimpleLogger.cc
	* src/Util.{h, cc}
	* src/SimpleRandomizer.h
	* src/TimeA2.{h,cc}
	* src/DownloadCommand.cc
	* src/main.cc

	Removed #ifdef __MINGW32__ since gai_strerror is included in
	a2netcompat.h:
	* src/NameResolver.cc
	
	Fixed compilation error without openssl:
	* src/SocketCore.{h,cc}: Moved include of openssl/err.h to 
SocketCore.h

	Added default block to suppress compiler warnings:
	* src/MetalinkRequestInfo.cc (AccumulateNonP2PUrl::operator())
	
2007-07-26  Ross Smith II  <aria2spam at smithii dot com>

	MinGW build enhancements. The following files are added:
	* src/gai_strerror.{c,h}
	* src/gettimeofday.{c,h}

	Changes to support the above new files:
	* configure.ac
	* src/Makefile.am
	* src/a2netcompat.h
	* src/TimeA2.cc
	* src/DefaultPeerStorage.cc
	* src/NameResolver.cc: removed mingw_strerror() function.
	* src/SocketCore.cc: removed mingw_strerror() function.

	Miscellaneous MinGW build fixes. 
	* src/a2io.h: Use _lseeki64() instead of lseek()
	* src/common.h
	* src/DefaultFileAllocator.cc
	* src/GlowFileAllocator.cc
	* src/main.cc: Moved #include "prefs.h" to quiet compile error.
	* src/NameResolver.cc
	(callback): Changed int32_t to int.
	(resolve): Changed int32_t to int.
	* src/Platform.cc
	* src/Platform.h
	* test/MultiDiskWriterTest.cc
	* test/PeerMessageUtilTest.cc
	* src/localtime_r.c: Add DeleteCriticalSection() and at exit().

	Other enhancements and fixes.
	* src/HttpRequestCommand.cc
	(executeInternal) Use non-blocking socket for HTTPS (MinGW 
only).
	* src/SocketCore.cc: 
	(error): New function to abstract errno/WSAGetLastError().
	(errorMsg): New function to abstract errno/WSAGetLastError().
	(initiateSecureConnection): Added more detailed error reporting.
	* src/SocketCore.h: Added private variable blocking, to allow
	proper handling of OpenSSL psuedo-errors.
	* src/message.h
	(EX_SSL_INIT_FAILURE)
	(EX_SSL_IO_ERROR)
	(EX_SSL_PROTOCOL_ERROR)
	(EX_SSL_UNKNOWN_ERROR)
	(EX_SSL_CONNECT_ERROR)
	(EX_SOCKET_BLOCKING)
	(EX_SOCKET_NONBLOCKING)
	(EX_SOCKET_UNKNOWN_ERROR)
	* src/Util.cc
	(setGlobalSignalHandler): Renamed signal to sig as signal is a
	reserved name.
	(httpGMT): Fixed typo.
2007-07-31 16:45:16 +00:00
Tatsuhiro Tsujikawa 380e3f0187 2007-07-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's win32 patch(manually)
	In the course of merging, following files are added.
	* src/strptime.{h,c}
	* src/libgen.{h,c}
	* src/inet_aton.{h,c}
	* src/Platform.{h,cc}
	* src/localtime_r.{h,c}
	* src/getaddrinfo.{h,c}
	I've gethered network related things, and put them to following 
file:
	* src/a2netcompat.h
	Also io related things are put to following file:
	* src/a2io.h
	
	Changed %lld to %s because mingw32 doesn't recognize %lld.
	* src/message.h
	(MSG_ALLOCATION_COMPLETED)
	(EX_TOO_LARGE_FILE)
	(EX_SIZE_MISMATCH)
	(EX_FILE_OFFSET_OUT_OF_RANGE)
	(EX_INVALID_CHUNK_CHECKSUM)
	(EX_INVALID_RANGE_HEADER)
	* src/FileAllocationCommand.cc
	* src/HttpResponse.cc
	* src/RequestGroup.cc
	* src/MultiDiskAdaptor.cc
	* src/OptionHandlerImpl.h
	* src/HttpResponseCommand.cc
	* src/FtpNegotiateCommand.cc
	* src/IteratableChecksumValidator.cc
	* src/SegmentMan.cc
	* src/ChunkChecksumValidator.cc
	
	Added Randomizer::getRandomNumber(long int)
	* src/Randomizer.h (getRandomNumber)
	* src/SimpleRandomizer.h (getRandomNumber)
	* src/BitfieldMan.cc (getMissingIndexRandomly): Use this new 
function.
	* src/Util.cc (randomAlpha): Use this new function.
2007-07-23 13:04:48 +00:00
Tatsuhiro Tsujikawa 18480a08df Updated po files 2007-07-10 00:05:16 +00:00
Tatsuhiro Tsujikawa 800bc3a6c3 Fixed compile error when message digest is not available. 2007-07-04 16:04:57 +00:00
Tatsuhiro Tsujikawa 583f6c9c22 2007-07-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fix the bug that causes -s option not to work.
	* src/main.cc (main)
	* src/a2algo.h: New file.
2007-07-02 12:40:40 +00:00
Tatsuhiro Tsujikawa 1e8b472ea2 2007-06-05 14:04:30 +00:00
Tatsuhiro Tsujikawa 5377be3680 Updated to 0.10.2+1 2007-03-29 11:31:15 +00:00
Tatsuhiro Tsujikawa a1b57c5755 2007-03-27 16:38:11 +00:00
Tatsuhiro Tsujikawa aa1730d1f3 * Release 0.10.1 2007-02-06 15:54:39 +00:00
Tatsuhiro Tsujikawa 77a05c00b1 2007-01-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To fix segfault in Metalink download:
	
	* src/UrlRequestInfo.h
	(filename): Removed.
	(totalLength): Removed.
	(setTotalLength): Removed.
	(setFilename): Removed.
	* src/MetalinkRequestInfo.cc
	(execute): Do not set filename and totalLength to reqInfo.
	Set chunk checksum to reqInfo if it is not null.
	
	* src/HttpResponseCommand.cc
	(executeInternal): Fixed filename in log.
	(handleDefaultEncoding): Removed the call to initBitfield() and
	markAllPiecesDone().
	(handleOtherEncoding): Added HEAD method handling.
	
	* src/FtpNegotiateCommand.cc
	(executeInternal): Added SEQ_HEAD_OK handling.
	(recvSize): In HEAD handling, set sequence to SEQ_HEAD_OK and
	return false.
	
	* src/FtpNegotiateCommand.h
	(SEQ_HEAD_OK): New definition.
	
	* src/SegmentMan.cc
	(initBitfield): Delete bitfield.
	(isChunkChecksumValidationReady): Fixed the condition.

	* src/UrlRequestInfo.cc: Fixed so that Metalink and Torrent 
download
	works fine.
2007-01-29 16:46:48 +00:00
Tatsuhiro Tsujikawa cd91e2ea4f 2007-01-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/Xml2MetalinkProcessor.h
	(xpathExists): New function.
	* src/Xml2MetalinkProcessor.cc
	(xpathExists): New function.

	Not to send HEAD request if filename and size are available in 
Metalink
	file:
	* src/UrlRequestInfo.h
	(filename): New variable.
	(totalLength): New variable.
	(setTotalLength): New function.
	(setFilename): New function.
	* src/MetalinkRequestInfo.cc
	(execute): Set filename and size to UrlRequestInfo.
	* src/MetalinkEntry.cc
	(MetalinkEntry): Initialize size with 0.
	* src/UrlRequestInfo.cc
	(execute): Set filename and size to SegmentMan.
	
	Not to download rest of the files after selected files are 
downloaded
	in BitTorrent:
	* src/PieceStorage.h
	(allDownloadFinished): New function.
	* src/DefaultBtAnnounce.cc
	(isCompleteAnnounceReady): Use allDownloadFinished instead of
	downloadFinished.
	(getAnnounceUrl): Use allDownloadFinished instead of 
downloadFinished.
	* src/DefaultPieceStorage.cc
	(completePiece): Use allDownloadFinished instead of 
downloadFinished.
	Commented out the call to finishSelectiveDownloadingMode().
	(downloadFinished): Call isFilteredAllBitSet() instead of
	isAllBitSet().
	(allDownloadFinished): New function.
	* src/DefaultBtInteractive.cc
	(addBitfieldMessageToQueue): Call allDownloadFinished() instead 
of
	downloadFinished().
	(checkHave): Call allDownloadFinished() instead of 
downloadFinished().
	* src/TorrentDownloadEngine.cc
	(onEndOfRun): Call allDownloadFinished() instead of 
downloadFinished().
	* src/BitfieldMan.h
	(isFilteredAllBitSet): New function.
	* src/ShareRatioSeedCriteria.h
	(PieceStorage.h): New include.
	(pieceStorage): New variable.
	(evaluate):
	btContext->getTotalLength() -> 
pieceStorage->getCompletedLength()
	* src/BitfieldMan.cc
	(isFilteredAllBitSet): New function.
	(isAllBitSet): Filter is not took into account.
	
	Rename --force-truncate as --allow-overwrite:
	* src/TorrentRequestInfo.cc
	(execute): PREF_FORCE_TRUNCATE -> PREF_ALLOW_OVERWRITE
	* src/main.cc
	(showUsage): --force-truncate -> --allow-overwrite
	* src/message.h
	(EX_FILE_ALREADY_EXISTS): --force-truncate -> --allow-overwrite
	* src/prefs.h
	(PREF_FORCE_TRUNCATE): Removed.
	(PREF_ALLOW_OVERWRITE): New definition.
	* src/SegmentMan.cc
	(shouldCancelDownloadForSafety): --force-truncate -> 
--allow-overwrite
	
	* src/MetalinkRequestInfo.cc
	(execute): Queueing message are now logged in info level.

	* src/common.h
	(LONG_LONG_MAX): Removed.
	(LONG_LONG_MIN): Removed.
	* src/HttpResponseCommand.cc
	(handleDefaultEncoding): LONG_LONG_MAX -> INT64_MAX
	* src/FtpNegotiateCommand.cc
	(recvSize): LONG_LONG_MAX -> INT64_MAX
	
	* src/main.cc
	(showUsage): Added --check-integiry and 
--realtime-chunk-checksum
	command-line option.
	(main): Added --check-integiry and --realtime-chunk-checksum
	command-line option.
	--force-truncate -> --allow-overwrite
	Set initial value of --check-integrity option to false.
	Don't show usage when error occurs while persing command-line 
options.
	Removed deprecated --upload-limit option.
2007-01-28 14:18:35 +00:00
Tatsuhiro Tsujikawa 19c3a4204a 2006-11-08 16:32:00 +00:00
Tatsuhiro Tsujikawa d354e48441 Added man page 2006-10-01 14:11:29 +00:00
Tatsuhiro Tsujikawa 2fb9b5be97 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To rewrite segment download mechanism for HTTP/FTP download.
	Use BitfieldMan to manage segment download.
	* src/HttpResponseCommand.h
	(executeInternal): Pass the reference of segment.
	* src/AbstractCommand.cc
	(prepareForRetry): Call segmentMan->cancelSegment here.
	(onAbort): Call segmentMan->cancelSegment here.
	* src/HttpDownloadCommand.cc
	(prepareForNextSegment): New function.
	* src/DownloadEngineFactory.cc
	(newConsoleEngine): Removed splitter.
	(newTorrentConsoleEngine): Removed splitter.
	* src/Request.h
	(segment): Renamed from seg.
	* src/FtpInitiateConnectionCommand.h
	(executeInternal): Pass the reference of segment.
	* src/AbstractCommand.h
	(executeInternal): Pass the reference of segment.
	* src/pref.h
	(PREF_SEGMENT_SIZE): New definition.
	* src/HttpProxyRequestCommand.h
	(executeInternal): Pass the reference of segment.
	* src/HttpResponseCommand.cc
	(checkResponse): Allowed status 206 when a request range starts 
0.
	(handleDefaultEncoding): Rewritten the code related to Segment.
	(handleOtherEncoding): Rewritten the code related to Segment.
	* src/SegmentMan.h
	(SegmentEntry): New class.
	(SegmentEntries): New type definition.
	(bitfield): New variable.
	(usedSegmentEntries): New variable.
	(onNullBitfield): New function.
	(checkoutSegment): New function.
	(segments): Removed.
	(splitter): Removed.
	(unregisterId): Removed.
	(getSegment): New function(overload)
	(getDownloadedSize): Removed.
	(cancelSegment): New function.
	(completeSegment): New function.
	(initBitfield): New function.
	(hasSegment): New function.
	(getDownloadLength): New function.
	* src/BitfieldMan.h
	(getStartIndex): New function.
	(getEndIndex): New function.
	(getMissingUnusedIndex): New function(overload).
	(getSparseMissingUnusedIndex): New function.	
	* src/BitfieldMan.cc
	(getMissingIndexRandomly): Handle the last byte of bitfield 
properly.
	(getMissingUnusedIndex): New function(overload).
	(Range): New class.
	(getStartIndex): New function.
	(getEndIndex): New function.
	(getSparseMissingUnusedIndex): New function.
	(isBitSetInternal): Return false if the given index is less than 
0.
	* src/HttpInitiateConnectionCommand.h
	(executeInternal): Pass the reference of segment.
	* src/FtpNegotiateCommand.h
	(executeInternal): Pass the reference of segment.
	* src/FtpNegotiateCommand.cc
	(recvSize): Initialize bitfield here.
	* src/FtpTunnelResponseCommand.h
	(executeInternal): Pass the reference of segment.
	* src/HttpConnection.cc
	(createRequest): Rewritten range header processing.
	* src/DownloadCommand.h
	(executeInternal): Pass the reference of segment.
	(prepareForRetry): Removed.
	(prepareForNextSegment): Added an argument segment. Made it a 
virtual
	function.
	* src/main.cc
	(main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
	* src/SegmentMan.cc
	(SegmentMan): Added bitfield. Removed splitter.
	(~SegmentMan): Added bitfield. Removed splitter.
	(unregisterId): Removed.
	(getSegment): Rewritten.
	(updateSegment): Rewritten.
	(save): Rewritten.
	(read): Rewritten.
	(finished): Rewritten.
	(getDownloadedSize): Removed.
	(initBitfield): New function.
	(FindSegmentEntryByIndex): New function object.
	(FindSegmentEntryByCuid): New function object.
	(checkoutSegment): New function.
	(onNullBitfield): New function.
	(getSegment): New function(overload).
	(CancelSegment): New function object.
	(cancelSegment): New function.
	(completeSegment): New function.
	(hasSegment): New function.
	(getDownloadLength): New function.
	* src/FtpInitiateConnectionCommand.cc
	(executeInternal): Load .aria2 file after hostname resolution 
finishes.
	* src/Segment.h: Rewritten.
	* src/Segment.cc (operator<<): New function.
	* src/HttpDownloadCommand.h
	(prepareForNextSegment): New function.
	* src/Request.cc
	(resetUrl): Made segment null.
	* src/DownloadEngine.cc
	(~DownloadEngine): Call cleanQueue before deleting segmentMan.
	* src/HttpProxyRequestCommand.h
	(executeInternal): Pass the reference of segment.
	* src/DownloadCommand.cc
	(executeInternal): Rewritten the code related to Segment.
	(prepareForRetry): Removed.
	(prepareForNextSegment): Rewritten.
	* src/FtpTunnelResponseCommand.h
	(executeInternal): Pass the reference of segment.
	
	To add HTTP 1.1 persistent connection support(experimental)
	* src/HttpRequestCommand.cc
	(executeInternal): Disable keep alive if it is disabled by
	configuration.
	* src/Request.h
	(keepAlive): New variable.
	(isKeepAlive): New function.
	(setKeepAlive): New function.
	* src/pref.h
	(PREF_HTTP_KEEP_ALIVE): New definition.
	* src/HttpResponseCommand.cc
	(executeInternal): Check the remote server supports keep alive.
	* src/HttpConnection.cc
	(createRequest): Send "Connection: close" only if keep alive is
	disabled.
	* src/main.cc
	(main):
	Set the initial value(false) of PREF_KEEP_ALIVE to false.

	To add max download speed limit:
	* src/pref.h
	(PREF_MAX_SPEED_LIMIT): New definition.
	* src/PeerInteractionCommand.cc
	(executeInternal): Added max download speed limit. Not tested 
yet.
	* src/SegmentMan.h
	(PeerStats): New type definition.
	(peerStats): New variable.
	(registerPeerStat): New function.
	(FindPeerStat): New function object.
	(getPeerStat): New function.
	(calculateDownloadSpeed): New function.
	* src/SpeedCalc.h: New class.
	* src/SpeedCalc.cc: New class.
	* src/main.cc
	(main):
	Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means 
the
	download speed is not restricted).
	* src/PeerStat.h: New class.
	* src/SegmentMan.cc
	(registerPeerStat): New function.
	(calculateDownloadSpeed): New function.
	* src/DownloadCommand.cc
	(STARTUP_IDLE_TIME): New definition.
	(DownloadCommand): Register peerStat to segmentMan. Call 
peerStat->
	downloadStart.
	(~DownloadCommand): Call peerStat->downloadStop.
	(executeInternal): Added download speed limitter. Rewritten 
lowest
	speed limitter.

	* src/HttpConnection.cc
	(receiveResponse): Fixed: eohIndex[headerBuf] -> 
headerBuf[eohIndex].
	
	* src/AbstractCommand.cc
	(resolveHostname): Throw DlAbortEx if a name resolution failes.
	Added hostname to the error message.
	
	* src/ConsoleDownloadEngine.cc
	(calculateStatistics): Initialize psize with dlSize.

	* src/PieceMessage.cc
	(receivedAction): Do not call peerInteraction->abortPiece here.
	(onGotWrongPiece): Call peerInteraction->abortPiece here.

	* src/BitfieldMan.h
	(clearAllUseBit): New function.
	(setAllUseBit): New function.
	* src/BitfieldMan.cc
	(clearAllBit): Do not clear useBitfield here.
	(clearAllUseBit): New function.
	(setAllUseBit): New function.
	* src/Piece.cc
	(clearAllBlock): Call bitfield->clearAllUseBit().
2006-09-19 14:52:59 +00:00
Tatsuhiro Tsujikawa 1d52ba244e 2006-08-28 15:40:50 +00:00
Tatsuhiro Tsujikawa f45ad3b5d9 This is release 0.7.2 2006-08-21 14:34:42 +00:00
Tatsuhiro Tsujikawa c3f7478a6e 2006-08-21 14:01:59 +00:00
Tatsuhiro Tsujikawa 4def45feb2 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To fix compilation problem on gcc4.1.1(patch#1542283 by 
tizianomueller)
	* src/NameResolver.h: Added the prototype declaration of 
callback().
	
	To support c-ares library:
	
	* src/AbstractCommand.cc: Replaced HAVE_LIBARES with 
ENABLE_ASYNC_DNS
	* src/FeatureConfig.cc: Replaced HAVE_LIBARES with 
ENABLE_ASYNC_DNS
	* src/FtpInitiateConnectionCommand.h:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
	* src/AbstractCommand.h: Replaced HAVE_LIBARES with 
ENABLE_ASYNC_DNS
	* src/HttpInitiateConnectionCommand.h:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
	* src/NameResolver.cc: Replaced HAVE_LIBARES with 
ENABLE_ASYNC_DNS
	* src/HttpInitiateConnectionCommand.cc:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
	* src/FtpInitiateConnectionCommand.cc:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
	* src/DownloadEngine.h:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
	* src/DownloadEngine.cc:
	Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
2006-08-21 13:18:51 +00:00
Tatsuhiro Tsujikawa 11dc664f83 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
2006-08-14 15:03:38 +00:00
Tatsuhiro Tsujikawa f2d4faad08 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add asynchronous DNS support(libares):

	* src/AbstractCommand.h
	(setNameResolverCheck): New function.
	(disableNameResolverCheck): New function
	(resolveHostname): New function.
	* src/AbstractCommand.cc
	(setNameResolverCheck): New function.
	(disableNameResolverCheck): New function
	(resolveHostname): New function.
	* src/FtpInitiateConnectionCommand.h
	(nameResolver): New function.
	* src/FtpInitiateConnectionCommand.cc
	(Util.h): Included.
	(FtpInitiateConnectionCommand): Call disableReadCheckSocket,
	disableWriteCheckSocket.
	(~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
	(executeInternal): Added async DNS support.
	* src/HttpInitiateConnectionCommand.h
	(nameResolver): New function.
	* src/HttpInitiateConnectionCommand.cc
	(DlRetryEx.h): Included.
	(HttpInitiateConnectionCommand): Call disableReadCheckSocket,
	disableWriteCheckSocket.
	(~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
	(executeInternal): Added async DNS support.
	* src/NameResolver.h: New class. Note: #include <ares.h> is 
surrounded
	by extern "C" declaration.
	* src/NameResolver.cc: New class.
	* src/Util.h:
	(isNumberAndDotsNotation): New function
	* src/Util.cc
	(isNumberAndDotsNotation): New function.
	* src/DownloadEngine.h
	(NameResolver.h): Included.
	(NameResolverEntry): New class.
	(NameResolverEntries): New type definition.
	(addNameResolverCheck): New function.
	(deleteNameResolverCheck): New function.
	* src/DownloadEngine.cc
	(run): Initialize cp with 0.
	(SetDescriptor::operator()): Added for NameResolverEntry.
	(AccumulateActiveUuid::operator()): Added for NameResolverEntry.
	(waitData): Check nameResolver entries.
	(updateFdSet): Update fds in nameResolver entries.
	(addNameResolverCheck): New function.
	(deleteNameResolverCheck): new function.
	
	* src/PeerInteractionCommand.cc
	(executeInternal): Fixed wrong socket handling.

	* src/main.cc
	(main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT 
option to 0.

	* src/Util.cc
	(fileChecksum): Removed the call to ctx.digestReset().
2006-08-11 12:29:55 +00:00
Tatsuhiro Tsujikawa 58dbaafc85 2006-08-08 Tatsuhiro Tsujikawa <tujikawa@rednoah.com>
* src/FtpNegotiateCommand.cc
	(recvGreeting): Call disableWriteCheckSocket just after
	socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.

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

	* src/PeerChokeCommand.h
	(PeerChokeCommand): Rearranged the arguments.
	* src/PeerChokeCommand.cc
	(PeerChokeCommand): Rearranged the arguments.

	* src/MetalinkEntry.h
	(Checksum.h): Included.
	(md5): Removed.
	(sha1): Removed.
	(checksum): New variable.
	(operator=): Updated.
	(check): Removed.

	* src/prefs.h
	(PREF_LOWEST_SPEED_LIMIT): New definition.
	(PREF_FOLLOW_TORRENT): New definition.
	(PREF_SELECT_FILE): New definition.
	(PREF_FOLLOW_METALINK): New definition.

	* src/MetalinkResource.h
	(TYPE_HTTPS): Added to enum TYPE.

	* src/TorrentMan.cc
	(~TorrentMan): Rewritten.

	* src/MultiDiskWriter.cc
	(MultiDiskAdaptor): Updated according to the changes in
	MessageDigestContext.
	(~MultiDiskAdaptor): Updated according to the changes in
	MessageDigestContext.
	(hashUpdate): Updated according to the changes in 
MessageDigestContext.
	(sha1Sum): Updated according to the changes in 
MessageDigestContext.

	* src/Util.h
	(fileChecksum): Updated according to the changes in
	MessageDigestContext.
	* src/Util.cc
	(sha1Sum): Updated according to the changes in 
MessageDigestContext.
	(fileChecksum): Updated according to the changes in
	MessageDigestContext.

	* src/messageDigest.h: Rewritten.

	* src/MetalinkEntry.cc
	(check): Removed.
	(Supported): Updated.
	(dropUnsupportedResource): Fixed a memory leak.

	* src/ShaVisitor.cc
	(ShaVisitor): Updated according to the changes in 
MessageDigestContext.
	(~ShaVisitor): Updated according to the changes in
	MessageDigestContext.
	(visit): Updated according to the changes in 
MessageDigestContext.

	* src/main.cc
	(main): Rewritten the portion of download loop. 
--lowest-speed-limit
	command-line option added.

	* src/DownloadEngine.h
	(SocketEntry): New class.
	(SocketEntries): New definition.
	(PairFind): Removed.
	(SockCmdMap): Removed.
	* src/DownloadEngine.cc
	(DownloadEngine): Rewritten.
	(~DownloadEngine): Rewritten.
	(run): Renamed activeCommandUuids as activeUuids.
	(SetDescriptor): Rewritten.
	(AccumulateActiveCommandUuid): Removed.
	(AccumulateActiveUuid): New function object.
	(waitData): Rewritten.
	(updateFdSet): Rewritten.
	(addSocket): Rewritten.
	(deleteSocket): Rewritten.
	(addSocketForReadCheck): Rewritten.
	(deleteSocketForReadCheck): Rewritten.
	(addSocketForWriteCheck): Rewritten.
	(deleteSocketForWriteCheck): Rewritten.
	
	* src/Xml2MetalinkProcessor.cc
	(getEntry): Rewritten the portion of MetalinkEntry creation.

	* src/DownloadCommand.cc
	(executeInternal): Added the check routine for lowest speed 
limit.

	* src/AbstractDiskWriter.cc
	(AbstractDiskWriter): Updated according to the changes in
	MessageDigestContext.
	(~AbstractDiskWriter): Updated according to the changes in
	MessageDigestContext.
	(sha1Sum): Updated according to the changes in 
MessageDigestContext.

	* src/RequestInfo.h: New class.

	* src/UrlRequestInfo.h: New class.
	* src/UrlRequestInfo.cc: New class.

	* src/TorrentRequestInfo.h: New class.
	* src/TorrentRequestInfo.cc: New class.

	* src/MetalinkRequestInfo.h: New class.
	* src/MetalinkRequestInfo.cc: New class.

	* src/Checksum.h: New class.

	* src/DownloadEngineFactory.h: New class.
	* src/DownloadEngineFactory.cc: New class.
2006-08-07 16:05:00 +00:00
Tatsuhiro Tsujikawa 941e0108d3 2006-07-20 15:57:25 +00:00
Tatsuhiro Tsujikawa db35fe355a * src/main.cc:
Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the 
message
	digest support is not available.
	* src/MetalinkEntry.cc
	(check): Added ENABLE_MESSAGE_DIGEST. Return true if the message 
digest
	support is not available.
2006-07-04 11:44:15 +00:00
Tatsuhiro Tsujikawa 31cf446f6d 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To improve the conditional compilation:

	* src/MultiDiskWriter.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.	
	* src/MultiDiskWriter.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/Util.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	Added ENABLE_BITTORRENT around computeFastSet().
	* src/Util.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	Added ENABLE_BITTORRENT around computeFastSet().	
	* src/messageDigest.h:
	Replaced ENABLE_BITTORRENT with ENABLE_SSL.
	* src/ShaVisitor.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/ShaVisitor.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/main.cc:
	Added ENABLE_BITTORRENT around includes and blocks related to
	BitTorrent.
	* src/AbstractDiskWriter.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/AbstractDiskWriter.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	
	To add command-line options for Metalink:

	* src/main.cc:
	Added metalink-version, metalink-language, metalink-os,
	follow-metalink.

	To use EXIT_SUCCESS and EXIT_FAILURE with exit():

	* src/main.cc: Use these definition.
2006-07-04 10:57:56 +00:00
Tatsuhiro Tsujikawa 78eff23254 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add Metalink support(http/ftp only):

	* src/AbstractCommand.h
	(tryReserved): New function.
	* src/AbstractCommand.cc
	(execute): Call tryReserved().
	(tryReserved): New function.
	* src/Request.h
	(Requests): New type definition.
	* src/SegmentMan.h
	(reserved): New variable.
	* src/Util.h
	(fileChecksum): New function.
	(toUpper): New function.
	(toLower): New function.
	* src/Util.cc
	(messageDigest.h): Included.
	(trim): Trim \r\n\t.
	(fileChecksum): New function.
	(toUpper): New function.
	(toLower): New function.
	* src/main.cc
	(normalDownload): New function.
	(main): Added 2 command-line options: metalink-file,
	metalink-connection. Their usage has not been written yet.
	* src/MetalinkProcessor.h: New class.
	* src/Xml2MetalinkProcessor.h: New class.
	* src/Xml2MetalinkProcessor.cc: New class.
	* src/MetalinkEntry.h: New class.
	* src/MetalinkEntry.cc: New class.
	* src/MetalinkResource.h: New class.
	* src/MetalinkResource.cc: New class.
	
	To add md5 message digest checking:

	* src/messageDigest.h: Rewritten.
	* src/MultiDiskWriter.cc: Updated according to the changes in
	messageDigest.h.
	* src/ShaVisitor.cc: Updated according to the changes in
	messageDigest.h.
	* src/Util.cc: Updated according to the changes in 
messageDigest.h.
	* src/AbstractDiskWriter.cc: Updated according to the changes in
	messageDigest.h.
	
	To fix a bug that causes segfault when the payload length in 
peer
	message is less than 0:

	* src/PeerConnection.cc:
	(receiveMessage): Fixed the bug.
	* src/PeerMessageUtil.cc
	(checkLength): Throw an exception if length is less than or 
equals to
	0.
	
	To add new interfaces to Base64 encoding/decoding:

	* src/Base64.h
	(part_encode): Changed the method signature.
	(encode): New function(overload).
	(decode): New function(overload).
	* src/Base64.cc
	(part_encode): Rewritten.
	(encode): Rewritten.
	(encode): New function(overload).

	To prevent a peer to download same piece if there is an error in
	checksum:

	* src/PieceMessage.cc
	(receivedAction): Call peerInteraction->abortPiece().
2006-07-03 14:19:23 +00:00
Tatsuhiro Tsujikawa 722b3f8957 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To fix the bug that causes same have message is sent many times 
to
	a single peer.

	* src/Time.cc
	(isNewer): Use Util::difftv().

	To fix the bug that sends tracker requests without a sleep 
interval
	when the number of connections is less than 15.

	* src/TrackerWatcherCommand.cc
	(execute): Now the number of connections is not a factor to 
decide
	whether or not a tracker request should be sent or not.
	* src/Time.h
	(setTimeInSec): New function.
	* src/Time.cc
	(setTimeInSec): New function.

	etc.
	
	* src/ChokeMessage.cc
	(receivedAction): Removed peer->snubbing = false

	* src/PeerConnection.h
	(receiveHandshake): Updated doc.

	* src/TorrentMan.h
	(getAdvertisedPieceIndexes): Updated the method signature.
	* src/TorrentMan.cc
	(getAdvertisedPieceIndexes): Updated the method signature.

	* Release 0.5.2
2006-06-24 16:09:14 +00:00
Tatsuhiro Tsujikawa d380b7b6ab 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add Time class which represents a specific instant in time 
and
	its precision is microseconds. Time checking procedures were 
rewritten
	using this object.

	* src/Time.h: New class.
	* src/Time.cc: New class.
	* src/AbstractCommand.h
	(updateCheckPoint): Removed.
	(isTimeoutDetected): Removed.
	(checkPoint): Changed the type to Time.
	(timeout): New variable.
	(setTimeout): New function.
	* src/AbstractCommand.cc
	(AbstractCommand): Removed the initialization of checkPoint.
	Added the initialization of timeout.
	(updateCheckPoint): Removed.
	(isTimeoutDetected): Removed.
	(execute): Use checkPoint.reset() and checkPoint.elapsed().
	* src/PeerChokeCommand.h
	(checkPoint): Changed the type to Time.
	* src/PeerChokeCommand.cc
	(PeerChokeCommand): Removed the initialization of checkPoint.
	(execute): Rewritten using Time object.
	* src/TrackerWatcherCommand.h
	(checkPoint): Changed the type to Time.
	* src/TrackerWatcherCommand.cc
	(TrackerWatcherCommand): Removed the initialization of 
checkPoint.
	(execute): Rewritten.
	* src/ConsoleDownloadEngine.h
	(cp): Changed the type to Time.
	(startup): Changed the type to Time.
	* src/ConsoleDownloadEngine.cc
	(initStatistics): Use cp.reset(), startup.reset().
	(calculateStatistics): Rewritten using Time object.
	* src/PeerAbstractCommand.h
	(updateCheckPoint): Removed.
	(isTimeoutDetected): Removed.
	(checkPoint): Changed the type to Time.
	* src/PeerAbstractCommand.cc
	(PeerAbstractCommand): Removed the initialization of checkPoint.
	(updateCheckPoint): Removed.
	(isTimeoutDetected): Removed.
	(execute): Use checkPoint.reset() and checkPoint.elapsed().
	* src/PeerInteractionCommand.cc
	(PeerInteractionCommand): Removed the initializations of struct
	timeval variables.
	* src/PeerInteractionCommand.h
	(keepAliveCheckPoint): Changed the type to Time.
	(chokeCheckPoint): Changed the type to Time.
	(freqCheckPoint): Changed the type to Time.
	(haveCheckTime): Changed the type to Time.
	* src/PeerInteractionCommand.cc
	(executeInternal): Rewritten using Time object.
	(detectMessageFlooding): Rewritten using Time object.
	(checkLongTimePeerChoking): Rewritten using Time object.
	(sendKeepAlive): Rewritten using Time object.
	(checkHave): Rewritten using Time object.
	* src/SleepCommand.h
	(checkPoint): Changed the type to Time.
	* src/SleepCommand.cc
	(SleepCommand): Removed the initialization of checkPoint.
	(execute): Rewritten using Time object.
	* src/TorrentAutoSaveCommand.h
	(checkPoint): Changed the type to Time.
	* src/TorrentAutoSaveCommand.cc
	(TorrentAutoSaveCommand): Removed the initialization of 
checkPoint.
	(execute): Rewritten.
	* src/DownloadCommand.h
	(sw): Changed the type to Time.
	* src/DownloadCommand.cc
	(DownloadCommand): Removed the initialization of sw.
	(executeInternal): Rewritten.
	* src/RequestSlot.h
	(dispatchedTime): Changed the type to Time.
	* src/RequestSlot.cc
	(RequestSlot): Removed the call to setDispatchedTime().
	(setDispatchedTime): Rewirtten.
	(isTimeout): Rewritten.
	(getLatencyInMillis): Rewritten.
	* src/TorrentDownloadEngine.h
	(cp): Changed the type to Time[2].
	(startup): Changed the type to Time.
	* src/TorrentDownloadEngine.cc
	(initStatistics): Rewritten.
	(calculateStatistics): Rewritten.
	* src/DownloadEngine.cc
	(run): Rewritten.
	
	To detect all attempts to connect to the tracker are failed:

	* src/AbstractCommand.cc
	(execute): Increment e->segmentMan->errors if a command aborted.
	* src/SegmentMan.h
	(errors): New variable.
	* src/SegmentMan.cc
	(SegmentMan): Added the initialization of errors.
	(init): Added the initialization of errors.
	* src/TrackerWatcherCommand.cc
	(execute): If e->segmentMan->errors > 0 then assume that the 
tracker
	request was failed.
	
	To handle snubbed peers:
	
	* src/PeerChokeCommand.cc
	(optUnchokingPeer): Snubbed peers don't get unchoked.
	(execute): Snubbed peers don't get unchoked.
	* src/PeerInteraction.h
	(REQUEST_TIME_OUT): Changed the value from 120 to 60.
	* src/PeerInteraction.cc
	(checkRequestSlot): A peer get marked as "snubbed" if it doesn't 
send
	back the requested 16k block in 60 seconds.
	* src/PieceMessage.cc
	(receivedAction): A peer's snubbed state is cleard if it sends
	the requested 16k block in 60 seconds.
	* src/Peer.h
	(snubbing): New variable.
	* src/Peer.cc
	(resetStatus): Added snubbed = false.
	
	To fix the bug that causes have message is not sent:

	* src/PeerInteractionCommand.cc
	(~PeerInteractionCommand): Removed 
e->torrentMan->unadvertisePiece().
	(FLOODING_CHECK_INTERVAL): New definition(temporal).
	(detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
	* src/TorrentMan.h
	(HaveEntry): New class.
	(advertisePiece): Rewritten.
	(getAdvertisedPieceIndexes): Rewritten.
	(Haves): Changed the type.
	(getAdvertisedPieceIndexes): Added an argument.
	
	Others:
	
	* src/TorrentMan.h
	(DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
	(DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
	* src/TorrentMan.cc
	(getPeer): Don't check the number of connections here.
	(setupInternal1): Changed peerId.

	* src/PeerInteractionCommand.h
	(KEEP_ALIVE_INTERVAL): New definition.
	(sendKeepAlive): Use KEEP_ALIVE_INTERVAL.

	* src/main.cc
	(main): SA_ONESHOT was replaced with SA_RESETHAND.

	* src/DownloadEngine.h: Removed unnecessary header includes.
2006-06-12 16:55:08 +00:00
Tatsuhiro Tsujikawa ca5e332df9 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-26 15:28:19 +00:00
Tatsuhiro Tsujikawa ebfdbefb7f 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Each peer message has its own class.
	
	* src/PendingMessages.h: Removed.
	* src/PendingMessages.cc: Removed. The sending process was moved 
to
	each message class.
	* src/RequestSlotMan.h: Removed.
	* src/RequestSlotMan.cc: Removed. All functionarities were moved 
to
	SendMessageQueue.
	* src/RequestMessage.h: New class.
	* src/RequestMessage.cc: New class.
	* src/CancelMessage.h: New class.
	* src/CancelMessage.cc: New class.
	* src/BitfieldMessage.h: New class.
	* src/BitfieldMessage.cc: New class.
	* src/ChokeMessage.h: New class.
	* src/ChokeMessage.cc: New class.
	* src/KeepAliveMessage.h: New class.
	* src/KeepAliveMessage.cc: New class.
	* src/PortMessage.h: New class.
	* src/UnchokeMessage.h: New class.
	* src/UnchokeMessage.cc: New class.
	* src/PieceMessage.h: New class.
	* src/PieceMessage.cc: New class.
	* src/HaveMessage.h: New class.
	* src/HaveMessage.cc: New class.
	* src/BitfieldMessage.h: New class.
	* src/BitfieldMessage.cc: New class.
	* src/NotInterestedMessage.h: New class.
	* src/NotInterestedMessage.cc: New class.
	* src/InterestedMessage.h: New class.
	* src/InterestedMessage.cc: New class.
	* src/HandshakeMessage.h (sendMessageQueue): New variable.
	(getSendMessageQueue): New function.
	(setSendMessageQueue): New function.
	* src/HandshakeMessage.cc: New class.
	* src/PeerConnection.h (receiveMessage): Changed return value 
and
	arguments.
	(receiveHandshake): Changed return value and arguments.
	* src/PeerConnection.cc (receiveMessage): Do not create message 
class
	here.
	(receiveHandshake): Do not create handshake class here.
	* src/PeerInteractionCommand.h (peerConnection): Removed.
	(piece): Removed.
	(syncPiece): Removed.
	(sendInterest): Removed.
	(sendMessages): Removed.
	(createRequestPendingMessage): Removed.
	(checkPieceHash): Removed.
	(erasePieceOnDisk): Removed.
	(getNewPieceAndSendInterest): Removed.
	(onGotNewPice): Removed.
	(onGotWrongPiece): Removed.
	* src/PeerInteractionCommand.cc (PeerInteractionCommand):
	Removed peerConnection, piece.
	(~PeerInteractionCommand): Removed peerConnection.
	(executeInternal): Use sendMessageQueue instead of 
peerConnection.
	(syncPiece): Moved to SendMessageQueue.
	(decideChoking): Removed PendingMessage.
	(receiveMessage): Use sendMessageQueue instead of 
peerConnection.
	The action after receiving peer message was moved to each 
message
	class.
	(onGotNewPice): Moved to SendMessageQueue.
	(onGotWrongPiece): Moved to SendMessageQueue.
	(getNewPieceAndSendInterest): Moved to SendMessageQueue.
	(sendInterest): Moved to SendMessageQueue.
	(createRequestPendingMessage): Removed.
	(sendMessages): Moved to SendMessageQueue.
	(onAbort): Use SendMessageQueue::abortPiece()
	(keepAlive): Use sendMessageQueue instead of peerConnection.
	(beforeSocketCheck): Use sendMessageQueue instead of 
peerConnection.
	(checkPieceHash): Moved to SendMessageQueue.
	(erasePieceOnDisk): Moved to SendMessageQueue.
	* src/PeerMessageUtil.h
	(createBitfieldMessage): Removed.
	(createHaveMessage): Changed return value and arguments.
	(createBitfieldMessage): Changed return value and arguments.
	(createRequestCancelMessage): Removed.
	(createPieceMessage): Changed return value and arguments.
	(getShortIntParam): New function.
	(checkIndex): Changed arguments.
	(checkBegin): Changed arguments.
	(checkLength): Changed arguments.
	(checkPieceOffset): Removed.
	(checkRange): New function.
	(checkBitfield): Changed arguments.
	(createPeerMessage): Removed.
	(checkIntegrity): Removed.
	(createHandshakeMessage): Changed arguments.
	(createChokeMessage): New function.
	(createUnchokeMessage): New function.
	(createInterestedMessage): New function.
	(createNotInterestedMessage): New function.
	(createRequestMessage): New function.
	(createCancelMessage): New function.
	(createPortMessage): New function.
	* src/PeerMessageUtil.cc
	(createBitfieldMessage): Removed.
	(createHaveMessage): Changed return value and arguments.
	(createBitfieldMessage): Changed return value and arguments.
	(createRequestCancelMessage): Removed.
	(createPieceMessage): Changed return value and arguments.
	(getShortIntParam): New function.
	(checkIndex): Changed arguments.
	(checkBegin): Changed arguments.
	(checkLength): Changed arguments.
	(checkPieceOffset): Removed.
	(checkRange): New function.
	(checkBitfield): Changed arguments.
	(createPeerMessage): Removed.
	(checkIntegrity): Removed.
	(createHandshakeMessage): Changed arguments.
	(createChokeMessage): New function.
	(createUnchokeMessage): New function.
	(createInterestedMessage): New function.
	(createNotInterestedMessage): New function.
	(createRequestMessage): New function.
	(createCancelMessage): New function.
	(createPortMessage): New function.
	* src/PeerMessage.h
	(id): Removed.
	(index): Removed.
	(begin): Removed.
	(length): Removed.
	(bitfield): Removed.
	(bitfieldLength): Removed.
	(block): Removed.
	(blockLength): Removed.
	(inProgress): New variable.
	(cuid): New variable.
	(peer): New variable.
	(sendMessageQueue): New variable.
	(logger): New variable.
	(setBitfield): Removed.
	(getBitfield): Removed.
	(setBlock): Removed.
	(getBlock): Removed.
	(getBitfieldLength): Removed.
	(getBlockLength): Removed.
	(isInProgress): New function.
	(toString): Made pure virtual.
	(check): New function.
	(send): New function.
	(receivedAction): New function.
	(getId): Made pure virtual.
	(setId): Removed.
	(getIndex): Removed.
	(setIndex): Removed.
	(getBegin): Removed.
	(setBegin): Removed.
	(getLength): Removed.
	(setLength): Removed.
	(getCuid): New function.
	(setCuid): New function.
	(getPeer): New function.
	(setPeer): New function.
	(getSendMessageQueue): New function.
	(setSendMessageQueue): New function.
	(ID): Removed.
	* src/PeerMessage.cc
	(setBitfield): Removed.
	(setBlock): Removed.
	(toString): Removed.
	* src/TorrentMan.h
	(getPieceLength): New function.
	(getPieceLength): New function.
	* src/SendMessageQueue.h
	(REQUEST_TIME_OUT): New definition.
	(RequestSlots): New definition.
	(MessageQueue): New definition.
	(requestSlotMan): Removed.
	(pendingMessages): Removed.
	(requestSlots): New variable.
	(messageQueue): New variable.
	(torrentMan): New variable.
	(peerConnection): New variable.
	(peer): New variable.
	(piece): New variable.
	(getNewPieceAndSendInterest): New function.
	(createPeerMessage): New function.
	(createHandshakeMessage): New function.
	(send): Made private.
	(setPeerMessageCommonProperty): New function.
	(deleteAllRequestSlot): New function.
	(deleteRequestMessageInQueue): New function.
	(cancelAllRequest): Made private.
	(cancelAllRequest): Made private.
	(countRequestSlot): Made private.
	(addPendingMessage): Removed.
	(deletePendingPieceMessage): Removed.
	(deletePendingRequestMessage): Removed.
	(addMessage): New function.
	(deletePieceMessageInQueue): New function.
	(deleteTimeoutRequestSlot): Changed argument.
	(deleteCompletedRequestSlot): Changed argument.
	(getCorrespoindingRequestSlot): Renamed to 
getCorrespondingRequestSlot.
	(getCorrespondingRequestSlot): New function.
	(countPendingMessage): Removed.
	(countMessageInQueue): New function.
	(getTorrentMan): New function.
	(getPeerConnection): New function.
	(hasDownloadPiece): New function.
	(getDownloadPiece): New function.
	(setDownloadPiece): New function.
	(syncPiece): New function.
	(sendMessages): New function.
	(sendNow): New function.
	(trySendNow): New function.
	(abortPiece): New function.
	(sendHandshake): New function.
	(receiveMessage): New function.
	(receiveHandshake): New function.
	(createRequestMessage): New function.
	(createCancelMessage): New function.
	(createPieceMessage): New function.
	(createHaveMessage): New function.
	(createChokeMessage): New function.
	(createUnchokeMessage): New function.
	(createInterestedMessage): New function.
	(createNotInterestedMessage): New function.
	(createBitfieldMessage): New function.
	(createKeepAliveMessage): New function.
	* src/SendMessageQueue.cc
	(SendMessageQueue): Removed requestSlotMan.
	Instantiated peerConnection here.
	(~SendMessageQueue): Removed requestSlotMan.
	Added deletion of peerConnection and the contents of 
messageQueue.
	(send): Updated according to the change of messageQueue.
	(addPendingMessage): Renamed to addMessage.
	(addMessage): New function.
	(deletePendingPieceMessage): Renamed to 
deletePieceMessageInQueue.
	(deletePieceMessageInQueue): New function.
	(deletePendingRequestMessage): Renamed to 
deleteRequestMessageInQueue.
	(deleteRequestMessageInQueue): New function.
	(deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was 
moved
	here.
	(deleteTimeoutRequestSlot): 
RequestSlotMan::deleteTimeoutRequestSlot
	(...) was moved here.
	(deleteAllRequestSlot): 
RequestSlotMan::deleteAllRequestSlot(...) was
	moved here.
	(deleteCompletedRequestSlot):
	RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
	(getCorrespondingRequestSlot):
	RequestSlotMan::getCorrespoindingRequestSlot(...) was moved 
here.
	And renamed to getCorrespondingRequestSlot, correcting a typo.
	(countPendingMessage): Renamed to countMessageInQueue.
	(countMessageInQueue): New function.
	(countRequestSlot): RequestSlotMan::countRequestSlot() was moved 
here.
	(receiveHandshake): New function.
	(createHandshakeMessage): New function.
	(receiveMessage): New function.
	(createPeerMessage): New function.
	(syncPiece): New function.
	(getNewPieceAndSendInterest): New function.
	(sendMessages): New function.
	(sendNow): New function.
	(trySendNow): New function.
	(sendHandshake): New function.
	(abortPiece): New function.
	(getDownloadPiece): New function.
	(getPeerMessageCommonProperty): New function.
	(createRequestMessage): New function.
	(createCancelMessage): New function.
	(createPieceMessage): New function.
	(createHaveMessage): New function.
	(createChokeMessage): New function.
	(createUnchokeMessage): New function.
	(createInterestedMessage): New function.
	(createNotInterestedMessage): New function.
	(createBitfieldMessage): New function.
	(createKeepAliveMessage): New function.
	
	
	To add simple Content-Disposition support:

	* src/HttpResponseCommand.h (determinFilename): New function.
	* src/HttpResponseCommand.cc (executeInternal):
	Use determinFilename(headers) instead of req->getFile() when 
comparing
	filename.
	(determinFilename): New function.
	(handleDefaultEncoding): Use determinFilename(headers) instead 
of
	req->getFile().
	(handleOtherEncoding): Use determinFilename(headers) instead of
	req->getFile().
	* src/Util.h (getContentDispositionFilename): New function.
	* src/Util.cc (getContentDispositionFilename): New function.
	
	* src/LogFactory.h (release): New function.
	* src/LogFactory.cc (release): New function.

	To fix a bug that causes out-of-bound exception when HTTP status
	line is wrong:
	
	* src/HttpConnection.cc (receiveResponse): Added a check for 
header
	size.

	* src/common.h (Deleter): New class.

	* src/SegmentMan.cc
	(~SegmentMan): Added deletion of splitter and diskWriter.
	* src/DownloadEngine.h
	(Commands): Use deque.
	(clearQueue): New function.
	* src/DownloadEngine.cc
	(~DownloadEngine): Added deletion of segmentMan.
	(cleanQueue): New function.
	* src/TorrentDownloadEngine.h
	(TorrentDownloadEngine): The implementation was moved to
	TorrentDownloadEngine.cc.
	(~TorrentDownloadEngine): The implementation was moved to
	TorrentDownloadEngine.cc.
	* src/TorrentDownloadEngine.cc
	(~TorrentDownloadEngine): Added deletion of torrentMan.
	* src/main.cc
	(clearRequest): Removed.
	(handler): Added deletion of e.
	(torrentHandler): Added deletion of te.
	(main): Do not share splitter.
	Use Deleter instead of clearRequest.
	Deletion of classes were updated.
2006-05-09 15:54:14 +00:00
Tatsuhiro Tsujikawa 15b207a53e * src/SocketCore.cc
(writeData): Removed timeout argument.
	(readData): Removed timeout argument.
	(peekData): Removed timeout argument.
	* src/Socket.cc
	(writeData): Removed timeout argument.
	(readData): Removed timeout argument.
	(peekData): Removed timeout argument.
2006-04-29 11:23:39 +00:00
Tatsuhiro Tsujikawa ba23d6061a 2006-04-18 17:21:59 +00:00