Commit Graph

135 Commits

Author SHA1 Message Date
Jordan Lee 9bf2434e14 (trunk) copyediting: remove trailing spaces from source code lines in daemon/ gtk/ libtransmission/ and utils/ 2011-03-04 23:26:10 +00:00
Jordan Lee 2b9db3c242 (trunk libT) #4048 "use bitsets instead of bitfield in tr_completion" -- done.
Excuse the sprawl. Much of this didn't fit into self-contained commits.
2011-02-23 03:54:04 +00:00
Jordan Lee e2584b04ff (trunk libT) #4047 "timeChecked for the last piece is not saved to a resume file" -- fixed.
A garden variety off-by-one error. good patch by jusid and revision by me.
2011-02-18 19:31:18 +00:00
Jordan Lee 06948a8514 (trunk libT) #2955 "verify pieces only when necessary, or when the user requests it." -- improvements to .resume file
As pointed out by longinus00 and ijuxda, storing per-piece timestamps in the .resume file can involve a lot of overhead. This commit reduces the overhead by adding a couple of optimizations: (1) in cases where *all* or *none* of the files' pieces were checked after the file's mtime, we can safely fold all the pieces' mtimes into a single per-file mtime. (2) since unix time takes up a lot of space when rendered as a benc integer, find a common per-file "baseline" number, then store the pieces' timestamps as offsets from that number.  Also add documentation explaining this new format, and also better explaining the pre-2.20 progress format.
2011-02-02 21:17:16 +00:00
Jordan Lee 4e38d97621 (trunk libT) #2955 "verify pieces only when necessary, or when the user requests it." -- add better support for old .resume files
Super-poussin says some readynas users are reporting high CPU oloads in 2.20 beta 1. My guess is this is due to pieces being reverified. Before now, the .resume files kept timestamps per-file, and 2.20 keeps timestamps per-piece. The problem is that 2.20 beta 1 didn't support reading the older per-file timetstamps from .resume files, so users loading up 2.20 beta 1 may find Transmission thinks none of the pieces in the torrents have been verified.

The fix is to have 2.20 beta 2 read the old per-file timestamps, so upgrading from 2.1x to 2.20 will go smoothly. That's what this commit does.

