Commit Graph

520 Commits

Author SHA1 Message Date
Jordan Lee 8e87147c61 (trunk libT) add a stub for UTP_Close() s.t. peer-mgr.c doesn't need the #ifdefs from r11960 2011-02-18 01:06:42 +00:00
Jordan Lee cd04051de8 add configure script switch to enable/disable utp 2011-02-18 00:45:44 +00:00
Juliusz Chroboczek 828c9888b0 Don't attempt uTP connexions to peers learned from PEX that didn't signal support. 2011-02-18 00:43:49 +00:00
Juliusz Chroboczek 07addc7d0d Try uTP connections by default. 2011-02-18 00:43:37 +00:00
Juliusz Chroboczek 704f984bdf Implement atom->utp_failed and peerMgrSetUpFailed. 2011-02-18 00:43:31 +00:00
Juliusz Chroboczek 25b8d08537 When uTP is enabled, open uTP connections to some peers.
Since we don't implement falling back to TCP yet, we're very
conservative: we only use uTP when we have good reasons to believe
the peer speaks uTP.
2011-02-18 00:43:24 +00:00
Jordan Lee f00799f80c if we successfully finish a handshake using uTP, mark the peer as supporting uTP 2011-02-18 00:41:06 +00:00
Juliusz Chroboczek 88f4eac81f Implement outgoing uTP connections. 2011-02-18 00:36:19 +00:00
Jordan Lee 7df7d34f6d automake/autoconf; #includes in libtransmission 2011-02-18 00:32:19 +00:00
Juliusz Chroboczek 130006fcb1 Propagate uTP and ut_holepunch information over PEX. 2011-02-18 00:24:48 +00:00
Juliusz Chroboczek 8599d7c037 Modify peer-io to work with UTP sockets.
This is not supposed to work yet -- it just adds new fields to the data
structures to get the UTP code to compile.
2011-02-18 00:23:51 +00:00
Jordan Lee ee4317600d (trunk libT) #3767 "rarest first policy" -- disable the assertReplicationCountIsExact() assertion 2011-02-17 13:00:11 +00:00
Jordan Lee 77bdb6522d (trunk libT) #3767 "rarest first policy" -- possible fix for assertion error reported by rolcol
Resolve the problem described @ https://trac.transmissionbt.com/ticket/3767#comment:38
2011-02-17 12:57:36 +00:00
Jordan Lee 5dffc2814d (trunk libT) #3767 "rarest first policy" -- fixed.
This commit, started by a patch from athy, implements a rarest first policy when deciding which pieces to request from peers. It keeps a count of how many peers have each piece, and updates the count when getting bitfields, have, have all, and have none messages, as well as decrementing the counts when peers disconnect.

