ChangeLog 17 KB

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