Commit Graph

448 Commits

Author SHA1 Message Date
Charles Kerr 8e4fa83c77 update NEWS 2008-11-06 02:56:51 +00:00
Charles Kerr 17b8624ca7 (libT) #1417: revert r7039 2008-11-04 21:33:24 +00:00
Charles Kerr 9859578a7d (libT) #1417: overhead should be counted in the global stats 2008-11-04 17:37:51 +00:00
Charles Kerr 631d9d9a8f (libT) fold together some redundant sanity tests that were taking up 6.6% in softwareelves' profile 2008-10-27 04:27:55 +00:00
Charles Kerr 06939cafa6 (libT) low-hanging fruit discovered from softwareelves' shark profile. 2008-10-26 15:39:04 +00:00
Charles Kerr d03f0283dd (libT) minor code cleanup for r6954 2008-10-25 15:19:46 +00:00
Charles Kerr e15114e2aa new & improved fix for #617: Transmission goes above the set bandwidth limits 2008-10-25 02:20:16 +00:00
Charles Kerr 84dcaab5f4 remove dead code 2008-10-22 13:57:30 +00:00
Charles Kerr aba2849375 #1302: possible fix 2008-10-21 19:27:57 +00:00
Charles Kerr ea668ca9ff (libT) possible fix for the up/down display inconsistency reported by BentMyWookie. 2008-10-20 03:47:48 +00:00
Charles Kerr b5c2f14387 (libT) dead code removal 2008-10-14 20:44:41 +00:00
Charles Kerr e660acc669 fix oops 2008-10-14 01:29:33 +00:00
Charles Kerr ef5bc3f150 (libT) more win32 work copied from spry's code:
(1) add #define for {read,write,strncasecmp} -> {_read,_write,_strnicmp}
(2) fix a couple more variadic macros that didn't get fixed in the last commit
(3) use evutil_strtoll() instead of strtoll()
2008-10-14 01:00:15 +00:00
Charles Kerr f00c8ff34d possible fix for #1305 "Transmission losing data - Session Transfer significantly higher than actual download". This patch may need more user testing and will definitely make webseeds slower. suck it up. 2008-10-11 04:07:50 +00:00
Charles Kerr 413211288b #1338: fix win32 build errors 2008-10-10 02:14:51 +00:00
Charles Kerr 964d7e193c (libT) #1338: EMSGSIZE and EPROTO not found on Windows 2008-10-10 00:38:37 +00:00
Charles Kerr 178008650e (libT) remove dead code 2008-10-06 19:44:38 +00:00
Charles Kerr 5391f768f4 fix a null pointer dereference 2008-10-05 22:51:18 +00:00
Charles Kerr 4fab4c9e9b (libT) finish killing tr_errno. 2008-10-03 04:49:06 +00:00
Charles Kerr 79d8a5cdf3 (libT) eliminating tr_errno, part 1: make tr_ioTestPiece return an int instead of a tr_errno. 2008-10-02 20:30:29 +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 9c2c4ca08d fix at least one possible cause for the new crash reported by persept 2008-09-19 17:03:25 +00:00
Charles Kerr b5efa86ad7 add new compile-time throttle options suggested by persept 2008-09-18 03:55:31 +00:00
Charles Kerr 4fe1e1dae3 first draft at having more accurate speed controls 2008-09-17 19:44:24 +00:00
Charles Kerr 5184119948 (libT) possible solution to the peer hammering problem reported by Switeck 2008-09-05 05:14:49 +00:00
Charles Kerr 64e08510f0 (libT) maybe fix the hangs reported by users in the recent nightlies. 2008-08-27 18:50:21 +00:00
Charles Kerr 82815a74d2 #1214: add RPC support for per-peer status,ul,dl,address info 2008-08-22 17:59:31 +00:00
Mukund Sivaraman 318ca1fb7e Don't use memmove() for simple assignment 2008-08-22 16:34:16 +00:00
Mukund Sivaraman c10a612f90 Use stricter type for enums 2008-08-22 16:30:07 +00:00
Mukund Sivaraman 196ae72a85 Don't move all the rest of peers if current peer is choked
Only move the last peer into place.
2008-08-22 16:30:02 +00:00
Mukund Sivaraman 75d2e74a64 Use stricter type for enums 2008-08-22 16:13:52 +00:00
Mukund Sivaraman b79e6561c0 Remove unused missingBlockCount 2008-08-22 16:03:49 +00:00
Charles Kerr c32491ab3a (libT) remove a little more dead code 2008-08-22 15:33:55 +00:00
Mukund Sivaraman 7f749d1284 Sort piece_data_time in descending order.
Also fix code style in some places.
2008-08-22 02:34:22 +00:00
Mukund Sivaraman 59351991f6 Further fix/cleanup compare code 2008-08-22 02:15:37 +00:00
Charles Kerr d323a99cdd undo part of r6616 to address the assertion failure reported by andersos and Waldorf 2008-08-22 01:27:00 +00:00
Charles Kerr ca45125259 (libT) more dead code removal: tr_compareTime() and tr_compareDouble() 2008-08-21 20:39:57 +00:00
Charles Kerr 1105dc0038 (libT) remove some dead functions: tr_calloc(), tr_compareUint16(), tr_compareUint32() 2008-08-21 19:03:56 +00:00
Mukund Sivaraman 2ed1e6ee9d Use signed integers for storing the random values 2008-08-20 16:19:47 +00:00
Mukund Sivaraman d712f22b21 Rename function to indicate its stupidity 2008-08-20 14:55:23 +00:00
Mukund Sivaraman e84275e429 Replace the random number generator inside peer-mgr with a
stupid faster one.
2008-08-20 14:36:15 +00:00
Mukund Sivaraman 4796e40d27 Inline tr_compareUint16() in this case 2008-08-20 13:54:31 +00:00
Mukund Sivaraman ed7685dd1a Make tr_bitfieldHas() a macro 2008-08-20 13:45:52 +00:00
Charles Kerr 93898401fb more connection management changes 2008-08-16 16:00:49 +00:00
Charles Kerr c3eb56a6e0 (libT) some more peer connection management: (1) reset `numFails' to zero after a successful connect (2) tweak the reconnect intervals a bit 2008-08-16 06:07:11 +00:00
Charles Kerr 52efe10ec5 a few attempts to reduce the "router death" load: lower the total number of connections made per second. increase the intervals for reconnecting to some peers. simplify the code a bit. 2008-08-16 05:12:55 +00:00
Mukund Sivaraman de62de3e19 Replace random number generation code 2008-08-14 11:11:25 +00:00
Charles Kerr 2e6443a53d #1168: reading past the end of KTorrent's pex added.f strings 2008-08-10 14:58:11 +00:00
Charles Kerr 822238ca33 that's the trouble with quick fixes. 2008-08-09 23:44:31 +00:00
Charles Kerr 58fb922ac1 silence the logspam described in http://forum.transmissionbt.com/viewtopic.php?f=4&t=5588& 2008-08-09 16:17:59 +00:00
Charles Kerr 6937164c93 back out the changes from r6415. 2008-08-08 22:44:32 +00:00
Charles Kerr eec87200e1 possible fix for #1149 2008-08-07 05:55:40 +00:00
Charles Kerr b860119cd3 minor text cleanup 2008-08-01 16:43:22 +00:00
Charles Kerr 61258969c2 dead code removal 2008-08-01 04:05:22 +00:00
Charles Kerr 28db5be802 #1123: unreachable peers need to be handled better 2008-07-29 00:52:02 +00:00
Charles Kerr 72880446d8 (daemon) #1107: transmission-remote -t[n] -i should display webseeding info 2008-07-27 14:10:32 +00:00
Charles Kerr fd06d85aee part 1 of Aloisius' performance patch 2008-06-27 02:42:44 +00:00
Charles Kerr cda886028d fix `HAVE' error that broke during the webseed-piece changes last week. Reported by Aloisius in http://forum.transmissionbt.com/viewtopic.php?t=5175 2008-06-21 01:03:31 +00:00
Charles Kerr 81b510bfd1 #1034: fix optimistic unchoke bug reported by Aloisius 2008-06-17 15:19:12 +00:00
Charles Kerr 25a20d172d tr_peerMgrHasConnections(): take webseeds into account, as suggested by BentMyWookie 2008-06-12 16:28:39 +00:00
Charles Kerr f8314b364b fix an oops from the previous commit. hi, titer 2008-06-11 19:04:48 +00:00
Charles Kerr 85c26e9f7d fix a pair of webseed bugs reported by BentMyWookie 2008-06-11 19:01:16 +00:00
Charles Kerr f0229ed8ad (libT) allow custom blocklists... now all you need to do is place a file in the blocklists/ folder and Transmission will automatically use it the next time it starts. 2008-06-11 16:15:45 +00:00
Charles Kerr 393ebbc24a more webseed work. 2008-06-10 02:36:52 +00:00
Charles Kerr 61b41adf1a have idle webseeds return a speed of -1 instead of 0 so that we can differentiate between stalled and idle. document this in transmission.h. 2008-06-10 01:46:36 +00:00
Charles Kerr 837f997e6c (libT) new API for webseed statistics: tr_torrentGetWebSpeeds() 2008-06-10 01:38:12 +00:00
Charles Kerr adbbf82302 (libT) make tr_torrentAmountFinished() look at the same pieces as tr_torrentAvailability() for consistency's sake as requested by BentMyWookie 2008-06-09 23:58:31 +00:00
Charles Kerr 51f1126a6d (libT) make tr_torrentAvailability() a lot faster in the case where the torrent is complete, and a little faster in the genral case too. 2008-06-09 23:11:15 +00:00
Charles Kerr dce24eb1f0 libT: first cut at implementing the internal peers' request queues as pieces rather than blocks, as discussed with erdgeist and denis, to avoid a couple of nasty CPU bottlenecks. 2008-06-09 22:53:45 +00:00
Charles Kerr 7f8ef25acc whoops, left some test scaffolding code in r6073 2008-06-07 21:28:47 +00:00
Charles Kerr e3e3bee8b5 #800 initial support for GetRight-style fetching of data through http and ftp servers specified in the .torrent's "url-list" tag 2008-06-07 21:26:41 +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 2878d0d32e bitfield speedups written by denis__. Thanks! 2008-06-05 20:21:56 +00:00
Charles Kerr 547056b50b #988: Optimistic unchoke can unchoke uninterested peers 2008-06-03 04:29:56 +00:00
Charles Kerr cdf5cb87d6 another tweak for calculating tr_stat.desiredAvailable faster, suggested by BentMyWookie 2008-05-31 05:22:10 +00:00
Charles Kerr e9c7e76c07 #980 optimistic unchoking is broken 2008-05-30 12:58:55 +00:00
Charles Kerr 70fcc56beb (libT) (1) shave a few bytes from tr_peer and tr_ratecontrol's footprints. (2) remove some dead code. 2008-05-26 12:14:35 +00:00
Charles Kerr 2c79888a93 RPC/IPC redesign 2008-05-18 16:44:30 +00:00
Charles Kerr 7b25d0476c remove occurrences of "if( 1 )" 2008-05-06 20:31:05 +00:00
Charles Kerr 86c3ae4fa4 #917: Another minor speedup suggested by BentMyWookie. He enjoys giving new suggestions right *after* I hit "svn commit" :) 2008-05-06 19:49:25 +00:00
Charles Kerr d047c1175d #917: small speedup to r5759 suggested by BentMyWookie 2008-05-06 19:39:16 +00:00
Charles Kerr 0f9ca34848 #917: when seeding, drop peers that have everything you have (instead of just dropping seeds) 2008-05-06 19:06:46 +00:00
Charles Kerr a362df0a14 #905: update peer_id client lists. add a dozen or so new clients from Azureus (thanks amc1!) 2008-04-29 16:57:16 +00:00
Charles Kerr 47021f1a12 fold most of the "deep logging" functions into a single function 2008-04-25 02:57:33 +00:00
Charles Kerr 3445817a80 peer-msgs: faster upload speeds in situations with few peers. this patch needs wider testing for side-effects wrt speed limits. 2008-04-19 19:37:05 +00:00
Charles Kerr 08b27749ba #890: be smarter about noticing seeds from tracker & pex 2008-04-19 15:07:59 +00:00
Charles Kerr ea9e0b260f (1) fix choke/unchoke error. (2) if a peer keeps trying to reconnect to us, hang up during the handshake. 2008-04-17 03:48:56 +00:00
Charles Kerr f12ac60d0a update a couple of the tr_stat fields based on feedback from BMW 2008-04-11 23:05:14 +00:00
Charles Kerr 5890eaef34 encapsulate the blocklist a little better so that we can add more blocklists in the future if necessary 2008-04-01 19:20:21 +00:00
Charles Kerr def9d1a492 better logging of blocked IP addresses. 2008-03-30 00:57:55 +00:00
Charles Kerr a20bb8d569 get the blocklist code working & add a unit test for it. 2008-03-29 21:05:51 +00:00
Charles Kerr c63b548195 fix bug that caused very large torrents to crash Transmission 2008-03-22 18:10:59 +00:00
Charles Kerr 5e3dcb5f6f #751: more digging to try to figure out where the problem is. 2008-03-06 13:24:44 +00:00
Charles Kerr e00d8bf849 fix some gcc 4.2 warnings 2008-02-28 19:33:11 +00:00
Charles Kerr f2f24e936d tear out the "fast peer" code from refillPulse() altogether 2008-02-25 01:35:20 +00:00
Charles Kerr b9a9e1f1a8 disable some fastpeer code that's too expensive. 2008-02-25 01:29:30 +00:00
Charles Kerr cfe068876e remove unnecessary #includes 2008-02-19 18:39:49 +00:00
Charles Kerr 8d14a789cb #698: `have' gets too far ahead of `verified' 2008-02-10 04:03:19 +00:00
Charles Kerr f72ba4b8d8 #663: connection limits don't work correctly. 2008-01-28 21:05:50 +00:00
Charles Kerr b1cd6ecccc remove unused "max unchoked peers" feature. fix obsolete TR_FLAG_SAVE comment. 2008-01-23 17:06:36 +00:00
Charles Kerr 1b7706e101 finish the trunk/1.0x libT merge: router death & portability 2008-01-21 02:11:57 +00:00
Charles Kerr de21d77af2 test code to test a "router death" theory in the nightlies 2008-01-20 03:21:51 +00:00
Charles Kerr 3a47dfdb23 (router death) dial down the max number of new sockets per second even lower 2008-01-19 03:44:44 +00:00
Charles Kerr de515ee339 if the torrent's download path doesn't exist, don't create it -- it's might be a removeable disk that got unplugged. 2008-01-18 19:13:32 +00:00
Charles Kerr 52c3243b4b more test code to address "router death". Based on maxintech's feedback in the forums, try making the peer manager's reconnect intervals and volume more like 1.00 2008-01-17 03:43:08 +00:00
Charles Kerr 377c00a826 a test: if we set the reconnect period to any given peer to > 900 seconds, will that make "router death" go away? 900 seconds is the usual router setting for timing out bad sockets. 2008-01-16 20:24:18 +00:00
Charles Kerr 61fc032dc1 sync peersSendingToUs with isDownloadingFrom, reported by BentMyWookie 2008-01-16 17:52:47 +00:00
Charles Kerr a1e20dd7e9 more work on "router death": if we can't connect to a given peer, retry it fewer times and wait much longer between retries. 2008-01-16 15:13:02 +00:00
Charles Kerr ca70ef18bb drive the throttle even lower.. max of 16 connections per second. 2008-01-15 06:02:47 +00:00
Charles Kerr 2c7a7c4253 throttle the number of new connections per second down even further from 48 to 32 because of the continuing "kills my router" reports 2008-01-13 21:05:38 +00:00
Charles Kerr 90f5c61327 tweak the conncetions a little bit 2008-01-11 19:44:45 +00:00
Charles Kerr 876cd4c413 test patch for the "router death" bug: throttle the number of connections made per second 2008-01-11 18:13:09 +00:00
Charles Kerr 39b1db460d follow the spec's suggestion that new connections be 3x as likely for optimistic unchoke 2008-01-11 02:09:20 +00:00
Charles Kerr 6f6adb1d53 try to ramp up fast connections more quickly. 2008-01-11 00:38:26 +00:00
Charles Kerr 3a6396a3cb mingw portability fixes 2008-01-10 18:52:46 +00:00
Mitchell Livingston bedfab2ccc clarify peer upload and download 2008-01-10 00:52:02 +00:00
Charles Kerr 591f7f8b10 * improve the unchoking algorithm.
* when deciding which peers to connect to, take peer's previous speeds into account
* longer delay interval before reconnecting to peers that didn't give us data
* added uTorrent-inspired "flags" column in tr_peer_stat and gtk's torrent details' "peer" tab
2008-01-09 17:33:43 +00:00
Charles Kerr 4f0f6e150e fix another OpenBSD alignment bug reported by naddy 2008-01-08 01:57:48 +00:00
Charles Kerr 35f73c097c lazy "allowed set" generation. add regression test for "allowed set" generation. 2008-01-06 21:56:30 +00:00
Charles Kerr 6c3eab0a92 #585: 1.00 could be sped up by elminating reconnect intervals for some peers 2008-01-05 18:17:56 +00:00
Charles Kerr 893b0c10a3 to try to prevent router overloads, make (MAX_RECONNECTIONS_PER_PULSE * RECONNECT_PERIOD_MSEC) smaller. 2008-01-03 05:30:45 +00:00
Charles Kerr ce6c33b7bf set copyright info to 2008 2008-01-01 17:20:20 +00:00
Charles Kerr 71efb5c74b add per-priority-level endgame mode 2007-12-26 07:25:50 +00:00
Charles Kerr 819b83d90d fix another file priority bug. 2007-12-25 06:37:21 +00:00
Charles Kerr f8bc11e094 fix a couple of related file priority bugs. 2007-12-25 05:42:33 +00:00
Charles Kerr 473907d891 a little housekeeping: move tr_torrent stuff into its own header 2007-12-25 05:37:32 +00:00
Charles Kerr 401cfbdb6b replace the per-torrent PEX setting with a global one, as per discussion with SoftwareElves and BentMyWookie 2007-12-24 05:03:40 +00:00
Charles Kerr 5c4f841c7e added tr_torrentSetPeerLimits(), tr_torrentGetPeerLimits(), tr_setGlobalPeerLimit(), tr_getGlobalPeerLimit() 2007-12-20 21:44:16 +00:00
Charles Kerr 10b6e8ff8f lessons learned from 0.82:
* if we can't bind a socket to a peer, take that peer out of the retry pool.
* also, try to connect with more peers up-front.
2007-12-15 04:26:31 +00:00
Charles Kerr 332019593d speed tweaks based on whitty's feedback 2007-11-29 02:56:31 +00:00
Charles Kerr a720545256 fix peer-mgr.c shear between 0.9x and trunk 2007-11-25 17:07:12 +00:00
Charles Kerr d735989aec fix clientIsSnubbedBy() to work correctly when we're a seed 2007-11-25 16:57:08 +00:00
Charles Kerr b0f5ff96f3 back to the "router death" issue: throttle how many connections T will try to open at any one time 2007-11-18 17:35:28 +00:00
Charles Kerr ed72b1b795 fix choking bug that could penalize good peers. 2007-11-18 06:15:13 +00:00
Charles Kerr e371009606 this should improve download speeds. test it! 2007-11-18 03:18:26 +00:00
Charles Kerr 9a81cd7637 reintroduce the "SWIFT" algorithm 2007-11-18 01:00:49 +00:00
Charles Kerr 37969406b2 Add "Status" column to tr_peer_stat. 2007-11-17 23:43:33 +00:00
Charles Kerr 257eaee631 more of the same 2007-11-15 05:47:23 +00:00
Charles Kerr ea3a1387f2 more of the same. 2007-11-15 05:20:38 +00:00
Charles Kerr 8019f8cd2c raise the number of unchoked peers per torrent 2007-11-15 05:04:21 +00:00
Charles Kerr a14fe99e00 another download speed tweak 2007-11-15 04:59:37 +00:00
Charles Kerr c4f15263a0 since many people seem to be having a hard time holding onto good peers, be a little more lenient on how quickly we hang up on peers that have transferred piece data with us. 2007-11-14 05:02:03 +00:00
Charles Kerr a9e5fff2e6 * fix the `req->length == (uint32_t)( ((block)==((msgs->torrent)->blockCount-1))' bug.
* there seems to be a pattern for peers that were (intentionally?) giving incomplete data to trigger the bug above.  when a peer does this, give them a strike on its three-strikes-and-you're-banned count
2007-11-13 05:36:43 +00:00
Charles Kerr 8516860fec fix a bug in tr_stat's availability numbers, reported by BentMyWookie 2007-11-11 16:33:04 +00:00
Charles Kerr adeee3d886 silence some Fast Peer console messages 2007-11-10 22:29:55 +00:00
Charles Kerr c32f893038 commit tiennou's fast-peers-final patch from ticket 149 2007-11-10 16:06:00 +00:00
Charles Kerr fd430fde90 undoing the r3773-r3774 experiment. 2007-11-09 20:07:52 +00:00
Charles Kerr 67b719c2de on Darwin, use NSCParameterAssert() instead of assert(). 2007-11-09 19:50:40 +00:00
Charles Kerr e168cf3f69 don't let incoming peer connections sneak past MAX_CONNECTED_PEERS_PER_TORRENT. 2007-11-09 15:19:12 +00:00
Charles Kerr 0d819bd67e more work on the "router death" issue. 2007-11-08 19:43:48 +00:00
Charles Kerr bc3eff899f * some work on lessening the way we hammer the router.
* move strlcpy and strlcat out of their own files and into utils.c
2007-11-08 04:11:09 +00:00
Charles Kerr 71f4efcbad update our #includes now that libevent has cleaned up event.h 2007-11-07 18:26:19 +00:00
Charles Kerr a6206b036c "corruption" fix part 2: lots of assertions, and try to complete pieces & ban bad peers sooner 2007-10-31 04:23:51 +00:00
Charles Kerr 4cde721475 fix oops 2007-10-30 20:17:49 +00:00
Charles Kerr aace9469bb fix compile warning 2007-10-30 20:11:23 +00:00
Charles Kerr caa4170271 #426 0.91rc1: if pex is disabled on a stopped torrent, pressing "resume" causes pex to be re-enabled. (reported by pea) 2007-10-28 19:42:47 +00:00
Charles Kerr 92ac49d9c4 compatability with older C copmilers (ticket #422, patch by fizz) 2007-10-27 21:29:41 +00:00
Charles Kerr 8c0e2434f5 fix OpenBSD build error. 2007-10-25 13:59:46 +00:00
Charles Kerr 52261d88fd Fix 0.90 socket connection leak. 2007-10-25 13:38:34 +00:00
Charles Kerr a5946e396c tweak the logging a bit. 2007-10-22 18:52:36 +00:00
Charles Kerr 814a56046d fix ul/dl speed wart reported by BentMyWookie 2007-10-21 15:47:26 +00:00
Charles Kerr 25fa56d294 * don't fire the "status changed" event if the status changes while a torrent's being started for the first time.
* cleaner setting of the DND flags in the gtk+ client.
* cpStatus cleanup.
2007-10-19 23:23:21 +00:00
Charles Kerr 00a425a7d3 further tweaks to the peer connection weights after reading the overnight runlog 2007-10-16 15:05:05 +00:00
Charles Kerr fa200efd09 more tweaks 2007-10-16 03:14:07 +00:00
Charles Kerr c9359d8bde There are only 16 days left for something to replace this as October's stupidest bug. 2007-10-16 03:00:53 +00:00
Charles Kerr ec30180d76 tweak the weights that decide to reconnect to crappy peers less often. 2007-10-16 02:37:34 +00:00
Charles Kerr 30418e34b8 fix crash reported by John_Clay in http://pastebin.ca/738133 2007-10-16 02:16:57 +00:00
Charles Kerr 8feeb9ee6b when deciding which peers to try to connect to, add some weights to punish peers that don't transfer piece data with us. We'll still give them another, but at longer intervals than better peers get. 2007-10-16 00:55:17 +00:00
Charles Kerr 6eb7edf007 fix choke fibrillation bug in new connections 2007-10-15 16:01:42 +00:00
Charles Kerr 57eaa27970 Fix bug that could initiate pex in private torrents. 2007-10-14 17:21:24 +00:00
Charles Kerr 3e878aeba9 tweak the debugging messages a bit. 2007-10-13 14:02:10 +00:00
Charles Kerr 9211c57ad2 merge in the parts of peerutils' peer pruning code that still make sense 2007-10-13 13:54:05 +00:00
Charles Kerr 7e0faec4db more debugging messages 2007-10-11 03:12:48 +00:00
Charles Kerr ef4ec75532 Try out some of SoftwareElves' suggestions for faster startup connections 2007-10-11 02:50:05 +00:00
Charles Kerr 23d2f77778 (1) maybe fix the "peer->msgs != NULL" bug reported by Dhruvk and John_Clay (2) remove dead code 2007-10-11 00:09:58 +00:00
Charles Kerr cbaf1b8faa commit more of tiennou's fastpeers patch 2007-10-10 16:39:12 +00:00
Charles Kerr 76aed9200d fix a subtle bug with having two connections to the same peer. 2007-10-10 15:59:59 +00:00
Charles Kerr a9849660f6 * fix bug that incorrectly marked some incoming connections for termination
* strip unnecessary linefeeds out of some debug messages
2007-10-10 02:59:30 +00:00
Charles Kerr 602ee120af fix recent tracker error reported by John_Clay that made it slower to pick up peers 2007-10-09 04:50:10 +00:00
Charles Kerr 9a79d1e603 the purge flag should take priority over all the other reasons to keep or purge a peer. :p 2007-10-08 01:53:11 +00:00
Charles Kerr e1b447304b fix atom initialization issue with r3320 2007-10-08 01:37:20 +00:00
Charles Kerr 161ff6a7a2 ban peers that feed us too many bad blocks. 2007-10-08 01:31:27 +00:00
Charles Kerr 5d8f9d8b13 try to connect to peers faster when a torrent is initially started. 2007-10-07 04:14:58 +00:00
Charles Kerr c75f49bc26 * add a per-peer request queue to hold the next 10-15 seconds' worth of requests so that we always have more requests at hand when the current requests start to run low.
* increase the tracker `numwant' variable to grow our peer pool
* bugfixes in cancelling requests.
* make the debug log sexy and readable like uTorrent's ;)
2007-10-06 18:20:52 +00:00
Charles Kerr b6483cbf3f don't allow duplicate requests to the same peer, even during endgame. (alus) 2007-10-05 00:16:47 +00:00
Charles Kerr 80979e0240 a little code simplification -- remove unnecessary branches 2007-10-04 20:49:37 +00:00
Charles Kerr 0872b4f40a fix the crash reported by Waldorf and John_Clay 2007-10-04 20:31:19 +00:00
Charles Kerr 5f2bd1d950 speed improvements... this is getting me 700 KiB/s (which is near to my speed cap) in the ubuntu torrent test 2007-10-03 19:00:51 +00:00
Charles Kerr 877e2bb86e some more peer tweaks 2007-10-03 18:19:51 +00:00
Charles Kerr a3d1a254d1 minor source code cleanup... 2007-10-03 16:42:43 +00:00
Charles Kerr 3d2e3cfdfb add pass subscription info into the peer-msgs constructor so that we can start getting information immediately 2007-10-03 04:04:34 +00:00
Charles Kerr 0f550043fd fix peer-mgr.c:1092 asset failure reported by Waldorf_ 2007-10-03 02:46:15 +00:00
Charles Kerr 1f1605986c tear out some now-exterraneous code. 2007-10-02 20:55:14 +00:00
Charles Kerr f4988a3f6e tweak the peer manager code a little more. 2007-10-02 19:54:14 +00:00
Charles Kerr 3dbaa7d673 make the peer manager a little greedier w.r.t. keeping connections alive. 2007-10-02 19:25:18 +00:00
Charles Kerr cdabb1c0b1 clean up the shutdown code a little bit. 2007-10-02 16:12:44 +00:00
Charles Kerr c271cec6a3 work around portability glitch in libevent's headers 2007-10-02 14:58:39 +00:00
Charles Kerr f237bf7047 * simplify the the choking intervals
* fix peer-mgr destructor bug
* send debugging messagese to TR_DEBUG_FD instead of the console
2007-10-02 14:35:02 +00:00
Charles Kerr 77d7cf76a1 fix looong-standing potential dangling pointer bug reported by BMW 2007-10-02 03:33:17 +00:00
Charles Kerr af686b3297 roll back a bug introduced in r3265 2007-10-02 02:01:57 +00:00
Charles Kerr 84ab0092fb some cleanup... remove some dead/obsolete code 2007-10-02 00:05:40 +00:00
Charles Kerr b84305cdf3 more agressive purging of connections that give socket errors 2007-10-01 18:09:59 +00:00
Charles Kerr 4ebe0b563a throttle back how many concurrent connections we make. 2007-10-01 17:51:07 +00:00
Charles Kerr f0562f5947 try to disconnect all the peers when the user hits `pause' 2007-10-01 16:50:51 +00:00
Charles Kerr 75ff12faba don't log BT protocol messages in UL/DL speed -- only log piece data transfers. 2007-10-01 16:31:17 +00:00
Charles Kerr e4fec9eefd add tr_stat.peersKnown to indicate how many peers exist in the peer `pool' 2007-10-01 15:51:54 +00:00
Charles Kerr cba61802cf remove newly-unused field tr_peer_stat::isConnected 2007-10-01 15:41:42 +00:00
Charles Kerr 1a012b8b87 maybe fix the where-are-the-peers-coming-from bug reported by SoftwareElves, John_Clay, and jahpraiseherb 2007-10-01 15:36:31 +00:00
Charles Kerr 5c11c58113 simplify libT locks now that it's (more-or-less) single-threaded. fix deadlocks. make tr_locks nestable. 2007-10-01 15:17:15 +00:00
Charles Kerr f7e3f85e50 follow BT `best practices' more closely w.r.t. choosing which pieces to download 2007-10-01 14:24:22 +00:00
Charles Kerr 9a3c91cad2 ensure TR_PEER_FROM_INCOMING peers get peer atoms. this should fix BentMyWookie's crash. 2007-10-01 05:32:34 +00:00
Charles Kerr 56738f065c fix some memory issues. 2007-10-01 04:12:24 +00:00
Charles Kerr b99084e638 more experimenting with how to get good peers 2007-10-01 03:24:52 +00:00
Charles Kerr 6bef7def52 tweaks 2007-10-01 00:08:12 +00:00
Charles Kerr 7cc6771318 experimental better peer management. 2007-09-30 23:55:49 +00:00
Charles Kerr 8a40a15b16 more work on the peer-mgr locks 2007-09-29 14:19:23 +00:00
Charles Kerr 64239a21e1 prevent a deadlock via the handshake code 2007-09-29 13:47:15 +00:00
Charles Kerr 0812087a4e add mutex locks for thread safety. 2007-09-29 06:37:03 +00:00
Charles Kerr 3f1d888354 improved uTorrent handshaking, after talking to #utorrent-dev about minutae... 2007-09-29 00:46:41 +00:00
Charles Kerr 79973a8a93 commit the next step of tiennou's fastpeers code. 2007-09-28 16:40:21 +00:00
Charles Kerr 92923a0236 remove obsolete MAX_PEERS in internal.h 2007-09-28 16:00:43 +00:00
Charles Kerr 439c1f38c1 some experimental code. (1) try to improve throughput to peers. (2) add first draft of new tr_stat fields requested by BentMyWookie (3) raise the per-torrent peer limit to 100 to match LibTorrent's defaults 2007-09-27 03:03:38 +00:00
Charles Kerr 7ccab9de2c peer i/o cleanup 2007-09-26 14:42:03 +00:00
Charles Kerr 682be6b12e don't bother remembering peers that hang up on us.
don't bother remembering peers that are seeds when we're seeding.
2007-09-26 04:44:54 +00:00
Charles Kerr fef89a3bc7 * record the ports of incoming sockets. we might need them later if we want to disconnect and reconnect.
* for portability, use libevent API for some socket upkeep
2007-09-25 23:10:34 +00:00
Charles Kerr 904359a049 * fix oops from last checkin
* remove some unused fields from internal structures
2007-09-25 22:37:23 +00:00
Charles Kerr 73522af17c fix peer-msgs.c assertion failure. (tbo) 2007-09-25 22:30:41 +00:00
Charles Kerr 1d1a23508b * follow the BT spec more closely by disallowing peers to request blocks of more than 16KiB from us.
* don't register the choke and connection timers for torrents that aren't running.  It doesn't hurt anything but does waste a few cycles.
2007-09-25 00:04:29 +00:00
Charles Kerr 7caf9550df shut up some more console messages 2007-09-24 19:12:52 +00:00
Charles Kerr 6897fe4327 plug some minor memory leaks. (valgrind) 2007-09-24 15:50:59 +00:00
Charles Kerr 89da2294b1 * when a torrent's done downloading, have it switch to seeding mode.
* tweak the gtk+ client's torrent inspector's display of transfer rates
2007-09-23 13:53:44 +00:00
Charles Kerr 968868debe fix bug that tended to disconnect from valid peers when we were seeding. also, follow the BT spec's terminology a little closer. 2007-09-23 02:19:59 +00:00
Charles Kerr d8d46517b9 fix a couple of encryption bugs. 2007-09-22 21:48:02 +00:00
Charles Kerr 3c73a86595 tweak some more. follow BentMyWookie's suggestion for raising the connection limits. 2007-09-22 14:42:15 +00:00
Charles Kerr a33a033b9b tweak the peer mgr 2007-09-22 14:32:02 +00:00
Charles Kerr 10b8326f1d add a peer connection manager s.t. have a consistent way of disconnecting from bad peers, connecting to new potential peers, disconnecting from seeds when we're seeding, etc. 2007-09-22 14:18:52 +00:00
Charles Kerr c6aa57f306 make download speed limits work? 2007-09-22 05:16:32 +00:00
Charles Kerr 87f53cba5b maybe get speed limits working. 2007-09-22 04:44:50 +00:00
Charles Kerr f724cdd304 * abort connections if the peer selects an encryption option we didn't offer them.
* fix a shutdown crash as a result of peer-mgr timers not getting destroyed.
* remove some console messages.
2007-09-22 00:53:11 +00:00
Charles Kerr 56b0e5d1ac * remove some console messages.
* scrape sooner when peers are added.
* added stub code for the connection manager code
2007-09-22 00:22:10 +00:00
Charles Kerr 4b46430731 give waldorf a different assertion to crash on. 2007-09-21 15:31:46 +00:00
Charles Kerr 980a7bda9a fix stat bug reported by BentMyWookie 2007-09-21 15:13:23 +00:00
Charles Kerr 9248143ce8 fix recursive crash when stopping a torrent, reported by plantain. silence a few more console messages. 2007-09-21 14:20:55 +00:00
Charles Kerr 54c84d0b30 silence a few more console messages 2007-09-21 13:52:42 +00:00
Charles Kerr 28bcf6204b clamp down on the flood of debug messages. 2007-09-20 23:33:46 +00:00
Charles Kerr 379beed969 if we're seeding, disconnect from other seeds (part 1 of 2) 2007-09-20 23:07:36 +00:00
Mitchell Livingston 76da1185ca merge encryption branch to trunk (xcode project is still out of date) 2007-09-20 16:32:01 +00:00