This running total is generated only for downloading torrents. Seeds don't have this overhead.
2011-02-17 05:14:53 +00:00
Jordan Lee d591767941 (trunk libT) #3656 "endgame could be faster" -- fixed. Patch by harrydb. 2011-02-15 16:04:56 +00:00
Jordan Lee 2b8124d3ad (trunk) #4019 "Minor patch, kill useless casts in transmission source." -- fixed. patch by jlouis
jlouis used Coccinelle to scan transmission's source for redundant code that casts a type to its own type.
2011-02-12 17:27:47 +00:00
Jordan Lee 4fbd6d8b19 (trunk libT) #3950 "use libevent's cached gettimeofday() value when appropriate" -- fixed. 2011-01-29 18:59:23 +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
Jordan Lee 8aa0f36a37 cleanup of who calls the libtransmission thread locking functions.
In some cases we were calling them from deep inside libtransmission, when they should have been called directly from the public-visible API functions: tr_torrentWebSpeeds_KBps(), tr_torrentPeers(), tr_torrentTrackers().
2011-01-18 23:44:36 +00:00
Jordan Lee 7ce0cf2322 code cleanup for tr_peerMgrTorrentAvailability().
1. move responsibility for getting a thread lock back to the public API fucntion, tr_torrentAvailability().
2. if the torrent doesn't have metadata, stop after zeroing out the table
3. minor code formatting cleanup
2011-01-18 22:51:29 +00:00
Jordan Lee 7f01f0c3ee #3911: tr_peerMgrTorrentAvailability() doesn't sample across the entire torrent' -- fixed. 2011-01-18 22:21:09 +00:00
Jordan Lee dd77485d83 (trunk libT) demote the remaining lazy-verify debug messages from the debug window to deep logging 2011-01-18 02:17:47 +00:00
Juliusz Chroboczek 5ac1cba6ed Make ensureAtomExists add to the flags of an existing atom.
Flags are cumulative -- if we learn that a given peer groks encryption
from one source, and that it accepts incoming connections from another,
then the relevant atom should have both flags.
2011-01-16 15:51:48 +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
Jordan Lee 6dc03f471e (trunk libT) #3519 "webseeds don't work" -- fixed. 2011-01-06 01:00:21 +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 ae84dc70dd (trunk libT) #3836 "libevent2 support" -- finish moving to the libevent2 API mode. don't include the backwards-compatable API headers. 2010-12-24 08:58:41 +00:00
Mitchell Livingston cf6866b7e8 follow the convention ftw 2010-12-23 02:39:03 +00:00
Mitchell Livingston 8c4f3549c7 #3595 Allow promotion of the "from" value in peer_atom (and still show where it was first discovered) 2010-12-23 02:35:21 +00:00
Charles Kerr dc4880a477 (trunk libT) revert experimental patch r11527 from #3658 2010-12-20 12:44:16 +00:00
Charles Kerr 4ca695c090 (trunk libT) #3656 "endgame could be faster" -- revert the test code from r11528 2010-12-14 18:36:31 +00:00
Charles Kerr f8355d654f (trunk libT) #3242 "use added.f's 'connectable' flag" -- added. 2010-12-14 18:33:48 +00:00
Charles Kerr 79d4967ee6 (trunk libT) #3656 "endgame could be faster" -- another experimental patch, added to trunk for reality testing in the nightly builds. 2010-12-12 23:29:52 +00:00
Charles Kerr 492c4bbe0b (trunk libT) #3658 "don't initiate new peer connections if our bandwidth is maxed out" -- added to trunk for nightly build users to kick around a bit. this is an experimental patch and I'm not sure how I feel about it. 2010-12-12 23:27:30 +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 aa79cbcbf2 (trunk libT) #3600 "Improve rechokeDownloads' peer limiter" -- fixed with patch from Longinus00 2010-12-04 17:17:44 +00:00
Charles Kerr c064ef3c79 (trunk libT) #3682 "reduce memory footprint caused by tr_history" -- done. Patch by Longinus00 2010-11-16 15:17:34 +00:00
Charles Kerr 01ab067e9c (trunk libT) #3662 "libtransmission cpu optimization: fewer calls to tr_time_msec()" -- fixed. 2010-10-24 01:08:08 +00:00
Charles Kerr 1f9e305e30 (trunk libT) #3596 "optimistic unchoke timer is too short" -- fixed. 2010-10-13 03:56:25 +00:00
Charles Kerr 6c3d651ffe (trunk) #3618 "FreeBSD 8.1 & GCC 4.2.1 compiler warnings" -- fix some compiler warnings. 2010-10-11 21:44:46 +00:00
Charles Kerr 91cc3f4a2d (trunk libT) #3329 "connection problems when downloading" -- apply Longinus00's fixSlowStart.diff 2010-10-01 18:16:01 +00:00
Daniel Lee 04aee3c49b (libt) remove jump discontinuities in getMaxAtomCount 2010-09-25 00:38:49 +00:00
Daniel Lee afc7c5355e (libT) #3453:Torrent does not stop when set per torrent seed ratio is reached before torrent is completed
(libT) #3578:Interested flag isn't cleared when transitioning from leeching to seeding
2010-09-25 00:34:15 +00:00
Charles Kerr bbd0391f01 (trunk libT) fix unchoke regression 2010-09-20 20:32:40 +00:00
Charles Kerr 9772cdb14d (trunk libT) #3568 "don't optimistically unchoke torrents when our bandwidth is maxed out" -- fixed. 2010-09-19 01:04:49 +00:00
Charles Kerr a105132d11 (trunk libT) #3475 "'"stop seeding when inactive' doesn't appear to work" -- experimental fix 2010-08-03 01:25:23 +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 6f5c9dcafb (trunk libt) rename tr_date() as tr_time_msec() for clarity 2010-07-11 20:49:19 +00:00
Charles Kerr d4816f7461 (trunk libT) remove some debugging printf()s that were accidentally committed in r10941 2010-07-05 22:49:07 +00:00
Charles Kerr d088b289dd (trunk libT) isPeerCandidate(): sort the filter tests in order of those that get the mosts hits 2010-07-04 20:40:34 +00:00