Commit Graph

13 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
e823fe8bb5 Set log level DEBUG for unittests 2013-07-06 15:56:08 +09:00
Tatsuhiro Tsujikawa
d07b3ff8d9 Suppress console output for none-standalone mode 2013-05-02 11:30:42 +09:00
Tatsuhiro Tsujikawa
3ee6784b76 Made `make distcheck' pass.
We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in
`make distcheck`.  A2_TEST_DIR refers to test directory.  All output
files by unit tests are now created under A2_TEST_OUT_DIR directory.
2010-12-02 22:52:35 +09:00
Tatsuhiro Tsujikawa
88bcc6e681 2009-12-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use AI_ADDRCONFIG flag if it is available. Refactored so that
	getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG
	when conducting unit tests because they fail if networking
	interface is not configured with IPv4 address.
	* src/NameResolver.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/a2netcompat.h
	* test/AllTest.cc
2009-12-24 14:59:47 +00:00
Tatsuhiro Tsujikawa
d05d8bbddc 2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added static member _protocolFamily to SocketCore.  By default,
	SocketCore uses AF_UNSPEC for getaddrinfo hints to resolve
	address. Sometime SocketCore::bind() and
	SocketCore::establishConnection() use difference protocl family
	and latter cannot connect to former. To avoid this situation, we
	limit protocol family to AF_INET for unit tests.
	* src/SocketCore.cc
	* src/SocketCore.h
	* test/AllTest.cc
2009-05-06 07:42:59 +00:00
Tatsuhiro Tsujikawa
398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa
aaa2ecaa6f 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit, 
only the
	follow sources are applied.
	* src/Platform.h: I removed HAVE_WINSOCK2_H directive from 
Platform.h.
	* src/Platform.cc: Moved common setup/teardown code to Platform 
class.
	I moved #endif // HAVE_WINSOCK2_H to the front of #include 
"DlAbortEx.h"
	I included locale.h from Platform.cc.
	* src/main.cc: Moved common setup/teardown code to Platform 
class.
	* test/AllTest.cc: Use Platform class.
	Set locale to C in AllTest.cc to prevent the messages to be 
localized.
2008-06-16 11:59:34 +00:00
Tatsuhiro Tsujikawa
3505201f33 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten SharedHandle. Now copy constructor taking raw pointer 
has
	keyword explicit and SharedHandle's default constructor 
initializes
	its internal obj to null, old implementation initializes it 
using
	obj's default constructor.
	To assign null, write SharedHandle<T> x(...); x.reset();
	TODO: test/SharedHandleTest.cc needs more tests.
	* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
55552adb93 2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included missing iostream.
	* test/AllTest.cc
	* test/BtDependencyTest.cc
	* test/BtExtendedMessageTest.cc
	* test/DHTConnectionImplTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTMessageTrackerEntryTest.cc
	* test/DHTNodeTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtContextTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/HttpResponseTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/SocketCoreTest.cc
	* test/UTPexExtensionMessageTest.cc
2008-03-03 11:30:12 +00:00
Tatsuhiro Tsujikawa
4b67290f00 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* test/AllTest.cc: Added OpenSSL, GNUTLS initialization code.
2008-02-21 02:21:14 +00:00
Tatsuhiro Tsujikawa
1b7c198289 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
d5bb035642 2007-06-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/AbstractCommand.cc
	(execute): Changed log level of MSG_RESTARTING_DOWNLOAD and
	MSG_MAX_TRY from error to info.
	Added MSG_DOWNLOAD_ABORTED after MSG_MAX_TRY.

	* src/message.h
	(MSG_TORRENT_DOWNLOAD_ABORTED): New definition.
	(MSG_DOWNLOAD_ABORTED): Added %s.
	(MSG_RESTARTING_DOWNLOAD): Added %s.
	(MSG_DOWNLOAD_ALREADY_COMPLETED): Updated.
	
	* src/PeerAbstractCommand.cc
	(execute): MSG_DOWNLOAD_ABORTED -> MSG_TORRENT_DOWNLOAD_ABORTED
	
	* src/Request.h
	(cookieBox): Made ShardHandle.
	
	* src/RequestGroup.h, src/RequestGroup.cc
	(createNextCommandWithAdj): New function.
	* src/FileAllocationCommand.cc
	(executeInternal): Use createNextCommandWithAdj().
	* src/CheckIntegrityCommand.cc
	(executeInternal): Use createNextCommandWithAdj().

	Added --load-cookies command-option.
	* src/OptionHandlerFactory.cc
	(createOptionHandlers): Added PREF_LOAD_COOKIES.
	* src/CookieBox.h, src/CookieBox.cc: Rwritten using CookieParser.
	Now aria2 can handle cookie's expiration date.
	* src/Cookie.h (expires): Changed its type to time_t.
	* src/main.cc: Added --load-cookies command-line option.
	* src/prefs.h (PREF_LOAD_COOKIES): New definition.
	* src/Util.h, src/Util.cc (httpGMT): New function.
	* src/Request.cc (Request): Initialize cookieBox using
	CookieBoxFactory.
	* src/CookieBoxFactory.h, src/CookieBoxFactory.cc: New class.
	* src/CookieParser.h, src/CookieParser.cc: New class.
	
	* src/main.cc: Chagned the default value of --metalink-servers to 5.

	* src/HttpResponseCommand.cc
	(handleOtherEncoding): Call RequestGroup::shouldCancelDownloadForSafety
2007-06-10 07:55:43 +00:00
Tatsuhiro Tsujikawa
52634627bc Initial import 2006-02-17 13:35:04 +00:00