ChangeLog 16 KB

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