Commit Graph

3 Commits (ff20aefa516f5d6a06bf9f8742974ec274d3491f)

Author SHA1 Message Date
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 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 6e6ba30c60 2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add the command-line option which disables netrc support:
	* src/OptionHandlerFactory.cc
	(createOptionHandlers): Added PREF_NO_NETRC.
	* src/main.cc: Added -n option.
	* src/prefs.h (PREF_NO_NETRC): New definition.
	* src/RequestFactory.cc: Do not use netrc in ftp if 
PREF_NO_NETRC is
	V_TRUE.
	Note that netrc is not used in http, http proxy even if 
PREF_NO_NETRC
	is V_FALSE. This may get configurable in the future release.
	
	To clear peer's error status by time basis:
	* src/PeerAbstractCommand.cc
	(onAbort): Call Peer::startBadCondition().
	* src/Peer.h, src/Peer.cc
	(error): Removed.
	(_badConditionStartTime): New variable.
	(_badConditionInterval): New variable. Initialized to 10 
seconds.
	(startBadCondition): New function.
	(isGood): New function.
	* src/DefaultPeerStorage.cc
	(addPeer): Use Peer::isGood().
	(FindFinePeer): Use Peer::isGood().

	Always include port number in http request header:
	* src/HttpRequest.cc (getHostText): Always include port number 
in
	http request header.
2007-03-27 16:16:44 +00:00