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
Jordan Lee
e2b7728637
6789ABCDE
2011-04-10 05:27:14 +00:00
Jordan Lee
d6dbf87652
(trunk libT) remove unneeded assert()ion
2011-04-10 05:22:18 +00:00
Jordan Lee
05b75e6e9f
(trunk libT) use a better data struct for the tr_datatype list in peer-io
2011-04-10 05:21:51 +00:00
Jordan Lee
9b96ced90a
(trunk libT) #4175 "very bizarre and unwieldy logfile in 2.30b2" -- another test commit for gunzip :)
2011-04-10 03:57:37 +00:00
Jordan Lee
42fbf1f646
(trunk libT) #4175 "bizarre and unwieldly logfile in 2.30b2" -- possible fix for gunzip to test
2011-04-10 00:05:18 +00:00
Jordan Lee
bad3cb53a3
(trunk libT) #4173 "crashing with r12315 in Debian" -- apply patch from comment:8 for testing in 2.30b2
2011-04-09 14:36:33 +00:00
Jordan Lee
6a53f72481
(trunk libT) in peer-mgr's closeBadPeers() function, don't bother doing any of the setup/teardown calculations if the peer array is empty.
2011-04-07 20:15:49 +00:00
Jordan Lee
35eb016209
(trunk libT) use get_next_scrape_time() inside the scrape error handler.
...
get_next_scrape_time() was introduced in r12297. The rationale is that by rounding all scrape times to their nearest 10th second, they will tend to occur in batches and improve multiscrape.
2011-04-07 20:00:26 +00:00
Jordan Lee
4a5415e84c
(trunk libT) #3931 "'Announce is Queued' but torrent doesn't announce itself to trackers" -- add more debugging information for the next announce interval when an announce error is encountered, as requested by Sardok in comment:70 of #3931
2011-04-07 19:54:30 +00:00
Jordan Lee
03666d2365
(trunk libT) #4173 "Crashing with r12315 in Debian" -- possible fix?
2011-04-07 06:56:31 +00:00
Jordan Lee
7cef8dc8a8
(trunk libT) trivial commit fixing typo in the comments from r12297
2011-04-07 06:54:03 +00:00
Jordan Lee
712ee263de
(trunk libT) more heap pruning: avoid four unnecessary malloc() + free() calls per tr_peer.
...
This commit also changes tr_recentHistory from being a general-purpose tool to being a little more hardcoded for the only purpose it's used, in tr_peerMgr. If its files (history.[ch]) don't find any other "customers" in libtransmission, eventually it should be demoted to being a private helper class inside of peer-mgr.c and have the history.[ch] files removed from the build.
2011-04-06 23:27:11 +00:00
Jordan Lee
bcec22eeb6
(trunk libT) remove an assertion from bitfield that doesn't always need to be true
2011-04-06 04:55:57 +00:00
Jordan Lee
f37da42a8c
(trunk libT) fix ABR error when parsing a URL with no path and no trailing slash after the host. Error reported by livings124
2011-04-05 22:21:18 +00:00
Jordan Lee
4694f95594
(trunk libT) more heap pruning: avoid an unnecessary malloc() + free() when reading PadD during an outbound encrypted handshake
2011-04-05 21:14:44 +00:00
Jordan Lee
758da07fe9
(trunk libT) more heap pruning: avoid an unnecessary malloc() + strcmp() + free() when parsing the initial handshake string from a peer
2011-04-05 18:16:21 +00:00
Jordan Lee
b8d1bb3f6e
(trunk libT) when processing errors in peer-io.c's event_read_cb() and tr_peerIoTryRead() functions, don't call tr_net_strerror() unless logging is turned on s.t. the string will be used.
2011-04-05 16:46:13 +00:00
Jordan Lee
3ba9796f4b
(trunk libT) when processing an error in tr_peerIoTryWrite(), don't call tr_net_strerror() unless logging is turned on s.t. the string will be used.
2011-04-05 16:34:49 +00:00
Jordan Lee
46dd6f17ab
(trunk libT) oops, r12313 committed the wrong version of list.c
2011-04-05 00:59:49 +00:00
Jordan Lee
e0f6ade71e
(trunk libT) keep a pool of reusable tr_list nodes
2011-04-05 00:56:56 +00:00
Jordan Lee
1e0f92ba78
(trunk libT) Use tr_strndup() instead of tr_strdup() in tr_urlParse() to avoid a couple of strlen() calls
2011-04-05 00:55:09 +00:00
Jordan Lee
ac3ec2db39
(trunk libT) use alloca() for allocating the block array in updateBlockRequests()
2011-04-05 00:53:57 +00:00
Jordan Lee
85f853f214
(trunk libT) #4165 "crash on startup introduced in r12262" -- experimental commit
2011-04-05 00:29:42 +00:00
Jordan Lee
c14b6bdf03
(trunk libT) remove redundant assert()s
2011-04-05 00:26:31 +00:00
Jordan Lee
492d208dc8
(trunk libT) remove unnecessary memmove()s from rechokeDownloads()
2011-04-05 00:24:25 +00:00
Jordan Lee
17894f258c
remove unneeded include
2011-04-04 21:42:04 +00:00
Jordan Lee
94e11008b9
(trunk libT) more heap pruning: avoid an unnecessary malloc() + free() when encrypting outbound messages
2011-04-04 16:53:15 +00:00
Jordan Lee
40b2ad63d9
(trunk libT) avoid an unnecessary malloc() + free() call when we finish downloading a block.
...
Pre-libevent2, this free() was useful in helping keep the peer's incoming piece data buffer from growing too large because that could be a significant amount of wasted space given enough peers. However now that we're using the libevent2 code, that piece data buffer gets handed off to the block cache, so most of the time we're freeing an evbuffer that doesn't have any inernal chains allocated anyway.
2011-04-04 05:15:54 +00:00
Jordan Lee
525d854016
(trunk libT) when reading piece data in from a socket, avoid two unnecessary calls to memcpy()
2011-04-04 04:45:41 +00:00
Mitchell Livingston
3e451b2bf9
small cleanup when determining if two announce URLs differ only by scheme
2011-04-03 03:25:13 +00:00
Jordan Lee
5bee93361b
(trunk libT) fix UMR bug reported by wereHamster
2011-04-02 23:33:51 +00:00
Juliusz Chroboczek
232075f547
Reinstate including tcp.h in net.c.
...
Removed in r12225, this broke netSetCongestionControl.
2011-04-02 16:43:17 +00:00
Jordan Lee
4a47e3c869
(trunk libT) don't bother calling rechokeUploads() and rechokeDownloads() on torrents which have no peers.
2011-04-02 08:35:47 +00:00
Jordan Lee
11c4194da8
(trunk libT) better multiscrape
2011-04-02 07:44:19 +00:00
Jordan Lee
0245703634
(trunk libT) tr_torrentGetFileMTime() used to require two stat() calls.. now it only requires one.
2011-04-02 07:36:34 +00:00
Jordan Lee
e5a6641bda
(trunk libT) tr_torrentFindFile2(): avoid an unnecessary malloc() + free() if the file we're looking for is complete and doesn't have a ".part" suffix
2011-04-02 03:31:41 +00:00
Jordan Lee
2328456a4a
(trunk libT) simplify tr_torrent's hasAnyLocalData() to be more readable, and also to avoid yet another unnecessary malloc() and free()
2011-04-01 04:33:35 +00:00