1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-23 22:50:41 +00:00
Commit graph

4247 commits

Author SHA1 Message Date
Jordan Lee
104d4aa772 don't inline functions that can't be inlined. 2012-12-13 02:00:45 +00:00
Jordan Lee
d74c7e93c8 copyediting: indentation cleanup 2012-12-13 01:47:40 +00:00
Jordan Lee
e2f1d6744e fix another pair of #5168 oopses (oopsii?) 2012-12-12 21:19:25 +00:00
Jordan Lee
399c3233b7 remove a couple of unnecessary torrentIsLocked() assertions for #5168 2012-12-12 20:57:13 +00:00
Jordan Lee
079c78981c (trunk) #5168 'make libtransmission's public funcs nonblocking when possible' -- first attempt. 2012-12-12 20:22:57 +00:00
Jordan Lee
84f2cf8fa2 in bencode.c's makeroom(), make the containers' sizes scale in powers of 2 to avoid excess reallocs. 2012-12-11 05:23:48 +00:00
Jordan Lee
bbc009bb0f in libtransmission's unit tests, add a convenience check macro for comparing pointer equality 2012-12-10 01:24:50 +00:00
Jordan Lee
46b3b79e63 in metainfo.c, don't include sys/stat.h anymore, it's unneeded after r13633 2012-12-09 22:05:31 +00:00
Jordan Lee
5766f6fb4d in bencode.c's makeroom(), clarify the entry assertions 2012-12-09 21:45:30 +00:00
Jordan Lee
dd643537ae in bencode.c's tr_bencMergeDicts(), call tr_bencDictReserve() so the target dict only has to alloc once to hold all of the source dict's entries. 2012-12-09 21:36:51 +00:00
Jordan Lee
9ddd7e0166 preallocate a couple of dictionaries to the right size before using them. 2012-12-09 21:28:20 +00:00
Jordan Lee
0846d3f2ab in bitfield.c, speed up countArray() by about 15% 2012-12-09 19:08:06 +00:00
Jordan Lee
3d5b43b5b4 in bitfield.c's countRange() function, make walk_end an invariant 2012-12-09 18:24:57 +00:00
Jordan Lee
8a2061f2cf move bitfield tests to their own file 2012-12-09 05:32:52 +00:00
Jordan Lee
4f6dcc6d31 in tr_metainfoRemoveSaved(), don't look for .torrent files under our old naming scheme... we haven't used it since 2008 2012-12-09 01:32:25 +00:00
Jordan Lee
410fa7e054 remove unused function tr_metainfoMigrate() 2012-12-09 01:27:01 +00:00
Jordan Lee
a2d2a10226 (trunk, libT) #5165: fix r13625 oops 2012-12-07 01:53:31 +00:00
Jordan Lee
cff58b1904 (trunk, libT) #5163 'typo in tr_peerIoSupportsUTP()' -- fixed. 2012-12-06 15:04:52 +00:00
Jordan Lee
519feefcb4 (trunk, libT) #5157 -- fix r13628 oops 2012-12-06 00:50:40 +00:00
Jordan Lee
61c1f7efec (trunk, libT) #5157 'check valid address before UTP_Create()' -- added. 2012-12-05 23:48:00 +00:00
Jordan Lee
ccb4a16ab8 (trunk, libT) #5146 'seeding complete callback called twice' -- fixed with patch from x190. 2012-12-05 22:56:45 +00:00
Jordan Lee
3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee
7af02f7cdf (trunk, libT) #5150 'improper escaping of dirnames with new json' -- add one-liner fix. this also fixes the regression test added in the previous commit. 2012-11-27 23:24:37 +00:00
Jordan Lee
dffc6343ae (trunk, libT) #5150 'improper escaping of dirnames with new json' -- added new regression test, currently failing, to trigger this bug 2012-11-27 23:21:13 +00:00
Mitchell Livingston
b1309bc927 #5144 add BitZilla to clients list 2012-11-24 01:14:51 +00:00
Mitchell Livingston
6bebaee639 #5134 Magnet links not adding all trackers with tr.0= 2012-11-14 02:22:55 +00:00
Jordan Lee
d010e33c32 (trunk, libT) #4886 'IPv6-only DHT.dat not being written' -- fixed. bug found & patched by jch. 2012-11-11 14:42:14 +00:00
Mitchell Livingston
3836821a95 fix a parameter type mismatch in jsonsl 2012-11-11 07:11:13 +00:00
Jordan Lee
9effd65f3e (trunk libT) #5131: replace JSON_parser with jsonsl to resolve licensing issue. 2012-11-11 04:26:56 +00:00
Jordan Lee
d2ef01bc1a add more unit tests for the json-benc glue code 2012-11-11 04:20:15 +00:00
Mitchell Livingston
8cb08e2766 fix typo in r13604 2012-10-31 21:27:07 +00:00
Mitchell Livingston
d73ca434c0 #5113 Add pbTorrent to client list 2012-10-31 21:25:23 +00:00
Mitchell Livingston
413f3dc532 #5111 Add Zona to client list 2012-10-31 21:22:23 +00:00
Mitchell Livingston
ff83b4ee56 #5104 Unknown client -MG21r0- 2012-10-25 03:22:41 +00:00
Jordan Lee
a981f4b6a6 (trunk, libT) #5097 'Rare buffer overflow (piece index too big)' -- fixed. 2012-10-20 15:57:56 +00:00
Jordan Lee
e5304a8aaa make tr_mkdir() private. 2012-10-16 03:13:05 +00:00
Jordan Lee
bb49ab9a01 in torrent-magnet.c and utils.h, use tr_torrentName() instead of tor->info.name 2012-10-16 02:48:26 +00:00
Jordan Lee
8fb80f5132 (trunk, libT) #4638 "Transmission sends an initial 'stopped' event when adding a torrent via RPC" -- fixed. 2012-10-15 03:11:16 +00:00
Jordan Lee
1dafe0beef more unit test cleanup 2012-10-14 23:38:52 +00:00
Jordan Lee
17beba3502 retrofit some of the tests to use the more expressive test API 2012-10-14 18:56:37 +00:00
Jordan Lee
031e313aa2 (trunk, libT) #5081 'Transmission discards webseed URLs that have trailing whitespace' -- fixed. Unit test passes and valgrind says 'All heap blocks were freed -- no leaks are possible' 2012-10-14 18:10:17 +00:00
Jordan Lee
0630583637 (trunk, libT) #5081 'Transmission discards webseed URLs that have trailing whitespace' -- add unit test (currently failing) for this bug. 2012-10-14 18:02:47 +00:00
Jordan Lee
e89fcc9bf6 previous commit uncovered an unused shadow variable in test-peer-id.c 2012-10-14 18:00:29 +00:00
Jordan Lee
a683ad49a8 steal some ideas about unit test error logging from Google Test 2012-10-14 17:59:24 +00:00
Jordan Lee
e1e254d8c2 fix NULL-pointer-dereference regression introduced in r13546 for #5069. 2012-10-13 17:32:23 +00:00
Jordan Lee
718da0688f (trunk libT) fix webseed-in-magnet-link regression introduced in r13547 (2.71+). This issue was tracked down by by x190 in ticket #5081 2012-10-13 15:36:49 +00:00
Jordan Lee
ebd4b5e386 (trunk, libT) #5063 'remaining time unknown with magnets that have webseeds' -- fixed. 2012-10-05 22:04:08 +00:00
Jordan Lee
1aa4286fbc (trunk, libT) #5069 'webseed magnet support is broken' reported & patch by cfpp2p 2012-10-05 16:44:36 +00:00
Jordan Lee
cc51b1586c (trunk libT) #5075 'magnet.c:163 should use MAX_WEBSEEDS, not MAX_TRACKERS' ... fixed. Thanks to cfpp2p for catching this. 2012-10-05 16:10:12 +00:00
Jordan Lee
b437b28228 (trunk, libT) #5049: fix bug that caused some incoming encrypted peer connections to fail 2012-09-25 02:07:03 +00:00
Jordan Lee
624c8ff1cc (trunk, libt) #4932 'crash on magnet links' -- fixed. 2012-09-19 05:11:19 +00:00
Mitchell Livingston
8e5a62ed40 add a missing @ to a comment 2012-09-18 03:46:01 +00:00
Mitchell Livingston
40e75b20ed return a value (and rename) testTurtleTime instead of passing in a flag to set 2012-09-18 03:44:59 +00:00
Mitchell Livingston
ddabdcb1c7 remove a comment referring to a non-existant param 2012-09-18 01:13:31 +00:00
Mitchell Livingston
e46309a0fa #4201 Automatic limit can't be stopped 2012-09-18 00:58:10 +00:00
Jordan Lee
357b160cde remove trailing spaces 2012-09-07 04:25:04 +00:00
Mitchell Livingston
723d681b63 Whoops! Revert new changes committed in r13469 2012-09-06 03:23:50 +00:00
Mitchell Livingston
9e7e64fe04 Revert r13468 for now. 2012-09-06 03:21:03 +00:00
Mitchell Livingston
3961a7e4f4 #4321 uTP implementation is very slow. 2012-09-05 11:39:57 +00:00
Jordan Lee
74c56f27b0 (trunk, libtransmission) #4934 "Create a test harness and use it for current tests" -- patch by gvdl 2012-08-18 16:07:05 +00:00
Jordan Lee
4963b65c1f (trunk utils) #4979 "add manget link generator to transmission-show" -- done. 2012-07-23 15:28:27 +00:00
Jordan Lee
9b98c0fc2e (trunk libT) #4969 "jsonrpc response to torrent-get emits malformed json" -- fixed. 2012-07-14 19:34:38 +00:00
Jordan Lee
5c34257ee0 (trunk libT) #4943 "tr_sessionClearStats() does not set the stats' dirty flag to true s.t. stats.json gets saved" 2012-07-01 04:00:27 +00:00
Jordan Lee
f55ab8dddb (trunk libT) move torrent.c's private function fileExists() to the utility function tr_fileExists() so that it can also be used by stats.c 2012-07-01 03:05:36 +00:00
Jordan Lee
3398a48e57 (trunk libT) #4402 "Transmission Bandwidth allocation getting overflows" -- use gvdl's patch '4402-uint-bpsoverflow.patch' 2012-07-01 02:17:35 +00:00
Jordan Lee
99b615b3b8 (trunk libT) #4931 "Wrong peer percentages for magnetized transfers" -- fixed.
tr_peerUpdateProgress() is guessing at the progress size, but when we don't have the data size yet that guess isn't very good. Add boundary
 clamps on the peer.progress field.
