ChangeLog 27 KB

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