ChangeLog 17 KB

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