Commit Graph

231 Commits

Author SHA1 Message Date
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 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 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 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 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 03666d2365 (trunk libT) #4173 "Crashing with r12315 in Debian" -- possible fix? 2011-04-07 06:56:31 +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 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 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
Jordan Lee 65f0f3effd (trunk libT) copyediting: peer-io's "EncryptionMode" type had a name too similar to tr_encryption_mode... rename it to reduce potential confusion 2011-03-31 16:41:52 +00:00
Jordan Lee 72c55fcdd8 (trunk libT) safeguard against a minor memory leak if io->sokcet couldn't be opened. 2011-03-29 21:09:37 +00:00
Jordan Lee 7445be9a53 (trunk libT) whoops, remove 4 debugging fprintf()'s from the previous commit 2011-03-28 16:33:40 +00:00
Jordan Lee 83c0e4f011 (trunk libT) break the mac build and introduce new crashes.
This is partially to address #4145 "Downloads stuck at 100%" by refactoring the bitset, bitfield, and tr_completion; however, the ripple effect is larger than usual so things may get worse in the short term before getting better.

livings124: to fix the mac build, remove bitset.[ch] from xcode
2011-03-28 16:31:05 +00:00
Jordan Lee bd88521332 (trunk) yet more "#include" tweaks 2011-03-25 15:03:42 +00:00
Jordan Lee 1b825079be (trunk libT) API cleanup of the tr_address functions to make them more consistent.
This is loosely related to #2910, but only in the sense of laying the groundwork for #2910's fix...
2011-03-25 05:34:26 +00:00
Jordan Lee 87ef45cf3d (trunk libT) copyediting: remove a bunch of seemingly-unneeded network headers in net.[ch].
I'm less certain that these are unneeded because networking APIs seem to have more variation between platforms, but it's better to remove the cruft and then add back whatever headers $PLATFORM users complain about, than to not remove the cruft at all...
2011-03-24 22:57:39 +00:00
Jordan Lee f7005889d1 (trunk libT) copyediting: clean up the "#include <event2/*>" directives in libtransmission's header files 2011-03-24 22:45:04 +00:00
Jordan Lee 375694eda9 (trunk) copyediting: remove some unneeded #includes, and annotate some needed ones 2011-03-24 21:49:42 +00:00
Jordan Lee b4d36aeb54 (trunk) #4138 "use stdbool.h instead of tr_bool" -- done. 2011-03-22 15:19:54 +00:00
Jordan Lee 757dac11ef (trunk libT) cpu load improvements based on profiling by gunzip 2011-03-15 18:11:31 +00:00
Jordan Lee 3cfef5eded (trunk libT) #117 "UDP tracker protocol support" -- working implementation; needs testing and valgrinding and review. 2011-03-13 00:18:11 +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 c6f52ecb11 remove a handful of unnecessary casts 2011-03-03 19:56:44 +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
Juliusz Chroboczek 352981ee03 Remove obsolete UNUSED marker. 2011-02-18 21:55:42 +00:00
Juliusz Chroboczek e7fc697c90 Stub out UTP_Create in non-uTP builds. 2011-02-18 16:01:52 +00:00
Jordan Lee cba90ccace (trunk libT) add stubs for UTP_Drained() and UTP_Write() to remove a few #ifdefs from peer-io.c 2011-02-18 01:18:51 +00:00
Jordan Lee cd04051de8 add configure script switch to enable/disable utp 2011-02-18 00:45:44 +00:00
Juliusz Chroboczek cc96b12bbc Fix typo. 2011-02-18 00:43:21 +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
Jordan Lee 71486f8c86 call UTP_RBDrained when our read buffer is empty 2011-02-18 00:40:38 +00:00
Jordan Lee e4b4812caa add dbgmsg statements to peer-io's uTP code 2011-02-18 00:40:22 +00:00
Jordan Lee 9626aa4506 uTP peers need tr_peerIoFlush() to work during the handshake phase. 2011-02-18 00:40:01 +00:00
Jordan Lee f6a85cb16b implement bandwidth limiting for uploads to uTP peers 2011-02-18 00:39:33 +00:00
Juliusz Chroboczek 3c56dbea2a Remove more debugging messages. 2011-02-18 00:36:36 +00:00
Juliusz Chroboczek f33a772b00 Call didWriteWrapper in utp_on_write. 2011-02-18 00:36:33 +00:00
Juliusz Chroboczek c9c2ad7c57 Don't use read_enabled in get_rb_size.
We're no longer maintaining read_enabled, as there are simpler ways of
doing the same.  Additionally, we used RBDrained incorrectly.
2011-02-18 00:36:27 +00:00
Juliusz Chroboczek 77c034122e Revert "Maintain information about enabled/disabled I/O."
This reverts commit 604f8fd10db747e57d8710cc53326c0e114ad32c.
2011-02-18 00:36:24 +00:00
Juliusz Chroboczek c9a7becf87 Remove debugging messages. 2011-02-18 00:36:21 +00:00
Juliusz Chroboczek 88f4eac81f Implement outgoing uTP connections. 2011-02-18 00:36:19 +00:00
Juliusz Chroboczek 11114a74c0 Fix peerIoReconnect for uTP sockets. 2011-02-18 00:36:12 +00:00
Juliusz Chroboczek dae7db8e10 Implement pacing of reads.
This should cause uTP sockets to respect read bandwidth limits.  I'm not so
sure about the values we return for the read buffer size -- perhaps we
should allow some slack for network latency?
2011-02-18 00:36:09 +00:00
Juliusz Chroboczek d347f5ada4 Maintain information about enabled/disabled I/O. 2011-02-18 00:36:07 +00:00
Juliusz Chroboczek 236fb3d9d6 Set the read buffer of UTP sockets to a well-defined value. 2011-02-18 00:36:05 +00:00
Juliusz Chroboczek 80677b3730 Compute accurate overhead for uTP packets. 2011-02-18 00:36:02 +00:00
Jordan Lee 3a7806a7cc (trunk libT) silence compiler warnings 2011-02-18 00:32:39 +00:00
Jordan Lee 7df7d34f6d automake/autoconf; #includes in libtransmission 2011-02-18 00:32:19 +00:00
Juliusz Chroboczek 5a2710c9da Use dummy callbacks in peerIoReconnect. 2011-02-18 00:24:45 +00:00
Juliusz Chroboczek 44e6e4a8f2 Tweak dummy callbacks.
Don't abort, just log a message and continue.
2011-02-18 00:24:40 +00:00