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
Juliusz Chroboczek
4d5f8dbb92
Don't call UTP_Close multiple times.
...
Greg says it's evil.
2011-02-18 00:24:36 +00:00
Juliusz Chroboczek
eb715e8018
Shutdown UTP socket on short write.
2011-02-18 00:24:30 +00:00
Juliusz Chroboczek
c9bbab05ee
Schedule a uTP write in peerIoWriteBuf.
2011-02-18 00:24:28 +00:00
Juliusz Chroboczek
1090e5a262
Complete the uTP callbacks.
2011-02-18 00:24:22 +00:00
Juliusz Chroboczek
6313eb4703
Add dummy UTP callbacks.
...
Libutp will sometimes call our callbacks after we called UTP_Close,
notably to notify us of the UTP_STATE_DESTROYING state change, but
also, for some reason, to ask us about our read buffer. The simplest
way to avoid issues with that is to switch to a second set of callbacks.
2011-02-18 00:24:18 +00:00
Juliusz Chroboczek
5563729d61
Add assertions to libevent callbacks.
...
They should never be called with a UTP socket.
2011-02-18 00:24:15 +00:00
Juliusz Chroboczek
18f1ddb7aa
First pass at uTP callbacks.
2011-02-18 00:24:13 +00:00
Juliusz Chroboczek
5ad27d82cf
Fix io_dtor for uTP sockets.
2011-02-18 00:24:09 +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
984ac1b92e
(trunk libT) fix compiler warning: "peer-io.h:282: warning: inlining failed in call to ‘evbuffer_add_uint8’: optimizing for size and code size would grow"
2011-02-09 02:35:16 +00:00
Jordan Lee
0bd1ec8de8
(trunk libT) #3991 "connection encryption stopped working" -- silence minor compiler warning. patch by ijuxda.
2011-02-09 02:26:35 +00:00
Jordan Lee
394fed632f
(libT) #3991 "Connection encryption stopped working" -- fixed.
...
This is a pretty straightfoward bug: the call to evbuffer_peek() should not have been wrapped in assert().
2011-02-08 00:31:50 +00:00
Jordan Lee
fc1c5fe553
(trunk libT) silence some unused variable warnings from gcc when building with -DNDEBUG
2011-02-02 05:18:33 +00:00
Jordan Lee
8f69a33c79
(trunk libT) #3836 "libevent 2 support" -- fix minor memory leak.
...
tr_peerIoReconnect() was calling event_del() rather than event_free() on its io.event_read and io.event_write fields, causing those fields to be leaked. This behavior is new with libevent 2 support and doesn't affect transmission 2.1x or older.
2011-02-01 17:12:20 +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
bcb83b4577
(trunk libT) #3921 "no overhead for reads" -- fixed. thanks to jch for reporting this.
2011-01-20 00:31:46 +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
007b96a62f
(trunk libT) #3894 "tr_peerIo.hasFinishedConnecting should be removed" -- committed.
2011-01-13 01:58:57 +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
Charles Kerr
dc5a61be49
(trunk libT) #3836 "libevent2 support" -- silence a pair of 'unused variable' compiler warnings
2010-12-20 12:49:12 +00:00
Charles Kerr
345b14adbc
(trunk) #3836 "libevent2 support" -- bump libevent2 requirement to 2.0.10. This will break the Mac build for a minute intil BMW applies his Mac patch
2010-12-20 02:07:51 +00:00
Charles Kerr
9335e02e6d
(trunk libT) add some new bugs to the code so that it will crash when vraa tries to use it
2010-11-11 15:31:11 +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
8d15c48a3f
(trunk libT) #3617 "1000+ warnings of 'inlining failed' in libtransmission when compiled with gcc 4.4.4" -- fixed.
2010-10-11 15:41:27 +00:00
Charles Kerr
cdcc4705aa
(trunk) #3045 "make libtransmission's API byte-oriented instead of KiB-oriented." -- implemented. This is a largish commit and will break the mac build for a little while.
2010-07-03 00:25:22 +00:00
Charles Kerr
954a309d8f
(trunk) #3311 "MingW build of Transmission" -- apply more of rb07's diffs, though edited to lessen the inevitable #ifdefs
2010-06-30 21:24:36 +00:00
Charles Kerr
254a1f15cb
(trunk libT) down the rabbit hole: various minor type correctness changes unearthed by -Wconversion
2010-06-30 16:40:19 +00:00
Charles Kerr
b0b9e17032
(trunk libT) define MAX_BLOCK_SIZE once instead of in a handful of places
2010-05-26 15:23:21 +00:00
Charles Kerr
8433e0dd3b
(trunk libT) make tr_peerIoEnable*() inline functions
2010-05-20 15:30:18 +00:00
Charles Kerr
efe648e2d7
(trunk libT) fix a new assertion error from the nightlies reported by Ryoujin
2010-04-27 13:43:03 +00:00
Charles Kerr
52bad7b8a0
(trunk libT) #3164 "crash in tr_peerIoReconnect()" -- after attempting to reconnect, re-enable the libevent monitoring if the socket can't be created.
2010-04-23 23:48:52 +00:00
Charles Kerr
4f5670f9c0
(trunk libT) #2842 "Transmission crashes randomly on ARM-based Synology NAS" -- experimental commit based on giovannibajo's suggestion in comment:39 about the list struct's alignment
2010-04-23 23:45:44 +00:00
Charles Kerr
559af38e7b
(trunk libT) #3162 "allow optional end-user configuration of TCP_CONGESTION" -- minor tweak removing a little bit of code duplication in r10508
2010-04-22 02:04:43 +00:00
Charles Kerr
00f452d942
(trunk libT) #3162 "allow optional end-user configuration of TCP_CONGESTION" -- add jch's implementation of this to trunk for 2.00
2010-04-22 01:49:16 +00:00
Charles Kerr
22320d2356
(trunk libT) fix potential NULL pointer dereference in libtransmission
2010-03-02 04:51:40 +00:00
Charles Kerr
fad8f285a8
(trunk libT) use jch's suggestion of having a per-session page-aligned memory buffer for general reuse. ( http://trac.transmissionbt.com/ticket/2551#comment:5 )
2010-02-23 07:20:57 +00:00
Charles Kerr
8e16b74dad
(trunk libT) #2775 "Saving some memory/storage" -- committed for 1.80
2010-01-20 18:48:52 +00:00
Charles Kerr
5b4ec24deb
(trunk libT) tweak the peer-io bugfix
2010-01-18 19:26:46 +00:00
Charles Kerr
fd9021b655
(trunk libT) #2416 "crash in event_queue_insert()" -- this crash is definitely happening when we call event_del() twice on the same event without an event dispatch pass between the two calls. Start nailing down every possible case where that could happen in libtransmission
2010-01-17 19:21:04 +00:00
Charles Kerr
5c26afdb52
happy new year!
2010-01-04 21:00:47 +00:00
Charles Kerr
6f68e30f37
(trunk libT) consistency tweak: rename tr_global{Lock,Unlock,IsLocked} as tr_session{Lock,Unlock,IsLocked}
2010-01-04 09:05:02 +00:00
Charles Kerr
196666da72
(trunk libT) fix minor bug in r9651 "Reduce SO_RCVBUF for outgoing peer connections on seeding torrents" -- remember the "isSeed" attribute so that we can use it on reconnects
2009-12-28 23:24:00 +00:00
Charles Kerr
f4c744266f
(trunk libT) #2667 "ignore martian addresses" -- modified this ticket. previously we ignored them from LTEP; now we ignore them regardless of the source. this commit implements this filtering change.
2009-12-15 17:39:19 +00:00
Charles Kerr
1c772bd1fe
(trunk libT) finally get rid of the last remnants of tr_timer
2009-12-10 05:52:46 +00:00
Charles Kerr
78ead8c3dd
(trunk) update the copyright notices
2009-12-05 02:19:24 +00:00
Charles Kerr
6eec59008c
(trunk libT) experimental: Reduce SO_SNDBUF and SO_RCVBUF for tracker announce/scrape messages. Reduce SO_RCVBUF for outgoing peer connections on seeding torrents.
2009-12-02 05:30:46 +00:00
Charles Kerr
e1c6b792aa
(trunk libT) #2610 "avoid unnecessary calls to time(NULL)"
2009-11-26 18:47:08 +00:00
Charles Kerr
c85ee09fef
(trunk) trunk's just been too stable lately. #2119 : reload settings.json on SIGHUP
2009-10-23 03:41:36 +00:00
Charles Kerr
0fd817b757
(trunk libT) more assertions to help find the cause of #2480
2009-10-10 17:37:34 +00:00
Charles Kerr
cb79214854
(trunk) remove trailing spaces
2009-08-10 20:04:08 +00:00