ChangeLog 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  3. (detectMessageFlooding): Updated.
  4. (checkLongTimePeerChoking): Updated.
  5. (getNewPieceAndSendInterest): Added debug log.
  6. * src/PeerInteractionCommand.h: New function checkInactiveConnection()
  7. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  8. (getPeer): Updated.
  9. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  10. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  11. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  12. is localhost.
  13. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  14. * src/PendingMessage.cc (processMessage): Not to send piece message
  15. if peer is not interested in the pieces localhost has.
  16. * src/Peer.cc (shouldChoke): Updated.
  17. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  18. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  19. Added new class SendMessageQueue that includes PendingMessages and
  20. RequestSlotMan.
  21. * src/SendMessageQueue.h: New class.
  22. * src/SendMessageQueue.cc: New class.
  23. * src/PendingMessage.h: Added new member variable blockIndex and its
  24. accessors.
  25. (createRequestMessage): Updated.
  26. * src/PendingMessage.cc (createRequestMessage): Updated.
  27. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  28. SendMessageQueue.
  29. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  30. (receiveMessage): Updated with SendMessageQueue.
  31. (deletePendingPieceMessage): Removed.
  32. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  33. (sendInterest): Updated with SendMessageQueue.
  34. (createRequestPendingMessage): Updated with SendMessageQueue.
  35. (sendMessages): Updated with SendMessageQueue.
  36. (onAbort): Updated with SendMessageQueue.
  37. (keepAlive): Updated with SendMessageQueue.
  38. (beforeSocketCheck): Updated SendMessageQueue.
  39. * src/PeerInteractionCommand (sendMessages): Shuffle
  40. missingBLockIndexes before using it.
  41. Added its own timeout for peer connection.
  42. * src/PeerAbstractCommand.h: Added member variable timeout and its
  43. setter.
  44. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  45. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  46. Added setTimeout() call.
  47. (executeInternal): Added setTimeout() call.
  48. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  49. Added timeout.
  50. (isTimeoutDetected): Updated.
  51. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  52. option.
  53. Added *simple* message flooding checker.
  54. * src/PeerInteractionCommand.cc (executeInternal):
  55. Added detectMessageFlooding() call.
  56. (detectMessageFlooding): New function.
  57. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  58. (beforeSocketCheck): Added detectMessageFlooding() call.
  59. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  60. chokeUnchokeCount, haveCount, detectMessageFlooding().
  61. Removed deletePendingPieceMessage(), getRequestSlot(),
  62. deleteRequestSlot(), deleteAllRequestSlot().
  63. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  64. Added checkLongTimePeerChoking() call.
  65. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  66. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  67. if duplicate == false.
  68. The parameter "uploaded" and "downloaded" in the tracker request are
  69. the size since the client sent the "started" event to the tracker.
  70. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  71. uploaded size to preDownloadedSize, preUploadedSize respectively.
  72. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  73. getSessionDownloadedSize(), getSessionUploadedSize().
  74. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  75. getSessionUploadedSize() instead of getDownloadedSize(),
  76. getUploadedSize().
  77. * src/PendingMessage.cc (processMessage): Do not send request message
  78. if the peer is choking the client.
  79. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  80. less than interval.
  81. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  82. * configure.in: Added gnutls support. Added several CPP macros.
  83. * m4/openssl.m4: Added.
  84. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  85. readData(), peekData(). Added gnutls support.
  86. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  87. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  88. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  89. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  90. Instead, added a check for whether setup method has executed
  91. successfully.
  92. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  93. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  94. * src/Makefile.am: Updated.
  95. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  96. using whether OpenSSL or gcrypt, depending on the result of configure
  97. script.
  98. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  99. messageDigest.h.
  100. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  101. * src/PeerListenCommand.cc: Added log about port binded successfully.
  102. Fixed memory leak.
  103. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  104. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  105. Removed instantiation of TrackerInitCommand. Instead,
  106. TrackerWatcherCommand is instantiated and pushed to the command queue.
  107. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  108. ENABLE_SSL.
  109. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  110. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  111. If a piece is already acquired by another command, delete the request
  112. slots for the piece.
  113. * src/TrackerUpdateCommand.cc (execute):
  114. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  115. Added a check whether peer list is null.
  116. Fixed the bug that causes sending completed event to the tracker
  117. several times.
  118. * src/TrackerInitCommand.cc (execute):
  119. Fixed the bug that causes sending completed event to the tracker
  120. several times.
  121. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  122. by using messageDigest.h.
  123. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  124. * PeerConnection.cc: Replaced log message "keep-alive" with
  125. "keep alive".
  126. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  127. localhost long time.
  128. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  129. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  130. at most 100 failure entry from the list. If with duplicate = false,
  131. MAX_PEER_LIST is not checked.
  132. * PeerListenCommand.cc: Fixed the argument order of log message.
  133. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  134. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  135. Added warn().
  136. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  137. Implemented warn().
  138. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  139. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  140. * Request.h: Added AFTER_COMPLETED event.
  141. * TorrentDownloadEngine.cc: Prints "Download complete" message
  142. instead of downloaded size and progress(%) after download completes.
  143. * PeerInteractionCommand.cc: After download completes, sends unchoke
  144. message to the peer if it is interested in what localhost has
  145. downloaded.
  146. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  147. destination instead of just renaming it.
  148. * TorrentMan.cc: Added deleteTempFile().
  149. * PeerAbstractCommand.cc: do not stop execution after download
  150. completes. This makes localhost a seeder.
  151. * Util.{h,cc}: Added fileCopy().
  152. * PeerListenCommand.cc: do not stop execution after download completes.
  153. This makes localhost a seeder.
  154. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  155. Added TorrentMan::deleteTempFile() to torrentHandler.
  156. Initialized the variable dir as ".".
  157. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  158. Deleted renameSingleFile().
  159. Added copySingleFile(), deleteTempFile().
  160. * DownloadEngine.h: Added virtual function afterEachIteration().
  161. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  162. in onEndOfRun() to afterEachIteration().
  163. In onEndOfRun(), changed if condition to check whether filenameFixed is
  164. true.
  165. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  166. In rangedFileCopy(), added try-catch block to properly close file
  167. descriptors.
  168. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  169. Added afterEachIteration(), isFilenameFixed().
  170. * Peer.cc: Changed choking strategy.
  171. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  172. * TrackerInitCommand.cc: Send completed event only once.
  173. * DownloadEngine.cc: Added a call to afterEachIteration().
  174. * TrackerUpdateCommand.cc: Do not stop execution after download
  175. completes.
  176. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  177. connect the peers at most MAX_PEER_UPDATE when a peer list is
  178. received from a tracker.
  179. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  180. Decreased the number of failure peers to delete to 0(just comment out
  181. the line).
  182. * Release 0.3.1
  183. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  184. * PeerInteractionCommand.cc: added a call to
  185. TorrentMan::unadvertisePiece in Destructor.
  186. * PeerInteractionCommand.cc: make have message sent immediately
  187. if the size of pending message queue is zero.
  188. * TorrentMan.cc: set the maximum size of peer list to 250.
  189. * TorrentMan.h: changed the container type of Peers and UsedPieces
  190. to deque.
  191. * Util.cc: fixed rangedFileCopy.
  192. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  193. to Constructor. Also, moved digest cleanup to Destructor.
  194. * MetaFileUtil.cc: fixed memory leak
  195. * replaced std::vector with std::deque.
  196. * AbstractCommand.cc: casted timeout value to long long int.
  197. * ChunkedEncoding.cc: fixed memory leak.
  198. * PeerInteractionCommand.cc: casted timeout value to long long int.
  199. * SleepCommand.cc: casted timeout value to long long int.
  200. * Data.cc: fixed memory leak.
  201. * Data.cc: fixed toLLInt().
  202. * BitfieldMan.cc: fixed memory leak.
  203. * TorrentMan.cc: initialized storeDir to ".".
  204. * TorrentMan.cc: fixed memory leak.
  205. * TorrentMan.cc: corrected file paths of splitted files.
  206. * PeerAbstractCommand.cc: casted timeout to long long int.
  207. * main.cc: added delete(req) and delete(te->diskWriter).
  208. * RequestSlot.cc: casted timeout value to long long int.
  209. * Request.cc: fixed memory leak.
  210. * PendingMessage.cc: make HAVE messages sent only when peer does not
  211. have the piece.
  212. * Peer.{h,cc}: added hasPiece(int index).
  213. * main.cc: corrected addCommand.
  214. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  215. * BitTorrent protocol support added.
  216. * Release 0.3.0
  217. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  218. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  219. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  220. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  221. decoding did not work properly.
  222. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  223. * DownloadEngine.h: included sys/time.h
  224. * DownloadEngine.cc: remove sys/time.h
  225. * Makefile.am (SUBDIRS): Add intl.
  226. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  227. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  228. * main.cc: correct help message for --http-auth-scheme.
  229. * main.cc: changed e-mail address for bug reports.
  230. * ja.po: added japanese translation.
  231. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  232. * SimpleLogger.cc: flush log file instead of stdout.
  233. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  234. * main.cc: Fixed command-line option: max-tries
  235. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  236. does not equal to seg.sp.
  237. * DownloadCommand.cc: If EOF is got from the server and the total size
  238. of file is not zero, then throw DlRetryEx.
  239. * main.cc: Set the minium value of min-segment-size to 1024.
  240. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  241. fails because of a regression since 0.2.0 release.
  242. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  243. * HttpConnection.cc:
  244. * common.h: defined the user agent name as macro
  245. * DownloadEngine.{h, cc}:
  246. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  247. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  248. * main.cc: Download complete/abort message is now generated by main.
  249. * Makefile.am (SUBDIRS): Add m4.
  250. (ACLOCAL_AMFLAGS): New variable.
  251. (EXTRA_DIST): New variable.
  252. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  253. * gettext: added gettext functionality
  254. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  255. * AbstractCommand.cc:
  256. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  257. unregister its cuid from SegmentMan.
  258. * DownloadEngine.cc: .aria2 file was written when a downloading
  259. failed with errors.
  260. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  261. Added "User-Agent" header to CONNECT proxy request.
  262. Fixed "Proxy-Authorization" header. Now proxy authorization works
  263. properly.
  264. * Logger.h:
  265. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  266. * ChunkedEncoding.cc: Added #include directive for strings.h
  267. * Release 0.2.1
  268. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  269. * Util.{h,cc}: added startsWith().
  270. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  271. Util::endsWith().
  272. * SocketCore.cc: struct addrinfo is now zero-initialized.
  273. * common.h: added #include directive of limit.h.
  274. * DownloadEngine.cc: added #include directive of sys/time.h and
  275. algorithm.
  276. * Exception.h: added #include directive of stdio.h.
  277. * AbstractCommand.h: added #include directive of sys/time.h.
  278. * DownloadCommand.h: added #include directive of sys/time.h.
  279. * *.h: added #include directive of common.h to all base classes.
  280. subclasses' one was removed.
  281. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  282. does not define these macros.
  283. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  284. * Release 0.2.0
  285. * main.cc:
  286. * HttpInitiateConnectionCommand.{h,cc}:
  287. * prefs.h:
  288. * HttpConnection.{h,cc}: added --http-proxy-method option.
  289. We can now use GET command in http proxy.
  290. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  291. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  292. that splits slowest segment of SegmentMan::commands vector.
  293. This is the default split algorithm of aria2.
  294. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  295. that splits first segment of SegmentMan::commands vector.
  296. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  297. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  298. * Segment.h:
  299. * SegmentMan.cc: Added speed field to Segment.h
  300. * main.cc: -s option now affects all URLs in command-line arguemtns.
  301. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  302. * message.h: Change file size related %d to %lld.
  303. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  304. * FtpInitiateConnectionCommand.{h,cc}:
  305. * FtpNegotiationCommand.{h,cc}:
  306. * FtpDownloadCommand.{h,cc}:
  307. * FtpConnection.{h,cc}: Added FTP support
  308. * SimpleLogger.cc: Log message now includes time information.
  309. * main.cc: The value of --http-auth-scheme option is chagned from
  310. 'BASIC' to 'basic'
  311. * main.cc: Added --timeout command-line option.
  312. * main.cc: Added --min-segment-size command-line option.
  313. * main.cc: Added --max-retries command-line option.
  314. * prefs.h: option string constants are now defined in prefs.h
  315. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  316. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  317. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  318. with version 0.1.0's one.
  319. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  320. * configure.in: Added --enable-ssl option to configure script.
  321. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  322. cannot permit absoluteURI as Request-URI.
  323. * HttpConnection.cc: Added Referer support.
  324. * main.cc: Added referer command-line option.
  325. * main.cc: Added rety-wait command-line option.
  326. * Exception.h: Fixed formating bug in Exception::setMsg()
  327. * SocketCore.{h,cc}:
  328. * Socket.{h, cc}:
  329. * Request.cc:
  330. * InitiateConnectionCommandFactory.cc:
  331. * HttpRequestCommand.cc: Added HTTPS support.
  332. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  333. for SocketCore.
  334. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  335. size is wrong
  336. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  337. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  338. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  339. * Release 0.1.0