Jordan Lee
fee784f1d8
(trunk) #4081 "Add 'cookieString' argument 'torrent-add' method in RPC" -- done.
2011-03-15 04:22:47 +00:00
Jordan Lee
b46d3a2713
(trunk libT) #117 "UDP tracker protocol support (BEP #15 )" -- refactor announcer.c so that alternate tracker protocols can be supported.
...
This commit adds a set of package-visible structs and functions to allow delegating announces and scrapes to different protocol handlers. (Examples: struct tr_announce_request, struct tr_announce_response, struct tr_scrape_request, struct tr_scrape_response.) HTTP is the only protocol handler currently implemented; however, this provides a clean API for other protocol handlers, and having this in trunk will help shake out any bugs in this refactoring.
In addition, logging via the TR_DEBUG_FD environment variable is vastly improved in the announcer module now.
2011-03-11 04:19:01 +00:00
Jordan Lee
1ccdb1a797
(trunk libT) web.c: free the unprocessed tasks before exiting the libcurl thread.
...
This is rare but can happen during shutdown if there are unresponsive trackers. Cleaning up the tasks improves the S/N ratio in valgrind a bit.
2011-02-21 01:13:28 +00:00
Jordan Lee
716a3c90c2
(trunk) #4032 "Better error detection / reporting in http announces" -- added to trunk.
...
This patch adds two new flags to the callback function -- did_connect and did_timeout -- that are calculated inside of web.c using information from libcurl. This allows the announcer to detect timeouts more accurately and also to distinguish between unresponsive peers (which get the preexisting "Tracker did not respond" error message) and unconnectable peers (which get a new error message, "Could not connect to tracker").
2011-02-17 02:26:24 +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
e12788c626
(trunk libT) fix formatting error in a couple of old calls to dbgmsg()
2011-01-12 05:05:48 +00:00
Jordan Lee
6dc03f471e
(trunk libT) #3519 "webseeds don't work" -- fixed.
2011-01-06 01:00:21 +00:00
Charles Kerr
a17962d5fc
(trunk libT) #3528 "TR_PREFS_KEY_BIND_ADDRESS_IPV4 breaks IPv6-only trackers" -- Implement suggestion #2 from Harry
2010-12-30 19:15:47 +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
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
0e9247b84a
(trunk) #3817 "use the OS' proxy support" -- implemented for libtransmission, transmission-gtk
2010-12-10 18:51:05 +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
22c622a92f
(trunk) #3688 "remove proxy support" -- remove from libtransmission
2010-10-31 17:05:31 +00:00
Charles Kerr
5725b7c922
(trunk) #3663 "clang warnings in 2.11" -- fixed.
2010-10-24 05:52:38 +00:00
Charles Kerr
18498e9c41
(trunk libT) #3077 "add support for cookies files"
2010-09-09 18:28:20 +00:00
Charles Kerr
75b07909b7
(trunk libT) hm, this debugging line wasn't supposed to get checked in...
2010-08-10 11:43:29 +00:00
Charles Kerr
99bb470658
(trunk libT) when shutting down, use a shorter timeout interval for tracker announces
2010-08-07 02:17:29 +00:00
Charles Kerr
8b386a63b1
(trunk libT) #3311 "MingW build of Transmission" -- added rb07's revisions to my revisions to his diff. :P
2010-07-01 04:00:41 +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
98cec85e46
(trunk libT) #3311 "MingW build of Transmission" -- apply further win32 diffs from rb07
2010-06-25 20:36:10 +00:00
Charles Kerr
d43e284961
(trunk libt) #3311 "MingW build of Transmission" -- possible win32 fix for the curl thread's select() call. probably broken... :)
2010-06-25 01:31:25 +00:00
Charles Kerr
4b5044ad28
(trunk libT) #3117 "Tracker queries do not honor bind-address-ipv4" -- possible fix
2010-04-28 00:32:43 +00:00
Charles Kerr
089f9c5f11
(trunk libT) #3140 "Transmission doesn't build with Curl 7.15.5" -- fixed in trunk for 2.00
2010-04-15 15:32:36 +00:00
Charles Kerr
ced3e2672f
(trunk libT) poke at the newfound 100% cpu bug
2010-03-06 20:15:23 +00:00
Charles Kerr
ee4a29d200
(trunk libT) #2987 minor correction to r10303 -- silence a compiler warning and turn off some debug messages that printed to stderr.
2010-03-06 15:27:18 +00:00
Charles Kerr
e8cb5367e1
(trunk libT) #2987 "push libcurl into its own worker thread" -- committed to trunk
2010-03-06 15:05:05 +00:00
Charles Kerr
446379a464
(trunk libT) #2964 "Multiple simultaneous DNS resolve operations fail on some platforms causing unnecessary delays in successful announces" -- fixed in trunk for 1.92. Thanks to gongloo for the patch.
2010-03-01 15:29:28 +00:00
Charles Kerr
71ed8193b8
(trunk libT) (1) reduce the default tracker announce timeout from 120 to 90 seconds. (2) for partial seeds, send an event=paused when we transition from being leeches to partial seeds, just as you would send an event=completed when becoming a seed
2010-02-20 21:03:49 +00:00
Charles Kerr
5a9a07b71e
(trunk) #2938 "crash when adding a torrent by URL from an ftp source over RPC" -- fixed in trunk for 1.91
2010-02-20 15:57:05 +00:00
Charles Kerr
069d092301
(trunk libT) #2924 "1.90 crashes on startup" -- more changes in the vein of r10233
2010-02-20 03:41:47 +00:00
Charles Kerr
483086ef3d
(trunk libT) #2924 "1.90 crashes on startup" -- fix typo from previous commit r10233 :/
2010-02-20 01:22:10 +00:00
Charles Kerr
2f86872b0f
(trunk libT) #2924 "1.90 crashes on startup" -- another experimental fix, inspired by the suggestion in http://forum.transmissionbt.com/viewtopic.php?p=45027&sid=9cfe1679bebdefb27dd288010cbff80d#p45027 that the bug may have been introduced in r10089.
2010-02-20 01:11:55 +00:00
Charles Kerr
1230a30991
(trunk libT) #2924 "1.90 crashes on startup" -- revert r10230's experimental code; it didn't work :(
2010-02-19 17:08:13 +00:00
Charles Kerr
761547d1d2
(trunk libT) #2924 "1.90 crashes on startup" -- experimental commit
2010-02-19 07:04:54 +00:00
Charles Kerr
9fffb2be35
(trunk libT) Yippie, plug a small memory leak reported by valgrind!
2010-02-10 05:27:14 +00:00
Charles Kerr
a95aae5591
(trunk) as promised, remove the announce logging code. now safe for general-purpose nightly build testing again.
2010-02-10 04:50:21 +00:00
Charles Kerr
acc8e64102
(trunk) another test build that logs tracker announces to a file in /tmp, so you probably shouldn't use it unless I've asked you to. After hudson-t is done building a debug dmg of this, I'll commit r10155 to remove the logging code
2010-02-10 04:35:59 +00:00
Charles Kerr
2cbfe53717
(trunk libT) #2887 "dangling pointer in 1.81" -- fixed in trunk for 1.90 / 1.8x
2010-02-10 03:26:19 +00:00
Charles Kerr
a8a5a6cae5
(trunk) revert that last commit, which was only intended for about a dozen people. Unless you're one of them (and you don't know, then you're not) DON'T USE r10145. r10145 -- **ONLY** r10145 -- stored user's tracker announces to a logfile in /tmp.
2010-02-09 02:46:40 +00:00
Charles Kerr
8e51476258
pulling my hair out.... gaaaah
2010-02-09 01:47:16 +00:00
Charles Kerr
8b3fb8a5e8
(trunk libT) #2854 "`tracker did not respond' errors" -- lengthen the time we wait before timing out. This was shortened not too many releases ago to prevent a logjam from dead tpb tracker announces; however, we now have better ways of doing that and the short deadline may be contributing to the "did not respond" errors.
2010-02-05 04:54:08 +00:00
Charles Kerr
d118db0f37
(trunk libT) remove dead announce fields like supportscrypto and requirescrypto. these don't appear to be supported by any of the major clients so why waste the announce bandwidth...
2010-02-03 06:32:14 +00:00
Charles Kerr
5014319622
(trunk libT) experimental commit for faster tracker announces
2010-02-03 03:38:13 +00:00
Charles Kerr
931558aea3
(trunk libT) fix DNS timing issue reported by gn0s1s in irc
2010-01-28 18:25:18 +00:00
Charles Kerr
dd41b5c257
(trunk libT) #2819 "announce URLs containing raw IP addresses won't announce/scrape in 1.82" -- possible fix
2010-01-28 17:24:23 +00:00
Charles Kerr
a334b422c3
(trunk) remove unnecessary #includes
2010-01-28 13:33:40 +00:00
Charles Kerr
a888c4d425
(trunk libT) web.c: add a cache for unresolvable hostnames
2010-01-27 06:40:12 +00:00
Charles Kerr
3ace0afaae
(trunk libT) #2792 "since 1.80 update downloads failing" -- try to handle non-resolving tracker addresses without blocking in curl
2010-01-26 07:22:50 +00:00
Charles Kerr
c2adab97b2
(trunk libT) fix typo from prev commit
2010-01-25 04:26:08 +00:00
Charles Kerr
4164b17977
(trunk libT) extend the lifespan of the cached DNS entries
2010-01-25 04:24:48 +00:00
Charles Kerr
1d1b09b75b
(trunk libT) #2804 "segmentation fault add-by-url when url scheme is ftp" -- fixed in trunk for 1.83
2010-01-25 04:00:08 +00:00
Charles Kerr
ae966e0725
(trunk libT) increase the announce timeout from 30 seconds to 45 seconds.
2010-01-24 23:32:49 +00:00
Charles Kerr
7e5e4db797
(trunk libT) #2783 "blocklist is empty" -- fix this 1.82 regression. apparently update.transmissionbt.com doesn't like it when you make the ":80" in the Host: header explicit instead of implicit... so probably other web servers have the same problem too.
2010-01-24 19:22:22 +00:00
Charles Kerr
d97a04b001
(trunk libT) when adding the Host: header by hand, make include the host's port
2010-01-23 07:51:51 +00:00
Charles Kerr
2be24ec9a8
(trunk libT) #2783 "starting with r9992, IP blocklist is empty" -- when replacing a URL's hostname with an IP address before passing the URL to curl, manually set the Host: header to the original hostname. (Xref: #2781 )
2010-01-22 07:27:19 +00:00
Charles Kerr
0f6214d9ae
(trunk libT) if we're calling evdns_init(), we probably ought to call evdns_shutdown() on exit...
2010-01-22 03:39:21 +00:00
Charles Kerr
1f44272678
(trunk libT) #2781 "1.80 freezes on startup" -- possible fix. implement nonblocking dns before we hand the URLs over to libcurl
2010-01-22 02:40:11 +00:00
Charles Kerr
e2feb075b9
(trunk libT) reinstate proxies in the http announce
2010-01-10 20:15:56 +00:00
Charles Kerr
2ac553361a
(trunk libT) #2416 "crash in event_queue_insert" -- I think this is happening if we queue up two changes, one to listen for read/write, and then a second one to delete the polling, in kqueue's event mechanism, at libcurl's request. Let's try disabling kqueue in libevent and use poll/select instead.
2010-01-10 19:52:01 +00:00
Mitchell Livingston
14da64ec06
assorted small cleanup and log removal
2010-01-10 16:26:30 +00:00
Mitchell Livingston
5af45426d4
random code optimization: when escaping http, use an if with a lot less comparisons rather than a switch
2010-01-10 14:56:04 +00:00
Mitchell Livingston
8f6e1dedf5
revert r9505, which appears to cause a crash on launch
2010-01-10 14:36:53 +00:00
Charles Kerr
5a60e4549d
(trunk libT) #2416 "crash in event_queue_insert" -- another guess, based on the idea that we might queue two actions (one to insert, one to delete) on the same event before libevent's dispatcher is invoked
2010-01-10 08:53:17 +00:00
Charles Kerr
69cb1362e3
(trunk libT) #2416 "crash in event_queue_insert" -- see if we can get the program to crash in a different way.
2010-01-09 07:27:45 +00:00
Charles Kerr
0bb355d8df
(trunk libT) #2416 "crash in event_queue_insert" -- continue throwing the kitchen sink at this ticket. (1) disable proxies to see if that makes any difference (2) rearrange the sequencing in sock_cb() to unconditionally delete the active event before doing anything else (3) use a libevent timer instead of CURLOPT_TIMEOUT to workaround curl bug http://tinyurl.com/ycm5d3e
2010-01-08 21:45:56 +00:00
Charles Kerr
5c26afdb52
happy new year!
2010-01-04 21:00:47 +00:00
Charles Kerr
339173d1b4
(trunk libT) make sure to restart curl's periodic timer
2010-01-04 20:06:39 +00:00
Charles Kerr
8ae3911477
(trunk libT) #2416 "crash in event_queue_insert" -- I am really quite sick of this bug. It's not reproducible at all under Linux and appears to be a bug in libevent's kqueue implementation. In this commit, we leak the event object on OS X.
2009-12-29 00:00:33 +00:00
Charles Kerr
6151881a03
(trunk libT) #2416 "crash in event_queue_insert" -- instead of freeing libevent's event objects, pool and reuse them. *sigh*
2009-12-28 23:29:59 +00:00
Charles Kerr
ee58472ec2
(trunk libT) fix minor bug in r9651 "Reduce SO_SNDBUF and SO_RCVBUF for tracker announce/scrape messages" -- libcurl's CURLOPT_SOCKOPTFUNCTION doesn't return void; it returns an int that is nonzero if an error occurs.
2009-12-28 23:25:50 +00:00
Charles Kerr
ac202f13bb
(trunk libT) remove dead code -- tr_assert()
2009-12-28 23:11:26 +00:00
Charles Kerr
bc86c0b364
(trunk libT) #2416 "crash in event_queue_insert" -- maybe this will finally fix it...
2009-12-26 23:57:25 +00:00
Charles Kerr
8903e1b4e3
(trunk libT) #2416 "crash in event_queue_insert" -- another experimental commit. /as an experiment/ let's just leak that event struct and see if that makes the crash go away. Obviously leaking those objects is not a long term fix but this will help point the way towards the real fix.
2009-12-24 18:50:34 +00:00
Charles Kerr
b8d7e76750
(trunk libT) #2416 "crash in event_queue_insert" -- possible fix. it looks like the kqueue client is accessing the event after the callback and after event_del() is being called. *If* that's the case I don't know if it's a libevent bug or if libtransmission is making assumptions it shouldn't've... but it's easy enough to keep the memory in a pool and free it later when it's safer to do so.
2009-12-23 16:12:18 +00:00
Charles Kerr
ef650d0398
(trunk libT) it certainly smells like we're using freed memory in the libcurl + libevent code in web.c... let's trash the structures right before free()ing them
2009-12-18 17:32:16 +00:00
Charles Kerr
0601442f58
(trunk libT) #2416 "crash in event_queue_insert" -- another stab at fixing this. yay
2009-12-14 18:24:26 +00:00
Charles Kerr
87aefaf5ff
(trunk libT) #1699 "announce to multiple trackers at once" -- fix minor bug in reporting scrape results when an announce returns enough information that a separate scrape isn't necessary.
2009-12-14 17:17:05 +00:00
Charles Kerr
ee0de4b06c
(trunk libT) keep simplifying web.c... is there anything left to strip out?
2009-12-14 14:25:22 +00:00
Charles Kerr
c33aef7e2d
(trunk libT) more web.c simplification + handle an unhandled case CURL_POLL_NONE in the socket callback.
2009-12-14 12:54:30 +00:00
Charles Kerr
2653cd5153
(trunk libT) keep simplifying web.c. also, fix an improbable FMR at shutdown
2009-12-14 05:11:33 +00:00
Charles Kerr
6d9e6ececc
(trunk libT) remove some more obsolete debug messages and other cruft from web.c
2009-12-13 19:33:02 +00:00
Charles Kerr
485b64a5e3
(trunk libT) it never ends
2009-12-13 17:54:01 +00:00
Charles Kerr
a89d2217af
(trunk libT) #2416 "crash in event_queue_insert()"
2009-12-11 15:41:34 +00:00
Charles Kerr
5f1f2b1e85
(trunk libT) use curl_multi_socket_action(), even on OS X.
2009-12-10 19:05:21 +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
63027e1d5a
(trunk libT) resolve "noslashes" vs "keep_slashes" variable name inconsistency between the declaration and the definition of tr_http_escape()
2009-11-29 08:05:47 +00:00
Charles Kerr
9383a6abfd
(trunk libT) #2096 : add code magnet URL parser and unit tests
2009-11-20 04:38:19 +00:00
Charles Kerr
44df1d5548
(trunk libT) #2112 : provide "ipv6=" parameter to trackers
2009-11-10 17:03:23 +00:00
Charles Kerr
55c59fa478
(trunk) fix r9380 #2412 timing issue
2009-10-23 05:48:56 +00:00
Charles Kerr
9affe9ef59
(trunk libT) #2412 : tracker query should use bind address
2009-10-22 05:15:34 +00:00
Charles Kerr
459bea37f9
(trunk libT) remove a couple more debugging printf() calls
2009-09-26 13:21:46 +00:00
Charles Kerr
86ada18266
(trunk)
...
#1699 : Announce to multiple trackers at once
#2424 : Tracker address is not listed in GTK client.
2009-09-25 21:05:59 +00:00
Charles Kerr
172d64c32c
(trunk libT) #2416 : possible fix for 'crash in event_queue_insert' on Snow Leopard
2009-09-23 15:28:11 +00:00
Charles Kerr
3524ae637e
(trunk libT) sync the announce/scrape timeout intervals in trunk with those in 1.7x
2009-09-08 18:39:20 +00:00
Charles Kerr
bd41421591
decide at runtime, rather than compile time, whether to use curl_multi_action
2009-09-08 05:18:46 +00:00
Charles Kerr
786887b147
(trunk libT) tell libcurl to set a time limit of 120 seconds for announces; 30 seconds for scrapes
2009-08-22 23:22:50 +00:00
Charles Kerr
cb79214854
(trunk) remove trailing spaces
2009-08-10 20:04:08 +00:00
Charles Kerr
24746cff7f
(trunk libT) minor #include futzing
2009-07-01 14:58:57 +00:00