ChangeLog 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. To add LogFactory which creates singleton logger:
  3. * src/LogFactory.h: New class.
  4. * src/LogFactory.cc: New class.
  5. * src/Command.h (logger): New variable.
  6. (Constructor): Use LogFactory.
  7. * src/AbstractCommand.cc: Use Command::logger
  8. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  9. Use LogFactory.
  10. * src/SegmentSplitter.h : Made logger protected.
  11. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  12. * src/SegmentMan.cc (Constructor): Use LogFactory.
  13. * src/DownloadEngine.h : Made logger protected.
  14. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  15. * src/PeerInteractionCommand.cc : Use Command::logger.
  16. * src/HttpResponseCommand.cc : Use Command::logger.
  17. * src/SegmentMan.h : Made logger private.
  18. * src/TorrentMan.h : Made logger private.
  19. * src/TorrentMan.cc : Use LogFactory.
  20. * src/FtpNegotiateCommand.cc : Use Command::logger.
  21. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  22. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  23. Use LogFactory.
  24. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  25. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  26. Use LogFactory.
  27. * src/DownloadCommand.cc : Use Command::logger.
  28. * src/PeerAbstractCommand.cc : Use Command::logger.
  29. * src/PeerListenCommand.cc : Use Command::logger.
  30. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  31. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  32. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  33. * src/TrackerWatcherCommand.cc : Use Command::logger.
  34. * src/TrackerUpdateCommand.cc : Use Command::logger.
  35. * src/TrackerDownloadCommand.cc : Use Command::logger.
  36. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  37. Use LogFactory.
  38. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  39. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  40. Use LogFactory.
  41. * src/main.cc (main): Use LogFactory.
  42. * src/DiskAdaptor.h (logger): New variable.
  43. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  44. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  45. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  46. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  47. parameter to a tracker request.
  48. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  49. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  50. * src/main.cc (setSignalHander): New function.
  51. (main): Added a handler for SIGTERM.
  52. (handler): Updated message.
  53. (torrentHandler): Updated message.
  54. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  55. * src/TorrentConsoleDownloadEngine.cc
  56. (onPartialDownloadingCompletes): Renamed as
  57. onSelectiveDownloadingCompletes.
  58. (onSelectiveDownloadingCompletes): Updated message.
  59. To add DiskAdaptor which abstract DiskWriter family:
  60. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  61. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  62. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  63. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  64. MultiDiskAdaptor.h.
  65. (readFileEntry): Changed its arguments.
  66. (setup): setupDiskWriter is merged into this function.
  67. (setupDiskWriter): Removed.
  68. (setFileFilter): New function.
  69. (readFileEntryFromMetaInfoFile): Updated according to the changes
  70. made in readFileEntry.
  71. (getFilePath): Removed.
  72. (getTempFilePath): Removed.
  73. (getSegmentFilePath): Updated due to the removal of getFilePath.
  74. (fixFilename): Removed.
  75. (copySingleFile): Removed.
  76. (splitMultiFile): Removed.
  77. (deleteTempFile): Removed.
  78. (setFileEntriesToDownload): Removed.
  79. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  80. (isSelectiveDownloadingMode): New function.
  81. (setAllMultiFileRequestedState): Removed.
  82. (finishPartialDownloadingMode): Renamed as
  83. finishSelectiveDownloadingMode.
  84. (finishSelectiveDownloadingMode): New function.
  85. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  86. (getSelectedTotalLength): New function.
  87. (onDownloadComplete): Use diskAdaptor.
  88. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  89. (Range): Removed.
  90. (setMultiFileEntries): Renamed as setFileEntries.
  91. (setFileEntries): New function.
  92. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  93. (pieceLength): New variable.
  94. * src/main.cc (printDownloadCompeleteMessage): New function.
  95. (torrentHandler): Use diskAdaptor instead of diskWriter.
  96. (main): Renamed torrent-show-files to show-files.
  97. Rewritten file contents listing.
  98. * src/TorrentMan.h (FileEntry): Removed.
  99. (multiFileTopDir): Removed.
  100. (multiFileEntries): Removed.
  101. (diskWriter): Removed.
  102. (diskAdaptor): New variable.
  103. * src/DefaultDiskWriter.h (totalLength): New variable.
  104. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  105. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  106. diskWriter.
  107. * src/TorrentConsoleDownloadEngine.h
  108. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  109. (partialTotalLength): Renamed as selectedTotalLength.
  110. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  111. openExistingFile, otherwise call initAndOpenFile.
  112. (closeFile): fd > 0, not fd != 0.
  113. * src/DirectDiskAdaptor.h: New class.
  114. * src/DirectDiskAdaptor.cc: New class.
  115. * src/MultiDiskAdaptor.h: New class.
  116. * src/MultiDiskAdaptor.cc: New class.
  117. * src/CopyDiskAdaptor.h: New class.
  118. * src/CopyDiskAdaptor.cc: New class.
  119. * src/DiskAdaptor.h: New class.
  120. * src/DiskAdaptor.cc: New class.
  121. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  122. (PREF_SHOW_FILES): New definition.
  123. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  124. To add the ability to download multi torrent into respective files
  125. directly:
  126. * src/DiskWriter.h (openFile): New function.
  127. (seek): Removed.
  128. * src/MultiDiskWriter.h: New class.
  129. * src/MultiDiskWriter.cc: New class.
  130. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  131. protected.
  132. (openFile): New function.
  133. * src/AbstractDiskWriter.cc (openFile): New function.
  134. * src/prefs.h (V_FALSE): New definition.
  135. (PREF_DIRECT_FILE_MAPPING): New definition.
  136. * src/TorrentMan.h (setupDiskWriter): New function.
  137. (setAllMultiFileRequestedState): New function.
  138. (onDownloadComplete): New function.
  139. * src/TorrentMan.cc : Included MultiDiskWriter.h
  140. (setupDiskWriter): New function.
  141. (getFilePath): Updated.
  142. (getTempFilePath): Updated.
  143. (getSegmentFilePath): Updated.
  144. (fixFilename): Updated.
  145. (deleteTempFile): Updated.
  146. (setAllMultiFileRequestedState): New function.
  147. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  148. (finishPartialDownloadingMode): Reset requested flags.
  149. (onDownloadComplete): New function.
  150. * src/main.cc: Added --direct-file-mapping option.
  151. Use TorretMan::setupDiskWriter().
  152. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  153. onDownloadComplete().
  154. To fix ETA bug:
  155. * src/Util.h (difftvsec): New function.
  156. * src/Util.cc (difftvsec): New function.
  157. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  158. type of "elapsed" instead of long long int.
  159. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  160. The updates of statistics takes place every 1 seconds.
  161. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  162. (calculateSpeed): Changed its argument signature.
  163. * src/PeerMessage.cc (toString): Fixed message.
  164. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  165. To print ETA:
  166. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  167. completion handling when dealing with
  168. TorrentMan::isPartialDownloadingMode() == true.
  169. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  170. New function.
  171. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  172. (sessionDownloadLength): New variable.
  173. (avgSpeed): New variable.
  174. (eta): New variable.
  175. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  176. new variables: eta, avgSpeed, startup.
  177. (calculateSpeed): Calculate average speed and ETA.
  178. (printStatistics): Added ETA.
  179. * src/Util.h (secfmt): New function.
  180. * src/Util.cc (secfmt): New function.
  181. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  182. To detect "keep alive" flooding:
  183. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  184. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  185. variable: keepAliveCount.
  186. (detectMessageFlooding): Added "keep alive" flooding detection.
  187. (receiveMessage): Increase keepAliveCount when "keep alive" message
  188. received.
  189. To add the ability to download only specified files in multi-file
  190. torrent:
  191. * src/BitfieldMan.h (filterBitfield): New variable.
  192. (filterEnabled): New variable.
  193. (setFilterBit): New function.
  194. (enableFilter): New function.
  195. (disableFilter): New function.
  196. (isFilterEnabled): New function.
  197. (getFilteredTotalLength): New function.
  198. (getCompletedLength): New function.
  199. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  200. filterBitfield, filterEnabled.
  201. (CopyConstructor): Added filterBitfield and filterEnabled.
  202. (operator==): Added filterBitfield and filterEnabled.
  203. (Destructor): Added filterBitfield.
  204. (getMissingIndex): Use filterBitfield.
  205. (getMissingUnusedIndex): Use filterBitfield.
  206. (getFirstMissingUnusedIndex): Use filterBitfield.
  207. (getFirstMissingUnusedIndex): Use filterBitfield.
  208. (getAllMissingIndexes): Use filterBitfield.
  209. (countMissingBlock): Use filterBitfield.
  210. (countBlock): Use filterBitfield.
  211. (setBitInternal): Added new argument on.
  212. (setUseBit): Use setBitInternal.
  213. (unsetUseBit): Use setBitInternal.
  214. (setBit): Use setBitInternal.
  215. (unsetBit): Use setBitInternal.
  216. (isAllBitSet): Use filterBitfield.
  217. (setFilterBit): New function.
  218. (addFilter): New function.
  219. (enableFilter): New function.
  220. (disableFilter): New function.
  221. (clearFilter): New function.
  222. (isFilterEnabled): New function.
  223. (getFilteredTotalLength): New function.
  224. (getCompletedLength): New function.
  225. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  226. Initalized newly added variables.
  227. [FileEntry](offset): New variable.
  228. [FileEntry](extracted): New variable.
  229. [FileEntry](requested): New variable.
  230. (readFileEntry): New function.
  231. (option): New variable.
  232. (splitMultiFile): Removed const qualifier.
  233. (fixFilename): Removed const qualifier.
  234. (readFileEntryFromMetaInfoFile): New function.
  235. (finishPartialDownloadingMode): New function.
  236. (isPartialDownloadingMode): New function.
  237. (setFileEntriesToDownload): New function.
  238. (getCompletedLength): New function.
  239. (getPartialTotalLength): New function.
  240. * src/TorrentMan.cc (readFileEntry): New function.
  241. (setup): Use readFileEntry. If no-preallocation option is specified,
  242. use DefaultDiskWriter.
  243. (readFileEntryFromMetaInfoFile): New function.
  244. (fixFilename): Removed const qualifier.
  245. (splitMultiFile): Removed const qualifier.
  246. (setFileEntriesToDownload): New function.
  247. (isPartialDownloadingMode): New function.
  248. (finishPartialDownloadingMode): New function.
  249. (getCompletedLength): New function.
  250. (getPartialTotalLength): New function.
  251. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  252. New variable.
  253. (partialTotalLength): New variable.
  254. (downloadLength): New variable.
  255. (totalLength): New variable.
  256. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  257. Added log.
  258. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  259. partialTotalLength, downloadLength, totalLength.
  260. (calculate): Calculate downloadLength and totalLength.
  261. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  262. * src/main.cc (addCommand): Changed argument signature.
  263. (main): Added new variable: args. Added new option "torrent-show-files"
  264. "no-preallocation". Usage is not updated yet.
  265. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  266. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  267. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  268. Attempt to add the ability to listing file entries in a .torrent file.
  269. This feature is not yet complete.
  270. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  271. * src/TorrentMan.cc (getMultiFileEntries): New function.
  272. (getName): New function.
  273. * src/TorrentMan.h (getMultiFileEntries): New function.
  274. (getName): New function.
  275. * src/main.cc (main): Use above 2 funtion.
  276. * Release 0.3.2
  277. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  278. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  279. (detectMessageFlooding): Updated threshold value.
  280. (checkLongTimePeerChoking): Updated timeout value.
  281. (getNewPieceAndSendInterest): Added debug log.
  282. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  283. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  284. (getPeer): Updated.
  285. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  286. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  287. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  288. is localhost.
  289. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  290. * src/PendingMessage.cc (processMessage): Not to send piece message
  291. if peer is not interested in the pieces localhost has.
  292. * src/Peer.cc (shouldChoke): Updated.
  293. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  294. * src/Util.cc (isPowerOf): New function.
  295. * src/Util.h (isPowerOf): New function.
  296. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  297. whether or not it is power of 2.
  298. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  299. Added new class SendMessageQueue that includes PendingMessages and
  300. RequestSlotMan.
  301. * src/SendMessageQueue.h: New class.
  302. * src/SendMessageQueue.cc: New class.
  303. * src/PendingMessage.h: Added new member variable blockIndex and its
  304. accessors.
  305. (createRequestMessage): Updated.
  306. * src/PendingMessage.cc (createRequestMessage): Updated.
  307. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  308. SendMessageQueue.
  309. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  310. (receiveMessage): Updated with SendMessageQueue.
  311. (deletePendingPieceMessage): Removed.
  312. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  313. (sendInterest): Updated with SendMessageQueue.
  314. (createRequestPendingMessage): Updated with SendMessageQueue.
  315. (sendMessages): Updated with SendMessageQueue.
  316. (onAbort): Updated with SendMessageQueue.
  317. (keepAlive): Updated with SendMessageQueue.
  318. (beforeSocketCheck): Updated SendMessageQueue.
  319. * src/PeerInteractionCommand (sendMessages): Shuffle
  320. missingBLockIndexes before using it.
  321. Added its own timeout for peer connection.
  322. * src/PeerAbstractCommand.h: Added member variable timeout and its
  323. setter.
  324. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  325. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  326. Added setTimeout() call.
  327. (executeInternal): Added setTimeout() call.
  328. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  329. Added timeout.
  330. (isTimeoutDetected): Updated.
  331. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  332. option.
  333. Added *simple* message flooding checker.
  334. * src/PeerInteractionCommand.cc (executeInternal):
  335. Added detectMessageFlooding() call.
  336. (detectMessageFlooding): New function.
  337. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  338. (beforeSocketCheck): Added detectMessageFlooding() call.
  339. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  340. chokeUnchokeCount, haveCount, detectMessageFlooding().
  341. Removed deletePendingPieceMessage(), getRequestSlot(),
  342. deleteRequestSlot(), deleteAllRequestSlot().
  343. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  344. Added checkLongTimePeerChoking() call.
  345. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  346. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  347. if duplicate == false.
  348. The parameter "uploaded" and "downloaded" in the tracker request are
  349. the size since the client sent the "started" event to the tracker.
  350. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  351. uploaded size to preDownloadedSize, preUploadedSize respectively.
  352. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  353. getSessionDownloadedSize(), getSessionUploadedSize().
  354. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  355. getSessionUploadedSize() instead of getDownloadedSize(),
  356. getUploadedSize().
  357. * src/PendingMessage.cc (processMessage): Do not send request message
  358. if the peer is choking the client.
  359. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  360. less than interval.
  361. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  362. * configure.in: Added gnutls support. Added several CPP macros.
  363. * m4/openssl.m4: Added.
  364. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  365. readData(), peekData(). Added gnutls support.
  366. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  367. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  368. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  369. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  370. Instead, added a check for whether setup method has executed
  371. successfully.
  372. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  373. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  374. * src/Makefile.am: Updated.
  375. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  376. using whether OpenSSL or gcrypt, depending on the result of configure
  377. script.
  378. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  379. messageDigest.h.
  380. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  381. * src/PeerListenCommand.cc: Added log about port binded successfully.
  382. Fixed memory leak.
  383. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  384. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  385. Removed instantiation of TrackerInitCommand. Instead,
  386. TrackerWatcherCommand is instantiated and pushed to the command queue.
  387. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  388. ENABLE_SSL.
  389. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  390. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  391. If a piece is already acquired by another command, delete the request
  392. slots for the piece.
  393. * src/TrackerUpdateCommand.cc (execute):
  394. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  395. Added a check whether peer list is null.
  396. Fixed the bug that causes sending completed event to the tracker
  397. several times.
  398. * src/TrackerInitCommand.cc (execute):
  399. Fixed the bug that causes sending completed event to the tracker
  400. several times.
  401. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  402. by using messageDigest.h.
  403. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  404. * PeerConnection.cc: Replaced log message "keep-alive" with
  405. "keep alive".
  406. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  407. localhost long time.
  408. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  409. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  410. at most 100 failure entry from the list. If with duplicate = false,
  411. MAX_PEER_LIST is not checked.
  412. * PeerListenCommand.cc: Fixed the argument order of log message.
  413. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  414. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  415. Added warn().
  416. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  417. Implemented warn().
  418. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  419. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  420. * Request.h: Added AFTER_COMPLETED event.
  421. * TorrentDownloadEngine.cc: Prints "Download complete" message
  422. instead of downloaded size and progress(%) after download completes.
  423. * PeerInteractionCommand.cc: After download completes, sends unchoke
  424. message to the peer if it is interested in what localhost has
  425. downloaded.
  426. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  427. destination instead of just renaming it.
  428. * TorrentMan.cc: Added deleteTempFile().
  429. * PeerAbstractCommand.cc: do not stop execution after download
  430. completes. This makes localhost a seeder.
  431. * Util.{h,cc}: Added fileCopy().
  432. * PeerListenCommand.cc: do not stop execution after download completes.
  433. This makes localhost a seeder.
  434. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  435. Added TorrentMan::deleteTempFile() to torrentHandler.
  436. Initialized the variable dir as ".".
  437. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  438. Deleted renameSingleFile().
  439. Added copySingleFile(), deleteTempFile().
  440. * DownloadEngine.h: Added virtual function afterEachIteration().
  441. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  442. in onEndOfRun() to afterEachIteration().
  443. In onEndOfRun(), changed if condition to check whether filenameFixed is
  444. true.
  445. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  446. In rangedFileCopy(), added try-catch block to properly close file
  447. descriptors.
  448. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  449. Added afterEachIteration(), isFilenameFixed().
  450. * Peer.cc: Changed choking strategy.
  451. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  452. * TrackerInitCommand.cc: Send completed event only once.
  453. * DownloadEngine.cc: Added a call to afterEachIteration().
  454. * TrackerUpdateCommand.cc: Do not stop execution after download
  455. completes.
  456. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  457. connect the peers at most MAX_PEER_UPDATE when a peer list is
  458. received from a tracker.
  459. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  460. Decreased the number of failure peers to delete to 0(just comment out
  461. the line).
  462. * Release 0.3.1
  463. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  464. * PeerInteractionCommand.cc: added a call to
  465. TorrentMan::unadvertisePiece in Destructor.
  466. * PeerInteractionCommand.cc: make have message sent immediately
  467. if the size of pending message queue is zero.
  468. * TorrentMan.cc: set the maximum size of peer list to 250.
  469. * TorrentMan.h: changed the container type of Peers and UsedPieces
  470. to deque.
  471. * Util.cc: fixed rangedFileCopy.
  472. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  473. to Constructor. Also, moved digest cleanup to Destructor.
  474. * MetaFileUtil.cc: fixed memory leak
  475. * replaced std::vector with std::deque.
  476. * AbstractCommand.cc: casted timeout value to long long int.
  477. * ChunkedEncoding.cc: fixed memory leak.
  478. * PeerInteractionCommand.cc: casted timeout value to long long int.
  479. * SleepCommand.cc: casted timeout value to long long int.
  480. * Data.cc: fixed memory leak.
  481. * Data.cc: fixed toLLInt().
  482. * BitfieldMan.cc: fixed memory leak.
  483. * TorrentMan.cc: initialized storeDir to ".".
  484. * TorrentMan.cc: fixed memory leak.
  485. * TorrentMan.cc: corrected file paths of splitted files.
  486. * PeerAbstractCommand.cc: casted timeout to long long int.
  487. * main.cc: added delete(req) and delete(te->diskWriter).
  488. * RequestSlot.cc: casted timeout value to long long int.
  489. * Request.cc: fixed memory leak.
  490. * PendingMessage.cc: make HAVE messages sent only when peer does not
  491. have the piece.
  492. * Peer.{h,cc}: added hasPiece(int index).
  493. * main.cc: corrected addCommand.
  494. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  495. * BitTorrent protocol support added.
  496. * Release 0.3.0
  497. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  498. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  499. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  500. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  501. decoding did not work properly.
  502. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  503. * DownloadEngine.h: included sys/time.h
  504. * DownloadEngine.cc: remove sys/time.h
  505. * Makefile.am (SUBDIRS): Add intl.
  506. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  507. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  508. * main.cc: correct help message for --http-auth-scheme.
  509. * main.cc: changed e-mail address for bug reports.
  510. * ja.po: added japanese translation.
  511. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  512. * SimpleLogger.cc: flush log file instead of stdout.
  513. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  514. * main.cc: Fixed command-line option: max-tries
  515. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  516. does not equal to seg.sp.
  517. * DownloadCommand.cc: If EOF is got from the server and the total size
  518. of file is not zero, then throw DlRetryEx.
  519. * main.cc: Set the minium value of min-segment-size to 1024.
  520. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  521. fails because of a regression since 0.2.0 release.
  522. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  523. * HttpConnection.cc:
  524. * common.h: defined the user agent name as macro
  525. * DownloadEngine.{h, cc}:
  526. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  527. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  528. * main.cc: Download complete/abort message is now generated by main.
  529. * Makefile.am (SUBDIRS): Add m4.
  530. (ACLOCAL_AMFLAGS): New variable.
  531. (EXTRA_DIST): New variable.
  532. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  533. * gettext: added gettext functionality
  534. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  535. * AbstractCommand.cc:
  536. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  537. unregister its cuid from SegmentMan.
  538. * DownloadEngine.cc: .aria2 file was written when a downloading
  539. failed with errors.
  540. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  541. Added "User-Agent" header to CONNECT proxy request.
  542. Fixed "Proxy-Authorization" header. Now proxy authorization works
  543. properly.
  544. * Logger.h:
  545. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  546. * ChunkedEncoding.cc: Added #include directive for strings.h
  547. * Release 0.2.1
  548. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  549. * Util.{h,cc}: added startsWith().
  550. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  551. Util::endsWith().
  552. * SocketCore.cc: struct addrinfo is now zero-initialized.
  553. * common.h: added #include directive of limit.h.
  554. * DownloadEngine.cc: added #include directive of sys/time.h and
  555. algorithm.
  556. * Exception.h: added #include directive of stdio.h.
  557. * AbstractCommand.h: added #include directive of sys/time.h.
  558. * DownloadCommand.h: added #include directive of sys/time.h.
  559. * *.h: added #include directive of common.h to all base classes.
  560. subclasses' one was removed.
  561. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  562. does not define these macros.
  563. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  564. * Release 0.2.0
  565. * main.cc:
  566. * HttpInitiateConnectionCommand.{h,cc}:
  567. * prefs.h:
  568. * HttpConnection.{h,cc}: added --http-proxy-method option.
  569. We can now use GET command in http proxy.
  570. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  571. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  572. that splits slowest segment of SegmentMan::commands vector.
  573. This is the default split algorithm of aria2.
  574. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  575. that splits first segment of SegmentMan::commands vector.
  576. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  577. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  578. * Segment.h:
  579. * SegmentMan.cc: Added speed field to Segment.h
  580. * main.cc: -s option now affects all URLs in command-line arguemtns.
  581. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  582. * message.h: Change file size related %d to %lld.
  583. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  584. * FtpInitiateConnectionCommand.{h,cc}:
  585. * FtpNegotiationCommand.{h,cc}:
  586. * FtpDownloadCommand.{h,cc}:
  587. * FtpConnection.{h,cc}: Added FTP support
  588. * SimpleLogger.cc: Log message now includes time information.
  589. * main.cc: The value of --http-auth-scheme option is chagned from
  590. 'BASIC' to 'basic'
  591. * main.cc: Added --timeout command-line option.
  592. * main.cc: Added --min-segment-size command-line option.
  593. * main.cc: Added --max-retries command-line option.
  594. * prefs.h: option string constants are now defined in prefs.h
  595. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  596. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  597. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  598. with version 0.1.0's one.
  599. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  600. * configure.in: Added --enable-ssl option to configure script.
  601. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  602. cannot permit absoluteURI as Request-URI.
  603. * HttpConnection.cc: Added Referer support.
  604. * main.cc: Added referer command-line option.
  605. * main.cc: Added rety-wait command-line option.
  606. * Exception.h: Fixed formating bug in Exception::setMsg()
  607. * SocketCore.{h,cc}:
  608. * Socket.{h, cc}:
  609. * Request.cc:
  610. * InitiateConnectionCommandFactory.cc:
  611. * HttpRequestCommand.cc: Added HTTPS support.
  612. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  613. for SocketCore.
  614. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  615. size is wrong
  616. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  617. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  618. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  619. * Release 0.1.0