Skip to content

Commit

Permalink
2007-12-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Browse files Browse the repository at this point in the history
	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.
  • Loading branch information
tatsuhiro-t committed Dec 14, 2007
1 parent e870ab2 commit 3ea4fe4
Show file tree
Hide file tree
Showing 24 changed files with 750 additions and 156 deletions.
23 changes: 23 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
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-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Disabled -s option in metalink download.
Expand Down
15 changes: 11 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/libares.m4 $(top_srcdir)/m4/libcares.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/libexpat.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/openssl.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Expand Down Expand Up @@ -119,6 +120,10 @@ ENABLE_ASYNC_DNS_FALSE = @ENABLE_ASYNC_DNS_FALSE@
ENABLE_ASYNC_DNS_TRUE = @ENABLE_ASYNC_DNS_TRUE@
ENABLE_BITTORRENT_FALSE = @ENABLE_BITTORRENT_FALSE@
ENABLE_BITTORRENT_TRUE = @ENABLE_BITTORRENT_TRUE@
ENABLE_LIBEXPAT_FALSE = @ENABLE_LIBEXPAT_FALSE@
ENABLE_LIBEXPAT_TRUE = @ENABLE_LIBEXPAT_TRUE@
ENABLE_LIBXML2_FALSE = @ENABLE_LIBXML2_FALSE@
ENABLE_LIBXML2_TRUE = @ENABLE_LIBXML2_TRUE@
ENABLE_MESSAGE_DIGEST_FALSE = @ENABLE_MESSAGE_DIGEST_FALSE@
ENABLE_MESSAGE_DIGEST_TRUE = @ENABLE_MESSAGE_DIGEST_TRUE@
ENABLE_METALINK_FALSE = @ENABLE_METALINK_FALSE@
Expand Down Expand Up @@ -158,6 +163,8 @@ LIBARES_CPPFLAGS = @LIBARES_CPPFLAGS@
LIBARES_LIBS = @LIBARES_LIBS@
LIBCARES_CPPFLAGS = @LIBCARES_CPPFLAGS@
LIBCARES_LIBS = @LIBCARES_LIBS@
LIBEXPAT_CPPFLAGS = @LIBEXPAT_CPPFLAGS@
LIBEXPAT_LIBS = @LIBEXPAT_LIBS@
LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
Expand Down
26 changes: 18 additions & 8 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,17 @@ aria2 is in very early development stage. Currently it has following features:
-------------
In order to enable HTTPS support, you need GNU TLS or OpenSSL.
In order to enable BitTorrent support, you need GNU TLS+libgcrypt or OpenSSL.
In order to enable Metalink support, you need libxml2. Optionally GNU TLS+
libgcrypt or OpenSSL are required for checksum checking support(MD5, SHA1).
In order to enable Metalink support, you need libxml2 or Expat. Optionally
GNU TLS+libgcrypt or OpenSSL are required for checksum checking support(MD5,
SHA1, SHA256).

GNU TLS has precedence over OpenSSL if both libraries are installed.
If you prefer OpenSSL, run configure with "--without-gnutls".
Note;;
GNU TLS has precedence over OpenSSL if both libraries are installed.
If you prefer OpenSSL, run configure with "--without-gnutls".

Note;;
libxml2 has precedence over Expat if both libraries are installed.
If you prefer Expat, run configure with "--without-libxml2".

You can disable BitTorrent, Metalink support by providing --disable-bittorrent,
--disable-metalink respectively to configure script.
Expand All @@ -63,6 +69,9 @@ packages(package name may vary depending on the distribution you use):
You can use libssl-dev instead of libgnutls-dev,libgpg-error-dev,libgcrypt-dev:
* libssl-dev (Required for HTTPS, BitTorrent support)

You can use libexpat1-dev instead of libxml2-dev:
* libexpat1-dev (Required for Metalink support)

The build process is fairly standard way for *nix programs:

$ ./configure
Expand Down Expand Up @@ -111,11 +120,12 @@ rate is low.
The current implementation supports HTTP/FTP/BitTorrent.
The other P2P protocols are ignored.

For checksum checking, both MD5 and SHA1 are supported. If both values are
provided, then aria2 uses SHA1. If checksum checking is failed, aria2 doesn't
retry the download and just exits with non-zero return code.
For checksum checking, MD5, SHA1, SHA256 are supported. If multiple hash
algorithms are provided, aria2 uses SHA1. If checksum checking is failed, aria2
doesn't retry the download and just exits with non-zero return code.

The supported user preferences are version, language and os.
The supported user preferences are version, language, location, protocol and
os.

If chunk checksums are provided in Metalink file, aria2 automatically validate
a chunk of file while downloading it. This behavior can be turned off by
Expand Down
1 change: 1 addition & 0 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
m4_include([m4/libares.m4])
m4_include([m4/libcares.m4])
m4_include([m4/libexpat.m4])
m4_include([m4/nls.m4])
m4_include([m4/openssl.m4])
m4_include([m4/po.m4])
Expand Down
8 changes: 8 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@
/* Define 1 if ares_host_callback accepts timeouts(c-ares >= 1.5) */
#undef HAVE_LIBCARES1_5

/* Define to 1 if you have libexpat. */
#undef HAVE_LIBEXPAT

/* Define to 1 if you have libgcrypt. */
#undef HAVE_LIBGCRYPT

Expand Down Expand Up @@ -433,6 +436,11 @@
/* Version number of package */
#undef VERSION

/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif

/* Define to empty if `const' does not conform to ANSI C. */
#undef const

Expand Down
Loading

0 comments on commit 3ea4fe4

Please sign in to comment.