Commit Graph

434 Commits

Author SHA1 Message Date
Charles Kerr bee21fb545 (trunk libT) #1992: try to cleanly destroy the "verify local data" thread on shutdown 2009-04-16 13:10:25 +00:00
Charles Kerr cf552651f7 (trunk libT) in tr_torrentFiles(), avoid some expensive calculations if the torrent is a seed. 2009-04-12 17:31:17 +00:00
Charles Kerr b3813000e9 (trunk libT) add more tests to verify r8214 2009-04-11 15:48:58 +00:00
Charles Kerr 35564b76a4 (trunk libT) startup uses less cpu now on big torrents. another cachegrind discovery 2009-04-11 06:58:14 +00:00
Charles Kerr f4dde1eb67 (trunk libT) omit some unnecessary tests on the bitfield checks. these seem small, but bitfields are always the top CPU abuser when I profile... 2009-04-11 03:24:36 +00:00
Charles Kerr 81766a8dcb (trunk libT) another possible fix for #1894: Crash when download finishes and seed ratio is already met 2009-04-09 14:10:31 +00:00
Charles Kerr a1adee368f (trunk)
1. add to the "recently-changed" torrent a list of recently-removed torrent ids.
2. make the day-of-week alt speed a bitfield of days or'ed together, so that you can have (say) speed limits on monday and wednesday
2009-04-04 05:29:08 +00:00
Charles Kerr 96b726c08a (trunk rpc) add "torrentFile" to the list of allowed arguments to the "torrent-get" method 2009-04-02 22:59:30 +00:00
Charles Kerr b6daa50ecf (trunk rpc) add the ability to set file priorities and download flags when adding a new torrent via rpc 2009-04-02 20:43:42 +00:00
Charles Kerr c3b24bc471 (trunk) modify tr_torrentParse() and tr_torrentNew() arguments s.t. they use the ctor's session instead of passing it in again. Allow a NULL session pointer for some cases of tr_torrentParse(). 2009-04-02 17:30:29 +00:00
Charles Kerr f1d92708e7 (trunk) more speedlimit work 2009-03-28 16:47:01 +00:00
Charles Kerr cc1a4ec1e9 (trunk) rpc changes:
1. new field "blocklist-size" to session-info, so RPC clients can know how big the blocklist is
2. new method "torrent-reannounce" so RPC clients can ask the tracker for more peers
2009-03-26 18:06:54 +00:00
Charles Kerr 41b0cc8cdd (trunk) libT and gtk+ parts for #1889: per-torrent vs. global speed limit confusion 2009-03-04 19:52:57 +00:00
Charles Kerr e8422f8cdd (trunk libT) always invoke the stop-ratio check when a torrent switches from leeching to seeding. 2009-03-04 15:13:56 +00:00
Charles Kerr ebe125e896 (trunk libT) add another seed-ratio check when starting a torrent, as per Mitchell's suggestion 2009-03-02 23:52:25 +00:00
Charles Kerr 6f994f6708 (trunk libT) in tr_torrentCheckSeedRadio(), make sure to check & see if the torrent is running ;) 2009-03-02 03:18:03 +00:00
Mitchell Livingston 3ffbb31774 if the ratio is infinity, stop seeding if a stop ratio is set 2009-03-01 23:49:43 +00:00
Mitchell Livingston 2dabe5ce34 move the percent to the stop ratio into libtransmission 2009-03-01 23:48:04 +00:00
Charles Kerr 6fc252e007 (trunk libT) tweak r7985 2009-03-01 17:38:23 +00:00
Charles Kerr d2f69877cf (trunk libT) tweak r7978 2009-03-01 17:37:10 +00:00
Mitchell Livingston 7400adb70d make the ratio that is checked for stop ratio match the displayed ratio 2009-03-01 14:01:49 +00:00
Charles Kerr 857b3dab10 (trunk libT) #1823: Ratio limit is only checked when peers are active 2009-03-01 13:56:22 +00:00
Mitchell Livingston 3d1cf6ba0d assorted trivial cleanup 2009-02-17 04:00:53 +00:00
Mitchell Livingston b9ff19ba38 a newly-added torrent should always follow the global ratio setting 2009-02-17 01:42:10 +00:00
Mitchell Livingston 39b0108366 have the mac ui use libT's ratio settings (attempt 1); when seed ratio is reached in libT, set the seed ratio setting to "seed forever" 2009-02-14 21:15:57 +00:00
Mitchell Livingston fa3b9a12c5 eta will now indicate time remaining to reach seed ratio when seeding 2009-02-14 05:15:23 +00:00
Charles Kerr 3f9a1d090b (trunk) #1787: add support for seeding ratio limiting in libtransmission 2009-02-13 18:23:56 +00:00
Charles Kerr e7c2fe4b46 (trunk libT) #1760: test fix for a deadlock that occurs stopping a file that's being verified 2009-02-05 19:57:50 +00:00
Charles Kerr 6c7097d1f4 (trunk libT) more assertions 2009-01-30 00:41:08 +00:00
Charles Kerr 61e18f1d1b (trunk libT) yet even *more* assertions for Biiaru and persept :) 2009-01-29 16:56:43 +00:00
Charles Kerr 6f95a057d0 (trunk libT) when deleting a torrent's local data -- folders and files -- use remove() instead of unlink() because the former handles both folders and files gracefully 2009-01-22 21:43:46 +00:00
Charles Kerr 486c55c1ed (trunk libT) peerMgr: operate directly on tr_torrent and not peerMgr+torrentHash 2009-01-13 21:00:05 +00:00
Charles Kerr dab899f132 (trunk libT) #1427: Files are kept open in read/write mode after a torrent finishes 2009-01-12 19:58:16 +00:00
Charles Kerr 2f6b56671f (trunk libT) win32 portability patch from Alexey 2009-01-11 17:02:04 +00:00
Charles Kerr b545dbe28a (trunk libT) fix downloadDir error reported & tracked down by wereHamster 2009-01-09 18:39:30 +00:00
Charles Kerr 141847b902 (trunk libT) update the copyrights on some files that no longer have old code in them 2009-01-07 06:53:29 +00:00
Charles Kerr 5ccd5a7700 (trunk libT) fix the much-hated "Assertion failed: (tr_isPeerIo( io ))". Also, repeated calls to tr_date() were taking up about 78% of the time in tr_stat(), so instead of calling multiple times, call it once in tr_stat() and pass that value around to the functions that need it. 2009-01-05 04:27:54 +00:00
Charles Kerr ead8254b85 (trunk libT) tr_torrentStat() speedups 2009-01-03 23:11:29 +00:00
Charles Kerr 0d2d375125 (trunk libT) inline a few more torrent methods 2009-01-03 00:25:27 +00:00
Charles Kerr 86d3e70121 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_ratecontrol, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2009-01-02 20:42:35 +00:00
Charles Kerr 199e38dd66 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_completion, contain the it directly rather than a pointer to one allocated elsewhere on the heap. 2009-01-02 17:01:55 +00:00
Charles Kerr d6b4db4a78 (trunk libT) add "inline" hint to several one-liner functions 2009-01-02 06:28:22 +00:00
Charles Kerr 7a4002dd3a (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_bitfield, contain it directly rather than a pointer to one allocated elsewhere on the heap. 2008-12-29 09:51:54 +00:00
Charles Kerr 427f639664 (trunk libT) avoid some unnecessary memory fragmentation... for composited objects that have a tr_ptrArray, contain the tr_ptrArray directly rather than a pointer to one allocated elsewhere on the heap. 2008-12-29 08:54:36 +00:00
Charles Kerr dfcc9173e5 (trunk libT) #include "session.h" cleanup from wereHamster 2008-12-23 17:27:15 +00:00
Charles Kerr 303356d110 (trunk) #1029: When removing local data only remove data from the torrent 2008-12-23 16:04:11 +00:00
Charles Kerr 8556ce653f (trunk libT) comments, tr_bool correctness, better runtime tests. 2008-12-21 18:15:00 +00:00
Charles Kerr 54be88dec3 (trunk libT) add ipv6 support by jhujhiti. I think this is the largest user-contributed patch we've ever used... thanks jhujhiti :) 2008-12-15 00:17:08 +00:00
Charles Kerr 788b397ecc (trunk libT) more semantic cleanup: tr_handle->tr_session, int->tr_bool, int->tr_port 2008-12-14 11:21:11 +00:00
Charles Kerr f1419a95c0 (trunk libT) semantic cleanup: int -> tr_bool 2008-12-13 23:39:12 +00:00
Charles Kerr 6b0d98a695 (trunk) #1559: Simplify tr_sessionInitFull 2008-12-13 23:17:36 +00:00
Charles Kerr a33b78fc53 (daemon) #1510: kysucix's patch to give an option to delete local data via RPC when removing a torrent. 2008-12-09 17:01:49 +00:00
Charles Kerr 519b4d3f5e (trunk libT) if an individual torrent's speed limit is set, don't pay attention to the global speed limit 2008-12-09 15:09:26 +00:00
Charles Kerr 76ce949419 (libT) fix a minor memory leak. 2008-12-06 02:21:50 +00:00
Charles Kerr bdffa5ce20 (libT) #1454: List of files selection/priority resetting 2008-12-02 23:27:45 +00:00
Charles Kerr d4ee0d714a (libT) #1379: support "partial seeds" BEP 22 2008-12-02 19:46:51 +00:00
Charles Kerr 9d39ed2540 (libT) misc cleanup 2008-12-02 18:24:26 +00:00
Charles Kerr c910993b68 #1379 lay some very early groundwork for "partial seeds" -- change tr_completion's enum to use the partial seed terminology 2008-11-30 01:52:45 +00:00
Charles Kerr ff651209c8 (libT) remove debugging statement that got checked in by accident 2008-11-26 05:58:10 +00:00
Charles Kerr f44248a7d7 (libT) yet another stab at getting bandwidth management under control. this version may suck less than previous attempts. It also breaks the mac build until someone adds iobuf.[ch] to xcode... 2008-11-25 21:35:17 +00:00
Charles Kerr be5e6774ad (libT) #1468: another stab at getting the peer transfer speeds both fast and a little more consistent. 2008-11-24 04:21:23 +00:00
Charles Kerr 42fe27c067 more fucking around with the speed measurements. 2008-11-08 02:49:04 +00:00
Charles Kerr 58ea9e4be8 (libT) revise r7065 2008-11-07 05:37:59 +00:00
Charles Kerr c8b51fb734 #1429 (libT) cleaner handling of the special case where the upload or download speed limit is zero 2008-11-07 04:10:27 +00:00
Charles Kerr 04d10183e1 (libT) fix r7055 oops. Also, the comment on that last commit should read "in the values returned by the public API's speed functions, only give the piece data transfer speeds -- don't include the protocol overheads" 2008-11-06 03:04:21 +00:00
Charles Kerr 8e4fa83c77 update NEWS 2008-11-06 02:56:51 +00:00
Charles Kerr 10566eece9 (libT) #849: preallocate files when possible to prevent disk fragmentation 2008-11-05 05:56:06 +00:00
Charles Kerr 5d35dfaeca (libT) micro-optimizations suggested by cachegrind 2008-11-03 17:01:08 +00:00
Charles Kerr f2a933fb77 #1308: Transmission forgets it's verifying data 2008-10-28 15:13:07 +00:00
Charles Kerr 11f240365e fix tab damage 2008-10-27 17:35:22 +00:00
Charles Kerr 5ad58ea83e fix r6965 oops 2008-10-27 04:39:30 +00:00
Charles Kerr 631d9d9a8f (libT) fold together some redundant sanity tests that were taking up 6.6% in softwareelves' profile 2008-10-27 04:27:55 +00:00
Charles Kerr 0c4f300f1b #1369: clarify the different torrent status & callbacks' APIs and typenames 2008-10-20 17:54:56 +00:00
Charles Kerr ea668ca9ff (libT) possible fix for the up/down display inconsistency reported by BentMyWookie. 2008-10-20 03:47:48 +00:00
Charles Kerr e3a5524189 have tr_buildPath() allocate memory from the heap rather than using an input buffer 2008-10-14 03:03:29 +00:00
Charles Kerr 4fab4c9e9b (libT) finish killing tr_errno. 2008-10-03 04:49:06 +00:00
Charles Kerr b1ef118e3f (libT) housekeeping: tr_torrent.handle --> tr_torrent.session 2008-10-02 15:53:33 +00:00
Charles Kerr cc89872dd4 run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened 2008-09-23 19:11:04 +00:00
Charles Kerr 4fe1e1dae3 first draft at having more accurate speed controls 2008-09-17 19:44:24 +00:00
Charles Kerr 419242e36f (libT) change benc's integral type from int to size_t, squashing a couple of minor warnings 2008-09-04 14:42:32 +00:00
Mukund Sivaraman de62de3e19 Replace random number generation code 2008-08-14 11:11:25 +00:00
Charles Kerr 2e6443a53d #1168: reading past the end of KTorrent's pex added.f strings 2008-08-10 14:58:11 +00:00
Charles Kerr c6026a3b66 #1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero#1143: crash in 1.30 when adding torrents: div by zero 2008-08-06 11:39:30 +00:00
Charles Kerr 74dd613895 #1135: crashes when adding torrent, with "assert( ( info->pieceSize % tor->blockSize ) == 0 );" 2008-08-05 20:27:40 +00:00
Charles Kerr b860119cd3 minor text cleanup 2008-08-01 16:43:22 +00:00
Charles Kerr 2eb89eb2a7 (libT) fix some minor warnings foudn by clang's scan-build and reported by m1b 2008-07-17 20:33:34 +00:00
Charles Kerr 16e3803082 small tr_torrentStat() speedup suggested by BentMyWookie 2008-06-17 14:25:23 +00:00
Charles Kerr 6cce27bf54 (rpc) simplify the rpc accessors 2008-06-16 03:47:50 +00:00
Charles Kerr effb78d674 unify the daemon and gtk client's config files so that you can easily swap back and forth between clients and keep the same torrents and preferences. 2008-06-12 16:25:36 +00:00
Charles Kerr 13424ed977 (libT) add NULL pointer checks to tr_torrentStart(), tr_torrentStop() 2008-06-10 19:25:18 +00:00
Charles Kerr 393ebbc24a more webseed work. 2008-06-10 02:36:52 +00:00
Charles Kerr 837f997e6c (libT) new API for webseed statistics: tr_torrentGetWebSpeeds() 2008-06-10 01:38:12 +00:00
Charles Kerr dce24eb1f0 libT: first cut at implementing the internal peers' request queues as pieces rather than blocks, as discussed with erdgeist and denis, to avoid a couple of nasty CPU bottlenecks. 2008-06-09 22:53:45 +00:00
Charles Kerr 9f2d7c2c67 (libT) if there are webseeds, update the available amount accordingly 2008-06-09 02:38:27 +00:00
Charles Kerr 044bfbad39 add tr_torrentSetDoneDate() too 2008-06-03 19:42:54 +00:00
Charles Kerr 870c4d7650 add tr_torrentSetAddedDate() and tr_torrentSetActivityDate() 2008-06-03 19:22:22 +00:00
Charles Kerr e1a23350d4 (1) add a doneDate to tr_torrent and tr_stat. (2) save tr_torrent.doneDate and tr_torrent.activityDate between sessions in the .resume file. 2008-06-03 19:16:12 +00:00
Charles Kerr 5db4ca7fa3 #981: add tr_stat.dateAdded to libT; add "sort by age" to gtk+ client 2008-06-02 04:41:55 +00:00
Charles Kerr 07c1b28e9e #838 (Adding trackers to existing torrents): add a backend API for this (tr_torrentSetAnnounceList) and implement a GUI for it in the gtk+ client. 2008-06-01 01:40:32 +00:00
Charles Kerr 0a023367b6 fix r5985 oops. I shouldn't make commits when I'm in a hurry. 2008-05-31 15:15:54 +00:00