Jordan Lee
53f7fbb039
(trunk libT) #3927 "Use of libevent2 evbuffer_write on files..."
...
evbuffer_write() is intended for sockets. It works for files on Unix, but not on Windows, so we can't portably use it on files. Instead, use evbuffer_pullup() + write().
2011-01-22 13:33:05 +00:00
Jordan Lee
9220ad2300
(trunk libT) #3932 "Assertion failed: (tab != NULL), function tr_torrentAvailability"
...
Looks like tab can be NULL from the Mac client when magnet links are involved and the Mac client doesn't know how many pieces are available, so that assertion's not appropriate.
2011-01-22 13:21:20 +00:00
Jordan Lee
5b382d203e
(trunk libT) #3870 "transmission doesn't recheck after getting initial 404" -- fixed.
...
The exponentially-growing interval between retries had a bug that caused intervals to be too long if no successful announce had ever been made. This commit fixes the code that calculates the interval.
2011-01-20 22:51:05 +00:00
Jordan Lee
bca543dc8e
(trunk libT) #3923 "remove redundant announcer.c debug message" -- done.
2011-01-20 20:49:09 +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
4f6d46cf99
(trunk libT) minor code tweak to crypto.c's tr_sha1() function
2011-01-19 21:50:51 +00:00
Jordan Lee
6ae426696f
tr_sha1(): remove unnecessary casts from va_arg
2011-01-19 21:43:43 +00:00
Jordan Lee
06884387da
(trunk) #3914 "strlsize() passes variable of incompatible type to the tr_formatter_size_B()" -- fixed.
2011-01-19 18:14:01 +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
ba5172150a
(trunk libT) #3912 "tr_torrentGetMetadataPercent() may return NaN" -- fixed.
2011-01-19 00:20:26 +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
Jordan Lee
a433b0c4cc
#3686 "add rpc command to cleanly shutdown daemon" -- added for libT, tr-daemon, tr-gtk, tr-remote, and the rpc spec
2011-01-15 18:12:45 +00:00
Juliusz Chroboczek
6f5ecd2ab8
Make the peer-socket-tos preference more user-friendly.
...
Possible values are now the strings default, lowcost, throughput etc.
Numeric values are used for non-standard values.
2011-01-15 17:10:54 +00:00
Jordan Lee
b2d0b673c2
(trunk libT) #2191 "NAT-PMP and UPnP should also map UDP port" -- committed patch by starix.
2011-01-15 17:06:11 +00:00
Juliusz Chroboczek
8ea2c0daa1
Make the peer-congestion-algorithm preference visible.
...
When I first implemented this code, I made the preference hidden --
unless you set it yourself, it will not appear in the sttings file.
Now that it's been documented and advertised, make it visible.
2011-01-15 16:25:24 +00:00
Jordan Lee
5c96f9ebd8
(trunk libT) fix a minor error in the log message for prefetch errors. thanks to Chinstrap for spotting this.
2011-01-15 05:34:47 +00:00
Jordan Lee
007b96a62f
(trunk libT) #3894 "tr_peerIo.hasFinishedConnecting should be removed" -- committed.
2011-01-13 01:58:57 +00:00
Jordan Lee
e12788c626
(trunk libT) fix formatting error in a couple of old calls to dbgmsg()
2011-01-12 05:05:48 +00:00
Juliusz Chroboczek
62cb43a173
Don't complain about unexpected DHT packets.
2011-01-09 23:54:54 +00:00
Juliusz Chroboczek
cc44725949
#3634 Use dht-0.17
2011-01-09 23:45:04 +00:00
Juliusz Chroboczek
1ef888f9f1
Fix incorrect usage of event_new in UDP code.
...
Apparently you need to pass session->event_base as the first argument.
2011-01-09 23:14:17 +00:00
Juliusz Chroboczek
ff0393acbc
Fix UDP error handling.
2011-01-09 23:04:56 +00:00
Juliusz Chroboczek
7af100fa7e
Update tr-{dht,udp} to libevent2.
2011-01-09 21:48:51 +00:00
Juliusz Chroboczek
6ba4ab0b21
Fix tr-udp for the no IPv6 case.
2011-01-09 21:48:48 +00:00
Juliusz Chroboczek
aa3868df06
Move handling of UDP I/O to tr-udp.c.
2011-01-09 21:48:46 +00:00
Juliusz Chroboczek
0d8c10716c
Use the dht-0.16 API in tr-dht.c.
...
Recvfrom is now done outside the dht code, which makes it possible to share
the socket with UTP.
2011-01-09 21:48:43 +00:00
Juliusz Chroboczek
abcd56c034
Move creation of the UDP sockets to tr-udp.c.
2011-01-09 21:48:36 +00:00
Juliusz Chroboczek
89aa3bb58e
Implement tr_dhtInit and Uninit, use it in session.c.
2011-01-09 21:48:33 +00:00
Juliusz Chroboczek
95f038521c
Update copyright notices.
2011-01-09 21:48:24 +00:00
Juliusz Chroboczek
8c02d6ce1f
Add files tr-udp.[ch] to the build.
2011-01-09 21:48:06 +00:00
Juliusz Chroboczek
5b2948cd17
Improve error messages in tr-dht.c.
2011-01-08 02:12:23 +00:00
Juliusz Chroboczek
fe2fd2efcf
Avoid a descriptor leak when binding the IPv6 DHT socket fails.
2011-01-08 01:09:12 +00:00
Jordan Lee
1cd74312ba
(trunk libT) minor code cleanup in fdlimit.c
2011-01-07 00:17:13 +00:00
Jordan Lee
92d1dfcfbf
(trunk libT) very minor code cleanup -- use an enum instead of magic numbers, etc.
2011-01-06 15:12:12 +00:00
Jordan Lee
cc428376e9
(trunk libT) in deep logging, use evbuffer_write() instead of fwrite()
2011-01-06 02:33:39 +00:00
Jordan Lee
177d60ddf2
(trunk libT) revert previous commit. that new patch generates a warning if _FILE_OFFSET_BITS isn't defined.
2011-01-06 02:31:11 +00:00
Jordan Lee
2cba0d5822
(trunk libT) Fix gzopen64 implicit declaration warning on some systems. (ijuxda ba5f6a66ad949b410464)
2011-01-06 02:27:22 +00:00
Jordan Lee
35cf5e4a32
(trunk libT) Fix posix_memalign() unused result warning. inspired by ijuxda's 08b0c5b
2011-01-06 02:17:22 +00:00
Jordan Lee
d18b1bda05
(trunk) #3875 "Typo: missing gettext macro _ in recent commit" -- fix r11602 regression discovered by ijuxda
2011-01-06 01:05:13 +00:00
Jordan Lee
6dc03f471e
(trunk libT) #3519 "webseeds don't work" -- fixed.
2011-01-06 01:00:21 +00:00
Mitchell Livingston
5a8800fda1
remove a LAZY debug message
2011-01-06 00:54:37 +00:00
Jordan Lee
fde6b36e57
(trunk libT) prevent crash on shutdown when bindinfo ptr can be NULL
2011-01-05 08:07:04 +00:00
Jordan Lee
69a3b8bbab
(trunk, daemon) #3833 "'freespace' argument for 'session-get' RPC method" -- committing patch from taem, reardon, and rb07
2011-01-05 04:41:19 +00:00
Charles Kerr
b223a33b73
(trunk libT) fix crash reported by KyleK
2011-01-03 03:01:12 +00:00
Charles Kerr
36c8843ba5
(trunk libT) #3867 "memmem(3) in Solaris 11 doesn't work as expected" -- fixed.
2011-01-02 07:56:20 +00:00