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
* 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
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().
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.
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().
* configure.in: Added gnutls support. Added several CPP macros.
* m4/openssl.m4: Added.
* src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
readData(), peekData(). Added gnutls support.
* src/HttpDownloadCommand.cc: Removed SleepCommand.h
* src/TrackerWatcherCommand.{h,cc}: Added. This command creates
TrackerInitCommand periodicaly(TorrentMan::minInterval).
* src/TorrentMan.cc: Remove downloadedSize == 0 check from
save().
Instead, added a check for whether setup method has executed
successfully.
* src/TorrentMan.h: Added member vaiable setupComplete. Updated
DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to
300.
* src/Makefile.am: Updated.
* src/messageDigest.h: Added. This is a macro calculating SHA1
digest
using whether OpenSSL or gcrypt, depending on the result of
configure
script.
* src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by
using
messageDigest.h.
* src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
* src/PeerListenCommand.cc: Added log about port binded
successfully.
Fixed memory leak.
* src/main.cc: Added gnutls support. Replaced LIB_SSL with
ENABLE_BITTORRENT where they are not related to OpenSSL but
BitTorrent.
Removed instantiation of TrackerInitCommand. Instead,
TrackerWatcherCommand is instantiated and pushed to the command
queue.
* src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL
with
ENABLE_SSL.
* src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
* src/RequestSlotMan.cc:
(deleteCompletedRequestSlot)
If a piece is already acquired by another command, delete the
request
slots for the piece.
* src/TrackerUpdateCommand.cc:
(execute)
Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to
warn.
Added a check whether peer list is null.
Fixed the bug that causes sending completed event to the tracker
several times.
* src/TrackerInitCommand.cc:
(execute)
Fixed the bug that causes sending completed event to the tracker
several times.
* src/AbstractDiskWriter.{h,cc}: Removed direct dependency on
OpenSSL
by using messageDigest.h.
2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* PeerConnection.cc: Replaced log message "keep-alive" with
"keep alive".
* PeerInteractionCommand.{h,cc}: Close connection if peer is
choking
localhost long time.
* TorrentMan.cc: When adding new peer with duplicate = true, if
the
number of peer list is equal to or grater than MAX_PEER_LIST,
delete
at most 100 failure entry from the list. If with duplicate =
false,
MAX_PEER_LIST is not checked.
* PeerListenCommand.cc: Fixed the argument order of log message.
2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
Added warn().
* SimpleLogger.h: Moved enum LEVEL to Logger.h.
Implemented warn().
Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated
code.
* ConsoleDownloadEngine.{h, cc}: Console output message(size,
speed)
is now generated by ConsoleDownloadEngine not by DownloadEngine.
* main.cc: Download complete/abort message is now generated by
main.
* Makefile.am (SUBDIRS): Add m4.
(ACLOCAL_AMFLAGS): New variable.
(EXTRA_DIST): New variable.
* configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
* gettext: added gettext functionality