Unfortunately, the readynas users who have already been bitten by this will continue to be bitten until they reverify their files. 2.20 beta 1, which thinks all those pieces were never verified, has probably overwritten the .resume files from 2.1x... :(
2011-01-24 05:11:16 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Juliusz Chroboczek 96141bdbff Consolidate both versions of tr_isPex into a single function.
There used to be two versions of tr_isPex; one correct in peer-mgr.c,
and one buggy in resume.c.  The buggy version caused us to reject all
peers with non-trivial flags when resuming.
2011-01-16 15:47:09 +00:00
Charles Kerr e5bb3205a1 (trunk) Join the 21st century and use only 1 space at the end sentences. This commit is nearly as important as the semi-annual ones that remove trailing spaces from the ends of lines of code... :) 2010-12-27 19:18:17 +00:00
Charles Kerr 16a5fa4073 (trunk) #1408 "total downloading and seeding time per torrent" -- add patch to track how long a torrent has been seeding or downloading 2010-12-23 19:32:59 +00:00
Charles Kerr 43ed57b278 (trunk libT) #2955 "Lazy Verification (aka Just-in-Time Verification)" -- implemented. 2010-12-09 20:43:23 +00:00
Charles Kerr 8ba76790e2 #3781: remove redundant debug messages 2010-12-04 14:53:53 +00:00
Charles Kerr 3655047e85 (trunk) #2560: rename "inactive limit" to "idle limit". Add support in GTK+ client and preliminary support to Qt client 2010-07-24 02:57:39 +00:00
Mitchell Livingston fd0dd10419 First go at #2560 "inactive seeding time limit". libtransmission and Mac support are currently implemented. 2010-07-16 03:12:57 +00:00
Charles Kerr cdcc4705aa (trunk) #3045 "make libtransmission's API byte-oriented instead of KiB-oriented." -- implemented. This is a largish commit and will break the mac build for a little while. 2010-07-03 00:25:22 +00:00
Charles Kerr 3682466488 (trunk libT) #3136 "slashes in magnet names" -- fixed in trunk for 2.00 2010-04-20 23:14:00 +00:00
Charles Kerr 546bca723b (trunk libT) #3159 "better decision-making when choosing which peers to initiate new connections with" -- experimental commit 2010-04-20 21:54:03 +00:00
Charles Kerr 83f97a35fe (trunk libt) #3004 "Transmission doesn't report to the user errors when saving settings files" -- committed Longinus00's patch to trunk for 2.00 2010-03-22 00:55:43 +00:00
Charles Kerr fe3d9ed95a (trunk) one of the least interesting commits ever: remove trailing spaces from source code lines... 2010-03-17 17:07:40 +00:00
Charles Kerr 4917cd119b (trunk libT) #3051 "faster startup by adding 'have all' idiom to .resume files" -- implemented in trunk for 2.00 2010-03-15 23:29:56 +00:00
Charles Kerr 36d97610bd (trunk) #2802, #2716, #2717 -- remember magnet links and their settings between sessions, and allow their trackers to be modified 2010-02-02 22:45:22 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +00:00
Charles Kerr 3e2269e5e3 (trunk libT) #2632 "Add streaming capability to libtransmission (but not the Transmission GUI clients)" -- revert this feature due to pushback from devs and users and the 1.80 freeze 2009-12-24 18:01:48 +00:00
Charles Kerr 12ffdb7d87 (trunk libT) #2632 "Add streaming capability to libtransmission (but not the Transmission GUI clients)" -- implemented 2009-12-24 01:02:54 +00:00
Charles Kerr d6f7df8c9a (trunk libT) #2508 "atom->port never updated" -- (1) fix r9434 bug that used the wrong byte ordering scheme for port numbers. This is why most of the .resume file's peers are worthless in betas 1 and 2. :( (2) in the resume file, change the dictionary key for peers so that the worthless peers won't be reloaded on startup in beta 3. 2009-12-16 00:45:18 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Charles Kerr 1101f6710e (trunk libT) #2430 "Peer atom pool grows too large" -- add an atom expiration system along the lines of the suggestions in this ticket's comments. jch and KyleK, let me know if you think anything in this commit needs improvement. 2009-11-26 05:13:58 +00:00
Charles Kerr 22f7a64aa2 (trunk libT) #2575: PEX is not meant to do forwarding 2009-11-20 07:47:31 +00:00
Charles Kerr 05c77cc975 (trunk) #1483: move completed torrents to a user-specified directory + #629: different file extension for incomplete files 2009-10-19 05:05:00 +00:00
Charles Kerr d08ab9e510 (trunk libT) #2429: add some more assertions to help smoke out this bug 2009-09-28 18:22:57 +00:00
Charles Kerr 034d14639a (trunk libT) use tr_torrentName() instead of tor->info.name 2009-09-17 03:24:35 +00:00
Charles Kerr fb83a0464e (trunk libT) #2395: caching too many peers between sessions makes startup slow and uses too much memory (KyleK, stdisease, et al) 2009-09-10 02:20:35 +00:00
Charles Kerr 30bc1c6e7a (trunk libT) revision to r8910 for #2162: check to see if a field's value has actually changed before setting the "dirty" flag. 2009-08-14 14:41:59 +00:00
Charles Kerr cb79214854 (trunk) remove trailing spaces 2009-08-10 20:04:08 +00:00
Charles Kerr 24bb159bfe (trunk libT) #2137: .resume file gets saved too frequently 2009-08-07 05:29:37 +00:00
Charles Kerr 24746cff7f (trunk libT) minor #include futzing 2009-07-01 14:58:57 +00:00
Charles Kerr dbc9c0fb7d (trunk libT) tweak benc dict preallocation in resume.c as suggested by Elbandi 2009-06-17 22:07:16 +00:00
Charles Kerr 9238fb0299 (trunk) #2131: clean up benc read/write API 2009-06-02 01:48:48 +00:00
Charles Kerr 03fa0b3e7d (trunk) experimental support for tr_torrentSetPriority() 2009-04-18 23:17:30 +00:00
Charles Kerr 730dd0ec20 (trunk) fix oops 2009-03-29 23:13:46 +00:00
Charles Kerr f4557fab8e (trunk) use tr_bencDict{Find,Add}Bool() where appropriate 2009-03-29 23:05:32 +00:00
Charles Kerr f1d92708e7 (trunk) more speedlimit work 2009-03-28 16:47:01 +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 3f9a1d090b (trunk) #1787: add support for seeding ratio limiting in libtransmission 2009-02-13 18:23:56 +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 bb8451344f (trunk libT) #1592: file priorities are not preserved after exiting & starting a new session 2009-01-12 18:02:28 +00:00
Charles Kerr fe816d8135 (trunk) update the GPL code's copyright dates 2009-01-10 23:09:07 +00:00
Charles Kerr fd26f21400 (trunk libT) fix a minor memory leak reported by Valgrind 2009-01-05 18:18:13 +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 dfcc9173e5 (trunk libT) #include "session.h" cleanup from wereHamster 2008-12-23 17:27:15 +00:00
Charles Kerr 9594112d27 updated email address 2008-12-16 00:20:44 +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 181b9ed905 (libT) extra assertions and safeguards for #1523: crash in tr_fdFileCheckout() when starting daemon 2008-12-03 01:25:45 +00:00
Charles Kerr 0d5fed6442 (libT) re-apply jhujhiti's IPv6 patch. This merges in my tr_port cleanup, so any new bugs are mine :/ 2008-12-02 03:41:58 +00:00
Charles Kerr 7fa9813955 (libT) #252: revert r7195 (jhujhiti's IPv6 test patch). It seems to be the culprit in a `thrashing' issue reported by Waldorf and m1b in irc -- the behavior appeared between r7183 and r7187 -- so this commit is to trigger off a nightly build w/o the patch to test with in irc. 2008-12-01 20:21:06 +00:00
Charles Kerr a2ad4f6543 (libT) patch from jhujhiti to add ipv6 support. 2008-11-30 00:47:18 +00:00
Charles Kerr 5178988964 (libT) eliminating tr_errno, part 3: don't use it in tr_cpBlockBitfieldSet() 2008-10-02 23:37:58 +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 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
Charles Kerr 9eb2f15fff allocate torrent/resume filenames on the heap instead of the stack 2008-08-20 19:00:52 +00:00
Charles Kerr 3b7499a79b make tr_bencDictFindType() private. 2008-08-20 18:42:45 +00:00
Charles Kerr 2f239319b0 add a portability wrapper ``tr_snprintf()'' around snprintf() 2008-07-15 17:16:57 +00:00
Charles Kerr c8d339c9ee (libT) #319: periodically save the .resume file in case of crash 2008-07-02 01:46:10 +00:00
Charles Kerr e212eeceb7 add first draft of tr_bitfieldFindTrue() courtesy of erdgeist 2008-06-07 14:41:31 +00:00
Charles Kerr 041561f232 minor refactoring of tr_bitfield to (a) simplify the tests and (b) make things easier to read 2008-06-07 01:44:54 +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 f61205e708 fix svn id property 2008-05-28 17:17:12 +00:00
Charles Kerr 2c79888a93 RPC/IPC redesign 2008-05-18 16:44:30 +00:00
Charles Kerr be9427931a ipc: add session accessor/mutators.
transmission.h: make the session API more consistent.
2008-05-12 16:33:17 +00:00
Charles Kerr 1b901ca9df minor tweaks: dead code removal, make functions static, etc 2008-04-22 20:51:15 +00:00
Charles Kerr b483b30889 minor code cleanup: remove dead code, const-correctness, etc 2008-04-18 23:17:40 +00:00
Charles Kerr c88aa6135d benc cleanup 2008-04-18 16:23:59 +00:00
Charles Kerr 2d360434eb handle manditory/fallback ctor settings in the bencoded resume filfes 2008-04-18 12:47:13 +00:00
Charles Kerr 87a77ea331 more hacking on the bencoded resume files 2008-04-15 17:00:44 +00:00
Charles Kerr 1aec1e1392 maybe fix the losing-progress bug in the new bencoded resume. fix a couple of log messages too. 2008-04-15 13:27:28 +00:00
Charles Kerr c0c0842754 minor resume tweak 2008-04-14 20:41:45 +00:00
Charles Kerr 35502f0559 add more debugging messages for loading progress from the bencoded resume file 2008-04-14 20:30:43 +00:00
Charles Kerr 59817732ab add more debug messages to resume's DND loader 2008-04-14 19:52:51 +00:00
Charles Kerr 1578ebc904 get DND working in the benc resume files 2008-04-14 15:17:16 +00:00
Charles Kerr e4f6b9592d get tr_ctorSetMetainfoFromHash() working again. 2008-04-14 14:39:13 +00:00
Charles Kerr afde752dc0 'resume' cleanup 2008-04-14 11:52:50 +00:00
Charles Kerr a08ef82039 delete the old resume file after migrating to the new format 2008-04-14 03:12:24 +00:00
Charles Kerr 4843187f6c #394: resume files should use original name instead of hash name 2008-04-13 22:31:07 +00:00
Charles Kerr c8c84d6bd1 #872: crash in bitfield code when loading resume files 2008-04-13 14:29:11 +00:00