2012-07-01 02:00:02 +00:00
Jordan Lee
df80c1ce03 Fix the size for the peers and peersFrom dictionaries.
By setting the initial allocation size correctly, we can avoid unnecessary resizing when adding all the dictionary's fields.
2012-07-01 01:42:58 +00:00
Jordan Lee
d717248e75 (trunk libT) fix the Linux build wrt compiling with the new snapshot of libutp checked into r13317
Previously we made sure to include stdbool.h (via transmission.h) before utp.h, since the latter used 'bool' without defining it. The new snapshot defines it unconditionally in non-C++ code, so now we need to include it first.
2012-05-30 17:47:29 +00:00
Jordan Lee
f226d8a03f (trunk libT) #4914 if a tracker has no scrape URL but the announce response contains any scrape fields, that's as close to a scrape as we're going to get, so use those fields. 2012-05-22 20:21:00 +00:00
Jordan Lee
1e07439cd0 (trunk libT) #4908 "Handle UDP scrapes when they don't follow the /announce idiom" -- fixed. 2012-05-20 14:47:18 +00:00
Jordan Lee
e9e76fa970 (trunk libT) #4888: when scraping magnet links, don't send a left=0 argument to the tracker. 2012-05-20 14:14:59 +00:00
Jordan Lee
512cc1af73 silence an unused-variable compiler warning introduced in the previous commit 2012-05-17 22:22:30 +00:00
Jordan Lee
6948852013 (trunk libT) #4894 -- don't use evbuffer_add_printf() and evbuffer_pullup() together. 2012-05-17 17:40:31 +00:00
Jordan Lee
00919e932d silence a compiler warning of implicitly casting the 3rd arg of initnatpmp() from a void* to an int 2012-04-07 00:12:57 +00:00
Mitchell Livingston
bbf274109a #4825 update libnatpmp to libnatpmp-20110808 2012-03-21 02:51:26 +00:00
Jordan Lee
a025510834 (trunk libT) #4810 "add environment variable option to have libcurl verify SSL certs" -- patch by infinity0 2012-03-04 13:21:42 +00:00
Jordan Lee
ecfab318ed (trunk libT) fix potential NULL pointer dereference in rpc-server.c's crude mime multipart parser 2012-02-15 01:44:21 +00:00
Jordan Lee
43f7dc4c17 (trunk libT) fix minor memory leak of the 'dir' string when deleting local data. (Thanks, valgrind!) 2012-02-04 03:09:31 +00:00
Jordan Lee
6d4858d8dd (trunk) #4732 "allow switching between internal and system libnatpmp" -- fixed with patch scarabeus and applied by me, so any patch breakage is probably mine... ;) 2012-02-04 01:28:15 +00:00
Jordan Lee
c56b12690c (trunk libT) #4687 "magnet links behave oddly" -- fixed. Thanks to cfpp2p for some very nice sleuthing on this one. 2012-02-04 00:34:39 +00:00
Jordan Lee
b2d65db45f (trunk) remove trailing spaces from code lines ;) 2012-02-03 16:44:07 +00:00
Mitchell Livingston
3eb8b12fa8 #4704 req->left = tr_cpLeftUntilComplete( &tor->completion ) should end with a semicolon 2012-01-11 22:31:02 +00:00
Jordan Lee
57d273cd61 (trunk libT) #4700 "compilation fails on FreeBSD because it can't find alloca.h" -- fixed. 2012-01-10 19:18:18 +00:00
Jordan Lee
cac5c360f2 (trunk libT) #4690 "getPeerCandidates() uses more CPU than necessary" -- fixed.
Once we've scored all n candidates, we sort them by score so that we can pick out the k best candidates. If n is large, sorting them can be expensive. If we use the Selection Algorithm, we select in O(n) without having to sort.
2011-12-31 21:28:53 +00:00
Jordan Lee
a8468a7b09 (trunk libT) #4684 "tr_cpSizeWhenDone() is slow for huge torrents that we're only partially downloading" -- fixed.
There are actually two different implementations of the byte-counting in that function: a slower implementation was added prior to 2.40 in r12918 to double-check the standard implementation. This checking was added to help smoke out a bug that was fixed in r12920, but I forgot to remove that slower implementation.
2011-12-22 19:35:13 +00:00
Jordan Lee
9576dd16e2 (trunk libT) #4666 "webseed downloading never gets downloaded" -- fixed.
The webseed in question is downloading from an ubuntuone.com url. We ask for piece-sized ranges in a couple of different concurrent connections, and curl hints to the server that it's okay to gzip the response, or deflate it, or leave it raw. It looks like there's a bug in the server or in libcurl (or, somehow, Transmission) that's not compressing or decompressing these responses correctly -- we never get the right number of bytes in the response from libcurl. If we ask for the contents uncompressed, the download progresses towards completion.

