Jordan Lee
b4d36aeb54
(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.
2011-03-22 15:19:54 +00:00
Jordan Lee
41238c6c5d
(trunk libT) discard out-of-range reject messages from peers.
2011-03-21 16:42:32 +00:00
Jordan Lee
3933d84e1c
(trunk libT) #4084 "after reaching seed state, no new peers are acquired" -- possible fix.
...
This revises r12110 based on feedback from sadface about the use of tr_atom.uploadOnly.
2011-03-07 14:59:47 +00:00
Jordan Lee
b4538e0625
(trunk libT) copyediting.
...
1. make some accidentally-public functions/variables private
2. comment out tr_generateAllowedSet() since we're not using it
3. argument list indentation
2011-03-07 14:33:45 +00:00
Jordan Lee
d2270852af
(trunk libT) simpler implementation of the idea behind the code removed in r12108 and r12109.
2011-03-07 04:48:46 +00:00
Jordan Lee
6b4d500c36
(trunk libT) finish r12108
2011-03-07 03:46:26 +00:00
Jordan Lee
c9897ff97a
experimental fix for #4084
2011-03-06 23:49:40 +00:00
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
b10aea6fcc
(trunk) #4072 "remove the 'know peer count' field in Inspector" -- remove it from libtransmission too
2011-03-04 04:50:50 +00:00
Jordan Lee
a1b81cd152
(trunk libT) fix peerDestruct() crash when peer doesn't have a corresponding atom
2011-03-04 04:45:12 +00:00
Jordan Lee
0c36e0c9de
(trunk libT) remove the unused tr_ratecontrol code. switch webseed over to using tr_bandwidth.
2011-03-03 18:33:24 +00:00
Jordan Lee
6d94a33f2d
(trunk libT) #4070 "assertion failure happens soon after startup" -- fixed.
...
Thanks to User294 for helping to track down the problem.
2011-03-03 17:28:04 +00:00
Jordan Lee
0e27f583d3
(trunk libT) #4047 "transfer speed shown as 0" -- revert r11783 ( #3950 ) because it caused speed misreporting.
2011-03-01 15:23:13 +00:00
Jordan Lee
cff172bbd5
(trunk libT) peer-mgr.c peerCallbackFunc(): Replace some "should always be true" tests with assert()s. These tests used to be useful, but I don't think they are anymore. The assert()s have been put in their place to test that theory...
2011-02-25 01:48:46 +00:00
Jordan Lee
9d95bd151d
(trunk libT) #4035 "In seed state, transmission disconnect from leechers" -- fixed.
2011-02-24 14:35:45 +00:00
Jordan Lee
f4992d885c
(trunk libT) if we're a partial seed and the peer has everything we have, disconnect.
2011-02-24 01:50:35 +00:00
Jordan Lee
0c6c569b69
(trunk libT) minor cleanup: improve the function names torrentConstructor() and torrentDestructor().
...
These functions actually allocate/free the memory where these objects reside, so it's clearer to name them torrentNew() and torrentDelete().
2011-02-23 06:18:09 +00:00
Jordan Lee
bf8e4594e0
(trunk libT) minor cleanup: improve the function names peerConstructor() and peerDestructor().
...
These functions actually allocate/free the memory where these peer objects reside, so it's clearer to name them peerNew() and peerDelete().
2011-02-23 06:14:06 +00:00
Jordan Lee
f2b4a59eda
(trunk libT) #4051 "Use composition for the tr_history fields in tr_peer" -- fixed.
...
If we use composition on these objects we can save a handful of pointers per peer. This isn't a big deal, but it's an easy/safe change to do.
2011-02-23 06:01:16 +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
32237dbdb0
(trunk libT) remove unused functions: tr_bitsetDifference() tr_bitfieldDifference()
2011-02-21 15:36:07 +00:00
Jordan Lee
6ab918a202
(trunk libT) code cleanup: moving bitset functions to their own .c file.
2011-02-21 01:40:19 +00:00
Jordan Lee
05ff024dd8
(trunk libT) #3372 "What happened with closing idle peers?" -- fixed.
2011-02-19 12:32:41 +00:00
Jordan Lee
7a8ab0ddbe
(trunk libT) closeBadPeers() part 2 of 2: this function was serving two purposes, which wasn't clear from its name. refactor slightly to make the purpose and name match.
2011-02-19 12:30:18 +00:00
Jordan Lee
1592953439
(trunk libT) closeBadPeers() part 1 of 2: don't bother sorting these peers by activity -- we're closing -all- of them, so sorting them is pointless.
2011-02-19 12:24:00 +00:00
Jordan Lee
80d06d4c34
(trunk libT) add a bool to tr_peer_stat and the RPC peer list to denote whether or not a peer's connected via µTP
2011-02-18 04:07:43 +00:00
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