As an aside, when testing this I noticed that deluge is a lot faster than Transmission on this torrent. In order for Transmission to reach parity here, webseed.c needs to know when it's appropriate to have more than 4 concurrent tasks and/or be able to request ranges > the torrent's piece size.
2011-12-14 05:58:23 +00:00
Jordan Lee
f9cc51f0d3 (trunk libT) fix a minor memory leak in the bencode regression tests.
Found by llvm's static analyzer. This is a minor issue since the leak is in an automated test rather than in shipping code, but it's still better to fix it.
2011-12-14 05:44:15 +00:00
Jordan Lee
0d13057111 (trunk libT) fix warnings in fileset_get_empty_slot() found by llvm's static-build analyzer.
static-build found a potential NULL pointer dereference. The circumstances where this could get triggered don't seem very likely, but doesn't hurt to fix the warning.
2011-12-14 05:42:15 +00:00
Jordan Lee
206b1a9a5f (trunk web) fix warnings in tr_urlIsValidTracker() and tr_urlIsValid() found by llvm's scan-build.
scan-build found similar warnings in these two functions relating to allowing NULL pointers to be passed as arguments to functions that don't allow NULL. So now those NULL checks are made explicit before the function calls.
2011-12-14 05:40:21 +00:00
Jordan Lee
1cfeb4debb (trunk libT) #4644 "Transmission can't download big files from webseed." -- fix overflow error with a patch based on one from and_cesbo. (Modified by Jordan to add random bugs.) 2011-12-10 18:42:52 +00:00
Mitchell Livingston
0a9b47da50 whoops typo 2011-11-22 03:30:37 +00:00
Mitchell Livingston
caa1c8fb8f #4643 Support µTorrent's long-version-number peer id 2011-11-22 03:02:18 +00:00
Jordan Lee
42997e4102 don't use the word 'template' as a variable name, since it's a reserved word in C++ 2011-11-12 00:16:04 +00:00
Jordan Lee
b3d382874a (trunk libT) #4625 "Transmission 2.42 fails to build on Solaris 10: Undefined symbol 'mkdtemp'" -- fixed. 2011-11-10 03:31:43 +00:00
Jordan Lee
4f1db26672 (trunk libT) bandwidth.c: minor phaseOne() improvements suggested by livings 2011-10-25 21:54:51 +00:00
Jordan Lee
82595e8ad8 (trunk libT) #4592 "Algorithm bug in bandwidth allocation" -- apply patch from Algorithmus 2011-10-25 16:56:19 +00:00
Jordan Lee
ae972b50c4 utils.h's public function tr_realpath() function relies on the private constant TR_MAX_PATH. Make TR_MAX_PATH public. 2011-10-25 15:57:10 +00:00
Jordan Lee
4d74095591 (trunk libT) #4571 "can't edit UDP trackers via RPC" -- fixed. 2011-10-17 12:44:17 +00:00
Jordan Lee
ed56cd1193 (trunk libT) #4526 "do not skip scrape unless all three scrape fields came with announce" -- add field initializers. 2011-10-14 00:27:14 +00:00
Jordan Lee
9c6e686882 (trunk libT) #4556 "Transmission 2.40 fails to connect with UDP trackers on big endian systems" -- fixed. 2011-10-14 00:02:36 +00:00
Jordan Lee
576ded51d0 (trunk libT) #4323 "allow usage of system miniupnpc" -- possibly fix OS X regression caused by r12957 2011-10-09 14:51:13 +00:00
Jordan Lee
01f68ca846 (trunk libT) #4323 "Allow usage of system miniupnpc" -- fixed. 2011-10-09 02:05:52 +00:00
Jordan Lee
c9421c4041 (trunk libT) #4530 "lastAnnounceResult is not properly set" -- fixed. 2011-10-09 00:21:36 +00:00
Jordan Lee
bc4e3f137c (trunk libT) #4526 "do not skip scrape unless all three scrape fields came with announce" -- fixed. 2011-10-09 00:18:18 +00:00
Jordan Lee
2786136015 (trunk) #4490 "Transmission 2.40b1 fails to build: undefined references" -- fixed. 2011-10-08 23:53:27 +00:00
Mitchell Livingston
0808bdd2fe We now require Mac OS X 10.6 or later. Make that change and all the nice little adjustments that go with it. 2011-10-06 00:30:40 +00:00
Jordan Lee
0337806b03 #4506 'crash from memory corruption somewhere called from tr_handshakeDone()' -- possible fix. 2011-09-28 16:07:35 +00:00
Jordan Lee
1aefd9f1de munge tr_torrent's memory immediately before freeing it. 2011-09-28 16:06:19 +00:00
Mitchell Livingston
eb46c13d74 #4524 Redirects with https are broken 2011-09-27 22:34:52 +00:00
Jordan Lee
16de40c78d remove redundant assertion 2011-09-27 02:44:07 +00:00
Jordan Lee
18b90f60bc (trunk libt) in tr_bitfieldSetRaw(), add a `bounded' argument for cases where we know how large the final bitfield will be. This can be used ensure that the excess bits at the end of the array are zeroed out and safe for bitfield.c's countArray() function. 2011-09-26 22:50:42 +00:00
Jordan Lee
bf6c2a0df7 peer.have was being initialized to the block count, rather than the piece count, resulting in wasted overhead. 2011-09-26 22:48:50 +00:00
Jordan Lee
0c4fe00658 (trunk libT) #4511 "fromLpd in rpc" -- add to torrent-get's "peersFrom" response. 2011-09-26 20:49:26 +00:00
Jordan Lee
4857e8ebb1 (trunk libT) add several more tr_completion assertions to smoke out the (sizeWhenDone() < sizeNow()) error reported in the forums 2011-09-26 06:18:48 +00:00
Jordan Lee
0fde2ddc8e in freeTorrent(), don't destruct the torrent's completion field until after calling tr_announceRemoveTorrent() 2011-09-26 05:57:03 +00:00
Jordan Lee
5332d234bb (trunk libT) #4504 "crash when adding malformed magnet link" -- fixed. 2011-09-25 21:51:50 +00:00
Jordan Lee
4522a3c055 (trunk libT) #4507 "scrape min_request_interval no longer working" -- fixed. 2011-09-25 21:48:34 +00:00
Jordan Lee
246d6a72a3 (trunk libT) #4502 "allow verbose scrape" -- patch by reardon. 2011-09-24 05:54:47 +00:00
Jordan Lee
daa795fb6a #4496 'freeze when having a huge torrent' -- more tweaks based on Shark reports from MechMK1 2011-09-21 23:04:39 +00:00
Jordan Lee
6f05024dab #4496 'freeze when having a huge torrent' -- remove redundant debug calls to countArray(). This is a second iteration of optimizations based on MechMK1's Shark report. 2011-09-21 20:17:36 +00:00
Jordan Lee
3a3cef615c #4344 'zero peers observed with 2.32' -- experimental change suggested by gunzip 2011-09-21 00:20:02 +00:00
Jordan Lee
0560b14cfe #4496 'freeze when having a huge torrent' -- add a bitfield helper function to init the bitfield from an array of flags. 2011-09-20 23:39:40 +00:00
Jordan Lee
46154e7309 (trunk libT) add a magnet link check to deleteLocalData(). Thanks to plaes for reporting this issue. 2011-09-16 23:08:35 +00:00
Jordan Lee
e2240e0831 (trunk libT) #4473 'underflow from malformed ssha1 can crash tr_ssha1_matches()' -- bah, fix oops in r12884. 2011-09-16 22:55:58 +00:00
Jordan Lee
bb59768557 (trunk libT) #4473 "underflow from malformed ssha1 can crash tr_ssha1_matches()" -- fixed. Thanks to Volfram for finding this crash and tracking down the cause. 2011-09-16 22:53:26 +00:00
Jordan Lee
6add3fb940 (trunk web) small refactoring of webseed's batch processing.
1. move the callback structs' declarations next to the callback functions where they're used.
2. rename the callback structs to clarify their link to the callback functions.
3. constify some of the callback functions' local variables.
4. clarify some of the comments.
2011-09-12 21:46:15 +00:00
Jordan Lee
3a39486cf1 tr_free() already checks for null, so no need for the caller to wrap it in an 'if not null' test 2011-09-12 20:41:28 +00:00
Jordan Lee
10734ab7bc remove two redundant variables from tr_webseed_task 2011-09-12 20:40:09 +00:00
Jordan Lee
fd6e7a7fbd (trunk libT) #4445 "transmission only downloads partially from webseeds with redirections" -- fixed with patch from alexat. 2011-09-12 05:39:27 +00:00
Jordan Lee
cfa4077e5e (trunk libT) #4437 "Multi file webseeds don't work" -- handle multifile torrents with web seed urls that incorrectly don't end with a slash. 2011-09-06 16:45:48 +00:00
Jordan Lee
b3db349c83 (trunk libt) #4437 'multi file webseeds do not work' -- revert r12740, which was a bad patch. 2011-09-06 16:10:27 +00:00
Mitchell Livingston
516164e78e add an RPC session callback for when queue order changes 2011-08-27 23:54:10 +00:00
Jordan Lee
6c61d6ac67 (trunk libT) #4437 "Multi file webseeds don't work" -- fixed. 2011-08-25 09:08:50 +00:00
Jordan Lee
56e47e96d0 (trunk libT) improve the is_same_file() test in deleteLocalData() to handle nonexistent directories too. 2011-08-20 18:41:45 +00:00
Jordan Lee
a14e72b1f7 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- fix r12665-r12667 regression reported by KyleK in comment:31 2011-08-16 22:42:43 +00:00
Mitchell Livingston
fbfae34837 #4422 On Mac, tr_getWebClientDir() uses incorrect encoding for creating the web content dir path 2011-08-15 00:10:06 +00:00
Jordan Lee
177f2398a5 (trunk libT) #4396 "Scrape requests not showing in logfile" -- when the announce response contains scrape information, add a log message saying that the next scrape has been rescheduled. 2011-08-14 14:45:54 +00:00
Jordan Lee
ecb2054493 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- another revision to r12665 2011-08-12 01:56:35 +00:00
Jordan Lee
6d36b3d763 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- minor revision to r12665 to fix a minor memory leak with the 'subpath' string. 2011-08-11 21:02:15 +00:00
Jordan Lee
d9541de52d (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- possible fix. 2011-08-11 14:16:29 +00:00
Jordan Lee
3778da6f82 remove dead code 2011-08-08 16:58:29 +00:00
Jordan Lee
ff303e6fd7 queuing: lower the default 'active downloads' value to 5 2011-08-08 16:29:47 +00:00
Jordan Lee
398b6ad8dc bump RPC_VERSION to 14 because of the queuing changes 2011-08-07 19:25:36 +00:00
Jordan Lee
313bd9e211 Add a mechanism for enabling/disabling the stalled minutes feature. This is a pre-existing feature in the Mac client. 2011-08-07 19:24:33 +00:00
Jordan Lee
fbc2eb1a65 silence a minor compiler warning when building with -DNDEBUG 2011-08-05 17:03:34 +00:00
Jordan Lee
7915b49b03 revert the last commit -- the Mac client uses the isIdle flag to know when hibernation is allowed 2011-08-04 04:31:14 +00:00
Jordan Lee
d8a11a33f1 tr_torrentIsStalled(): return false if that torrent's queue is disabled. 2011-08-04 02:25:38 +00:00
Jordan Lee
ae89e4683d add user_data (void *) to the queue callback 2011-08-03 23:40:51 +00:00
Jordan Lee
ce77935009 Add a callback to be invoked when the queue starts a torrent. 2011-08-03 03:14:57 +00:00
Jordan Lee
3430ce714c #671 "torrent queuing" -- fix r12611 oops 2011-08-02 14:03:43 +00:00
Jordan Lee
307754e807 #671 "torrent queuing" -- modify the queue implementation s.t. every torrent has a queuePosition, even if it's not currently in the queue. 2011-08-02 03:59:54 +00:00
Jordan Lee
2e9d419bd4 #671 "torrent queuing" -- add a tr_stat.isStalled flag. 2011-08-01 23:27:11 +00:00
Jordan Lee
61174b007e (trunk) #671 "torrent queuing" -- Preliminary implementation. Covers libtransmission; GTK+ and Qt clients, and rudimentary web client support. 2011-08-01 22:24:24 +00:00
Jordan Lee
56525f4b80 (trunk libT) Remove the backup implementation of tr_ptrArrayLowerBound() that was added 5 weeks ago in r12512. This was for testing in the nightlies, to use its output against the function's primary implementation. 2011-07-31 14:04:43 +00:00
Jordan Lee
60f9191fdc (trunk libT) modify announcer's scrape triggers as per discussion with Elbandi 2011-07-31 00:58:05 +00:00
Jordan Lee
0bffa36377 (trunk libT) improve the debugging message that logs an http announce response 2011-07-30 22:40:15 +00:00
Jordan Lee
8ae478a62f (trunk libT) #4395 "Crash when removing data for incomplete magnetized torrent file" -- fixed. 2011-07-30 13:11:06 +00:00
Mitchell Livingston
d7ab7d9012 #4387 Update miniupnpc to 1.6 2011-07-26 01:36:30 +00:00
Jordan Lee
b14c44a3a6 (trunk libT) during the extended handshake, don't send the "m" dict if it doesn't have any entries. 2011-07-25 22:33:07 +00:00
Jordan Lee
8fab45f0fc undo r12585, where I checked in the wrong file. 2011-07-25 22:30:56 +00:00
Juliusz Chroboczek
7eda3ae2ec Add stub for the DHT blacklisting support.
Using blacklists with Kademlia is not a good idea, which is why we
don't support it in Transmission.  However, some people insist on
implementing the support in their own copies, this well-defined
hook ensures that at least they'll do it right.
2011-07-25 21:30:46 +00:00
Jordan Lee
fe42e456b4 (trunk libT) during the extended handshake, don't send the "m" dict if it doesn't have any entries. 2011-07-25 20:46:56 +00:00
Juliusz Chroboczek
17d1210b95 Reword debugging messages for the IPv4 DHT.
The IPv6 DHT is no longer expermiental, no need for the asymmetry.
2011-07-25 19:53:39 +00:00
Jordan Lee
434a988165 (trunk libt) #4305 "New Torrent via RPC Error:No data found when subfolder does not exist" -- revert r12076 s.t. parent directories are created as necessary when saving local data to disk. 2011-07-25 17:48:14 +00:00
Jordan Lee
feb4ddadd5 (trunk libT) #4383 "transmission-create bug when using leading ./" -- fixed. 2011-07-24 20:18:33 +00:00
Jordan Lee
3928a9d8e9 (trunk libT) #3219 "Don't scrape paused torrents" -- allow this as a 'hidden' option in settings.json, but don't add it to the GUI or to RPC. 2011-07-23 17:14:12 +00:00
Jordan Lee
5076efd20e (trunk libT) "DHT and blocklists are incompatible" -- revert r12544. 2011-07-22 17:47:08 +00:00
Jordan Lee
bd6aaf9a12 (trunk libT) remove trailing spaces from a couple of lines of code 2011-07-17 18:11:34 +00:00
Jordan Lee
f8c92d06e6 (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:34:33 +00:00
Jordan Lee
dcd7bed20a (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:33:20 +00:00
Jordan Lee
b4960a3f29 (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:32:51 +00:00
Jordan Lee
efc306a8d3 (trunk libT) truncate the fractions when formatting KB/s speeds 2011-07-17 14:15:02 +00:00
Jordan Lee
de34a0545b (trunk libT) minor #include cleanups 2011-07-13 03:23:37 +00:00
Jordan Lee
a4e095b26f (trunk libT) #4016 "blocklists loaded in Transmission should be used to filter DHT communication." -- fixed. 2011-07-12 12:30:17 +00:00
Jordan Lee
7b71470ea0 (trunk libT) #4351 "DHT can't be uninitialized during a session" -- don't process incoming DHT messages if DHT is disabled. Don't process incoming UTP messages if UTP is disabled. 2011-07-12 12:26:24 +00:00
Jordan Lee
731ee3640c (trunk libT) remove unnecessary "UNUSED" attribute 2011-07-12 12:24:41 +00:00
Jordan Lee
2c69c42554 (trunk libT) restore setrlimit(), although in an non-configurable mode. 2011-07-11 20:48:06 +00:00
Jordan Lee
9b208d2777 (trunk libT) possible fix for three related tickets. still needs more testing.
#3732 "Delete system files when removing torrent data"
#4224 "Folders don't get deleted"
#3871 "torrent-set-location does not delete old folder if only one file in torrent"
2011-07-10 17:34:03 +00:00
Jordan Lee
2317f08d38 (trunk libT) #4338 "improved webseed support" -- patch by alexat 2011-07-10 15:24:51 +00:00
Jordan Lee
fdec244f04 (trunk libT) #4336 "availablility nonsense" -- fix bug in tr_cpMissingBytesInPiece() introduced last week by r12515 for #4332. Add assertions to the nightly build to watch for regressions of this fix.
The bug was that I fixed #4332's off-by-one improperly in tr_cpMissingBlocksInPiece(). The piece's last block has to be calculated separately because its byte size may be different than the other blocks, The mistake in r12515 was that the last block could wind up being counted twice.
2011-07-02 13:20:17 +00:00
Jordan Lee
23adb55d2e (trunk libT) #4101 "RPC method blocklist-update is broken" -- use lower-level zlib API calls so that we can skip writing a temporary gzipped file to disk 2011-06-26 17:05:17 +00:00
Jordan Lee
b4ffdaac42 (trunk libT) #4277 "Checkmarks for leechers" -- possible fix.
It appears 2.30 and 2.31 might be making too many assumptions about which peers are seeds.
2011-06-25 19:29:25 +00:00
Jordan Lee
34642e7259 (trukn libT) lessen the importance of error messages returned by trackers in a multi-tracker torrent. It's all too often that people will load up a .torrent file with dozens of announce URLs, many of them dead... 2011-06-25 18:47:35 +00:00
Jordan Lee
42a49a6c70 (trunk libT) #4332 "countRange/countArray exception" -- fix bug in tr_cpMissingBytesInPiece() 2011-06-25 13:31:25 +00:00
Jordan Lee
35fb00fd9e (trunk libt) #4315 "Transmission 2.31 crashes (segfaults) immediately after launch" -- remove the "max-open-files" code.
max-open-files might have been a nice configuration option once, but (1) we've never advertised it in the gui apps, and (2) the crazy cases are causing more trouble than this feature is worth. It's more complicated now after #4164 -- see #4294, #4311, and this ticket.
2011-06-24 22:39:20 +00:00
Jordan Lee
f5815a89bf (trunk libT) minor code formatting 2011-06-24 19:30:25 +00:00
Jordan Lee
2d3fdc4235 (trunk libT) the edge condition bug in ptrarray's bsearch code seems to be fixed, so let's commit the fix with lots of assert()ions enabled so that the nightly build users can show me where I'm wrong :) 2011-06-24 18:25:56 +00:00
Jordan Lee
2362580e0e (trunk libT) add a unique key to each tr_bandwidth object, so that when sorting them arbitrarily we can use that key rather than their pointer address. Apparently comparing pointers that aren't allocated in the same array is undefined behavior. 2011-06-19 18:34:10 +00:00
Jordan Lee
f134858453 (trunk libT) avoid thread issues on startup by ensuring that tr_sessionLoadTorrents() runs in the libtransmission thread. 2011-06-19 18:30:57 +00:00
Jordan Lee
bcf89fa9c3 (trunk libT) modify how the "stops" sorted container is used s.t. the container's uniqueness requirements are met. 2011-06-19 18:26:04 +00:00
Jordan Lee
437ebe32c7 (trunk libT) don't use tr_list for the tr_web_task queue 2011-06-19 18:18:48 +00:00
Mitchell Livingston
62f594267a #4326 flags for completeness and wasRunning flipped in completeness callback 2011-06-19 03:31:41 +00:00
Mitchell Livingston
0a5d025568 add µTorrent Embedded to the client list 2011-06-16 12:08:52 +00:00
Jordan Lee
f6d68844bd (trunk libT) #4101 "RPC method blocklist-update is broken" -- add debugging error messages for cases where gzopen/gzread fails 2011-06-10 05:34:16 +00:00
Jordan Lee
0aa163dfe9 (trunk libT) #4295 "'download-dir-free-space' contains garbage" -- fixed by bugmenot patch 2011-05-30 18:17:16 +00:00
Jordan Lee
3f6ffb90c2 (trunk libt) #4301 "strerror used instead of tr_strerror -- fix in peer-io.c too 2011-05-30 15:50:50 +00:00
Jordan Lee
7f2e4084dc (trunk libT) fix webseed issue reported by Alex Hartl 2011-05-29 14:59:00 +00:00
Jordan Lee
d6e39e4d2f (trunk libT) #4284 "crash via webfrontend or transmission-remote" -- use patch from jerwied 2011-05-27 23:28:40 +00:00
Jordan Lee
dcf814a481 (trunk libT) #4283 "Remove 'Prefetch failed' error message" -- done. 2011-05-27 23:26:05 +00:00
Jordan Lee
33eb6d3f9e (trunk) #3817 remove OS proxy integration from the GTK+ client 2011-05-27 13:36:53 +00:00
Jordan Lee
eb53352d40 fix an r12447 typo -- SoMud's two-letter prefix is SM, not SO 2011-05-20 18:00:57 +00:00
Jordan Lee
c453175e0e (trunk libT) recognize a few more peer apps by name: Arctic, BitBuddy, GSTorrent, Hekate, Meerkat, SoMud, SymTorrent, TuoTu, and XSwifter 2011-05-20 17:55:48 +00:00
Jordan Lee
52512857ae (trunk libT) better r12434 2011-05-16 07:11:21 +00:00
Jordan Lee
7cd9cc0176 (trunk libT) #4237 "tarnsmission-remote -l shows torrent list in reverse order" -- revert r12424 to fix this 2011-05-16 02:09:31 +00:00
Jordan Lee
a4ab013568 (trunk libT) fix magnet link crash in peer-msgs.c's updateDesiredRequestCount() reported by quinx in the forums.
In some odd cases (such as if unchoked without having shown interest), the code could dividing a number by the torrent's block size without checking to see if the torrent had its metadata yet. This caused a division by zero because a magnet torrent's blocksize is unset until the metadata is downloaded.
2011-05-12 06:43:40 +00:00
Jordan Lee
ddaaa92c31 (trunk libT) make allocateBandwidth()'s "priority" field const. 2011-05-11 21:09:31 +00:00
Jordan Lee
d32c5b36c7 (trunk libT) minor CPU improvement to peer-mgr.c's bandwidthPulse()
We looped through all the torrents 3x to do three separate tasks... instead, loop only once and do the three tasks inside the single loop.
2011-05-10 14:41:59 +00:00
Jordan Lee
ffba6a16bd (trunk libT) oops, r12424 included a second CPU improvement patch that I had in the pipeline. Fix a typo in that patch. 2011-05-10 05:18:40 +00:00
Jordan Lee
94cc3f87f7 (trunk libT) CPU improvement in torrent.c's torrentInit()
Add the new torrent to the session's torrent list by prepending it instead of appending it. That way we don't have to walk the list in order to add it. tr_session.torrentList is an unordered list, so there's no real difference between prepending and appending.
2011-05-10 04:46:44 +00:00
Jordan Lee
3aaeaddbaf (trunk libT) CPU optimization in peer-mgr.c's rechokeDownloads()
Instead of recalculating interesting pieces for each peer we loop through, calculate them just once into a bitfield and then reuse that bitfield inside the loop.
2011-05-10 03:50:54 +00:00
Jordan Lee
0b11909854 (trunk libT) small CPU optimization in bitfield.c's countRange() 2011-05-10 03:43:06 +00:00
Jordan Lee
6a38a368d6 (trunk libT) CPU improvement in peer-mgr.c's getPeerCandidates()
getPeerCandiates() used to read through all the torrents to determine the global peer connections, and then again to determine the global peer candidates. Now this is done in one loop instead of two.
2011-05-10 01:51:12 +00:00
Jordan Lee
3c3fda5c66 (trunk libT) CPU optimization in tr_bandwidthClamp().
Don't call tr_time_msec() if it's not necessary. This was one of the top CPU sinks in profiling, so removing it is a nice improvement in cases when it's not necessary, such as when speed limiting is disabled.
2011-05-09 04:16:49 +00:00
Jordan Lee
c0e1cd8007 (trunk libT) torrent-get CPU optimization.
Move the tr_torrentStat() call outside of the addField() loop so that it's only called once instead of N times.
2011-05-09 04:13:14 +00:00
Jordan Lee
3269d99287 (trunk libT) experimental fix for the unterminated announce URLs reported by blacklion in the forums 2011-05-05 20:41:09 +00:00
Jordan Lee
45669fed08 (trunk libT) #4227 "invalid URLs aren't filtered out of .torrents' webseed lists"
If we can't parse a URL provided in the .torrent files' webseed list, that URL should be discarded.
2011-05-05 03:10:51 +00:00
Jordan Lee
f8f02fe7c3 (trunk libT) #2338 "Add uTP support" -- increase the block bandwidth to 3000 bytes in phase 1 as suggested by jch in comment:120.
The rationale is that by using 3000 bytes we'll send one full-size frame straight away, and leave enough buffered data for the next frame to go out in a timely manner.
2011-05-04 21:38:01 +00:00
Jordan Lee
f5a0276332 (trunk libT) the functions tr_peerMsgsSetChoke() and tr_peerMsgsSetInterested() have bool arguments whose types never got switched from "int" to "bool" when "bool" was adopted. 2011-05-01 19:10:34 +00:00
Jordan Lee
50ceaafeb8 (trunk libT) very minor copyediting: remove a little unwanted whitespace 2011-04-30 00:08:24 +00:00
Jordan Lee
841bfffff8 (trunk libT) simplify the code in peer-mgr.c's rechokeDownloads().
The new code has fewer calls to malloc/free and, more importantly, has less copy-and-pasted code to handle the different rechoke states.
2011-04-29 23:25:12 +00:00
Jordan Lee
92ad42e10c (trunk libT) #4215 "bug in unchoking algorithm" -- fixed. 2011-04-29 22:39:54 +00:00
Jordan Lee
513a3fcc1d (trunk libT) tr_torrentGetFileMTime(): if the file being looked at is aleady open in fdlimit's file cache, use that cached handle instead of deriving our own. 2011-04-28 18:40:46 +00:00
Jordan Lee
e514f93fd1 (trunk libT) in peer-mgr.c's refillUpkeep(), allocate the temporary array outside of the loop instead of inside... 2011-04-28 17:46:31 +00:00
Jordan Lee
1bddadf1c6 (trunk libT) #4212 "excessive UDP logfile entries in debug mode" -- fixed. 2011-04-28 02:51:07 +00:00
Jordan Lee
2ecca714f1 (trunk libT) heap pruning: use tr_bencToBuf() instead of tr_bencToStr() when building LTEP messages. This saves us from a handful of unnecessary malloc+memcpy+free calls in each instance where the change is made. 2011-04-27 21:38:45 +00:00
Jordan Lee
c061390f65 (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free in tr_bencToFile() 2011-04-27 21:33:52 +00:00
Jordan Lee
c9b54799e3 (trunk libT) tweak the ABI of tr_bencToBuf() to match the way it's being used 2011-04-27 21:22:08 +00:00
Jordan Lee
6e99c6cd69 (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when building the URL for a webseed download request 2011-04-27 20:52:07 +00:00
Jordan Lee
aa41779aaa (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when TR_CURL_VERBOSE is logging HTTP messages 2011-04-27 20:50:43 +00:00
Jordan Lee
5681ea73e2 (trunk libT) heap pruning: avoid unnecessary malloc+memcpy+frees in announcer.
1. when creating announce URLs in announcer-http.c
2. when creating scrape URLs in announcer-http.c
3. when deep-logging what announces are in a torrent's queue in announcer.c
2011-04-27 20:41:47 +00:00
Jordan Lee
2f95dd54e8 (trunk libT) heap pruning: lazy-allocate the array in peer-mgr.c's getPeersToClose(). 2011-04-27 19:06:06 +00:00
Jordan Lee
118ea87fef (trunk libT) more heap pruning: avoid an unnecessary evbuffer_new() + evbuffer_free() in tr_peerIoWriteBytes() 2011-04-27 17:52:28 +00:00
Jordan Lee
2043356876 (trunk libT) constify the tr_scrape_request argument to scrape_request_delegate(). 2011-04-27 17:30:53 +00:00
Jordan Lee
dfcc14c3d5 (trunk libT) more heap pruning: build the "cookie_filename" field once when creating the web thread, instead of each time a new tr_web_task is added. 2011-04-27 17:02:18 +00:00
Jordan Lee
4ecf0d36d1 (trunk libT) use tr_malloc() instead of malloc() in tr_loadFile() and in the fallback code for tr_valloc() 2011-04-27 16:12:17 +00:00
Jordan Lee
018b673acd (trunk libT) #4209 "Shortcut UDP tracker test" -- prioritize the UDP handler functions based on frequency (uTP, DHT, UTP tracker) as outlined by jch in comment:5. Also, don't call the uTP or DHT handlers when uTP or DHT is disabled in the system preferences.
To avoid the function call overhead described by jch, instead of calling tr_sessionIsUTPEnabled() and tr_sessionIsDHTEnabled(), we test for WITH_UTP to be defined and test the tr_session.isUTPEnabled and tr_session.isDHTEnabled flags directly.
2011-04-27 05:29:05 +00:00
Jordan Lee
ea3fe42ca3 (trunk libT) #4209 "Shortcut UDP tracker test" -- the goal of #4209 is to minimize the cost of the UDP event callback function, so apply the heap pruning eye to that by removing an unnecessary malloc/free call there.
Previously we allocated a 4096 character buffer each time; now we allocate it on the stack. It seems all the distros and OS flavors that Transmission runs on have multi-MB default stack sizes, so a hardwired 4K array should be safe.
2011-04-27 05:03:10 +00:00
Jordan Lee
0d31a32d41 (trunk libT) #4204 "Availability is the same as the amount downloaded when there are no seeders" -- possible fix
It looks like we had the wrong test on the replication count array size.
2011-04-24 22:56:42 +00:00
Juliusz Chroboczek
decbfef106 Optimise UDP dispatch (fixes #4209).
Make quick inline tests for the DHT and UDP tracker protocols, which
avoids calling tau_handle_message for each µTP packet.
2011-04-24 19:12:28 +00:00
Jordan Lee
a8377b1b7a (trunk libt) #4164 "__FD_SETSIZE impact on open-file-limit and peer-limit-global" -- commit patch by romanr to take FD_SETSIZE into account before calling setrlimit() 2011-04-19 15:23:04 +00:00
Jordan Lee
ab698d2fa4 (trunk libT) more heap pruning: don't allocate peer-msgs' incoming block buffer until it's needed. If we're seeding, we won't need it. 2011-04-17 06:13:22 +00:00
Jordan Lee
294c2d7113 (trunk libT) heap and event pruning: don't create evtimers for periodic pex messages if the torrent doesn't allow pex (such as, if it's on a private tracker).
Previously, we unconditionally created the evtimer, and then checked each time to see if pex was allowed.
2011-04-17 05:55:46 +00:00
Jordan Lee
244bd7bc1c (trunk libT) more heap pruning: use composition rather than aggregation for the tr_crypto object owned by tr_peerIo. 2011-04-17 05:22:50 +00:00
Jordan Lee
bbc35bd546 (trunk libT) use FD_SETSIZE instead of __FD_SETSIZE 2011-04-16 22:41:14 +00:00
Jordan Lee
f9d5e7a72c (trunk libT) #4165 "__FD_SETSIZE impact on open-file-limit and peer-limit-global" -- add safety guard in the file cache to prevent too many open files. 2011-04-16 22:33:29 +00:00
Jordan Lee
9c3d12dae2 (trunk libT) changes to the bandwidth allocator's phaseOne step as suggested by Vincent in #2338 comment:108 2011-04-16 21:46:32 +00:00
Jordan Lee
01461d0b4a (trunk gtk) more heap pruning:
querying gconf2 each time the curl callack function is called is expensive, so query it once -- then again later, if the proxy settings change -- and remember the values in a local struct.
2011-04-13 06:18:30 +00:00
Jordan Lee
96c180fd73 (trunk libT) fix 2.30b1 memory corruption bug when editing trackers.
The problem was that the new number of trackers was not being kept and the old count was retained. So if the count changed, tr_torrentTrackers() could return dangling pointers to the caller.
2011-04-11 19:44:16 +00:00
Mitchell Livingston
2b79fd7186 #4175 fix typo 2011-04-10 16:26:55 +00:00
Jordan Lee
e825bd66c7 (trunk libT) #4175 "very bizarre and unwieldly logfile in 2.30b2" -- fixed. 2011-04-10 14:15:52 +00:00