Commit Graph

265 Commits

Author SHA1 Message Date
Charles Kerr a771f34373 stagger out the reannounce messages too, just as 0.82 did, as per denisx_'s suggestion 2008-01-19 01:34:02 +00:00
Charles Kerr 737bb23743 more work on "router death": stagger out tracker scrape attempts and close a loophole in the handshake code 2008-01-19 00:28:52 +00:00
Charles Kerr 6c6228770c fix byte ordering of the port in tr_peerIoAddrStr() 2008-01-17 00:08:40 +00:00
Charles Kerr 3a6396a3cb mingw portability fixes 2008-01-10 18:52:46 +00:00
Charles Kerr 30d00fbc53 cleanup 2008-01-07 06:19:34 +00:00
Mitchell Livingston 69c4b99995 fix for [4439] 2008-01-03 18:46:33 +00:00
Charles Kerr 09ca9f6dda maybe fix i18n tracker error reported by haktar 2008-01-03 17:49:45 +00:00
Charles Kerr ce6c33b7bf set copyright info to 2008 2008-01-01 17:20:20 +00:00
Charles Kerr 970211acf0 roll back r4356 2007-12-27 22:38:53 +00:00
Charles Kerr f88eb7d771 experimental code that should make tracker interaction (especially shutdown) much faster. 2007-12-27 21:48:41 +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 6ded40d360 increase the number of tracker connections we allow during shutdown. 2007-12-13 23:43:50 +00:00
Charles Kerr 7582f4a929 (maybe) fix shutdown crash in "pulse" reported by pea_ 2007-12-13 21:48:39 +00:00
Charles Kerr de5c84a52c allocate more sockets to the tracker during shutdown to help get all the `stopped' commands done 2007-12-13 21:08:05 +00:00
Charles Kerr c4e6a04131 tweak the debug messages 2007-12-13 17:18:35 +00:00
Charles Kerr 481a210e82 fix tracker connection error reported by Gimp_ 2007-12-05 02:06:05 +00:00
Charles Kerr 0e1e7efd3b take inspiration from Solomon when handling odd tracker errors that confuse tracker's request queue: stop the torrent.
when the tracker gives us errors that confuse the tracker work queue,
2007-11-30 23:37:44 +00:00
Charles Kerr f2a08d272f be more forgiving of tracker failure 2007-11-30 17:10:33 +00:00
Charles Kerr f9670dc7ac throw away all pending `scrape' requests on shutdown... we don't need them then, so they just slow us down 2007-11-29 02:31:21 +00:00
Charles Kerr 827dc86bb4 rewrite the tracker code. this should improve and/or fix a number of bugs, including "too many open files", "router death", "slow internet", and the mutex release crash. 2007-11-29 00:43:58 +00:00
Charles Kerr 0663c4aef7 possible fix for Zeph's "too many open files" bug report. 2007-11-26 21:26:01 +00:00
Charles Kerr 18b3b388c0 fix oops from last commit 2007-11-23 03:01:13 +00:00
Charles Kerr 5ad14e4abc fix another 0.94 prerelease crash report... this one from when finishing verifying a torrent that's running. 2007-11-23 02:49:06 +00:00
Charles Kerr cc42c8aaf6 fix tracker redirect bug reported by sunny 2007-11-15 14:34:48 +00:00
Charles Kerr 4cb16901b8 fix tracker wart reported by tiennou 2007-11-10 16:00:59 +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 71f4efcbad update our #includes now that libevent has cleaned up event.h 2007-11-07 18:26:19 +00:00
Charles Kerr 9df263326d use Thomas Bernard's miniupnp library instead of rolling our own. 2007-11-06 16:02:50 +00:00
Charles Kerr 1f607e0560 improve the "can't connect to tracker" error message. 2007-10-26 16:39:00 +00:00
Mitchell Livingston b48967245d trunk: Ensure only a single "?" is used for appending arguments to the announce and scrape URL (fixes #411) 2007-10-25 16:52:12 +00:00
Charles Kerr 50c8c88c04 Update the credits 2007-10-23 14:00:17 +00:00
Charles Kerr a5946e396c tweak the logging a bit. 2007-10-22 18:52:36 +00:00
Charles Kerr e1fbd16941 fix some memory leaks reported by valgrind. 2007-10-22 14:15:16 +00:00
Charles Kerr 8d4ff5818c Add support for the MSE Tracker Extension (suggested by barry_u and persept) 2007-10-20 20:27:37 +00:00
Charles Kerr 78b5c81253 possibly fix r3457 crash reported by chrissturm 2007-10-18 19:33:29 +00:00
Charles Kerr 212470560e fix overflow error that caused timers with intervals larger than 35 minutes to be lost... which is nastier than it sounds, since that's shorter than many tracker announce intervals. 2007-10-18 18:32:58 +00:00
Charles Kerr 6cef3fd9f9 remove fprintf that snuck in. (Reported by Gimp) 2007-10-18 03:57:19 +00:00
Charles Kerr e723a5724c added debugging messages to the tracker cleanup. better error handling for esoteric http errors. 2007-10-18 03:55:55 +00:00
Charles Kerr 9da5aaef2c huge tracker cleanup for the "no response from tracker" issue 2007-10-17 18:59:58 +00:00
Charles Kerr ea5390296d Follow uTorrent 1.8's behavior of allowing a manual reannounce every max(60 seconds, min_interval) where min_interval is from the tracker. 2007-10-17 01:17:30 +00:00
Charles Kerr 00321c4eed Fix crash-on-exit reported by Gimp_ @ http://pastebin.ca/732759 2007-10-11 14:56:50 +00:00
Charles Kerr 2f46064e33 raise the `numwant' value 2007-10-09 18:29:10 +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 c88ef608c6 extra paranoia to safeguard against a possible tracker crash 2007-10-09 03:06:54 +00:00
Charles Kerr e10e44409a fix crash reported by Waldorf in http://pastebin.ca/729980 2007-10-08 19:09:20 +00:00
Charles Kerr 7ff8284976 give trackers more time before timing out the requests. make the `stopping' timeout interval smaller than other intervals so that we don't block for too long during shutdown. 2007-10-08 17:05:39 +00:00
Charles Kerr 304f9f7f18 get rid of a confusing error message that describes a harmless situation 2007-10-07 16:25:02 +00:00
Charles Kerr 1014e633ac * don't reuse http connections to trackers. I think this is what caused most of the `no response from tracker X' messages.
* extra safety checks to ensure the last `stopped' message to the tracker is sent on shutdown.
2007-10-07 16:07:19 +00:00
Charles Kerr 2381279da6 fix John_Clay's ptrarray.c:201 crash. (maybe.) 2007-10-07 04:14:34 +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 0872b4f40a fix the crash reported by Waldorf and John_Clay 2007-10-04 20:31:19 +00:00
Charles Kerr 53aef0a48c Simplify the tracker/pause/close/recheck/start code. 2007-10-04 19:58:30 +00:00
Charles Kerr 7cc6771318 experimental better peer management. 2007-09-30 23:55:49 +00:00
Charles Kerr 4c990b2a7d fix tracker crash reported by bmw 2007-09-29 15:05:20 +00:00
Charles Kerr 198d2c256e fix John_Clay's tracker assertion failure. 2007-09-28 16:14:19 +00:00
Charles Kerr d3077bbce1 round 2 of minor revisions to tr_stat 2007-09-27 03:30:22 +00:00
Charles Kerr 7a15abaf7a better handling of tracker error messages. 2007-09-25 18:39:58 +00:00
Charles Kerr 4d15bbdc2a slightly less broken handling of cases where we can't bind to our listening port. 2007-09-21 05:31:29 +00:00
Charles Kerr 28bcf6204b clamp down on the flood of debug messages. 2007-09-20 23:33:46 +00:00
Charles Kerr fb70a9cca0 remove the backwards compatability typedefs at BentMyWookie's suggestion. update libT, gtk, daemon, and cli accordingly... 2007-09-20 20:14:13 +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
Charles Kerr 77e7bc4f84 make upnp's internal structures' naming schemes whallop-like 2007-08-21 20:38:34 +00:00
Charles Kerr bae07d471e added support for `corrupt' announce tag s.t. corrupted bytes don't count towards your download ratio 2007-08-21 15:17:02 +00:00
Charles Kerr 8c54b7eb46 ensure that all the tracker destruction code is done in the libevent thread, for a cleaner shutdown 2007-08-21 00:01:14 +00:00
Charles Kerr 624257c995 better cleanup on shutdown. don't crash when the torrent doesn't support scrape. (Gimp :) 2007-08-20 23:37:08 +00:00
Charles Kerr 1d6e20594d minor improvements to.. you guessed it.. the tracker/libevent code 2007-08-20 02:29:36 +00:00
Charles Kerr 47f1457d67 fix crash-on-shutdown bug reported by BentMyWookie 2007-08-19 02:55:11 +00:00
Charles Kerr 7b2a9f274a accidentally checked in a debugging statement 2007-08-19 02:23:35 +00:00
Charles Kerr 82db9f6cc9 fix a couple of more memory leaks that valgrind found 2007-08-19 00:18:43 +00:00
Charles Kerr b66efdf998 tracker tweaks 2007-08-19 00:02:23 +00:00
Charles Kerr 1e53e9de72 shut up a compiler warning 2007-08-18 23:32:07 +00:00
Charles Kerr 633ade8004 added mirek's slovakian translation. added mirek, Niels Provos, and TooMuchTime to the `thanks' sectio of AUTHORS 2007-08-18 18:33:47 +00:00
Charles Kerr ea49180f94 $Id$ 2007-08-18 17:19:49 +00:00
Charles Kerr b9c2ea46ce add the content-length header. I'm not getting any tracker errors anymore; please let me know if your experience differs 2007-08-18 15:47:08 +00:00
Charles Kerr 39a43cbc08 * more work on the tracker... getting closer.
* oops!  make sure autoconf is giving the `0.80+' in the User-Agent header.
2007-08-18 08:28:57 +00:00
Charles Kerr 9cb2dcb63d better error reporting in the new tracker code 2007-08-18 06:06:53 +00:00
Charles Kerr 3f777e3cb9 before the first scrape, set leechers/seeders/downloads to -1 to represent n/a 2007-08-18 03:11:08 +00:00
Charles Kerr 35b727788e do all the libevent enqueuing from a single thread. 2007-08-18 03:02:32 +00:00
Charles Kerr 8713d3468c don't cache the connection; these are one-shot requests 2007-08-17 05:00:59 +00:00
Charles Kerr d5cfbf9426 this seems to fix the double-start bug reported by joshe 2007-08-17 04:50:45 +00:00
Charles Kerr 0c60e29934 whee 2007-08-17 03:13:42 +00:00
Charles Kerr c449a4665d fix shutdown error in the new tracker code, reported by joshe 2007-08-17 03:03:28 +00:00
Charles Kerr 5c3d45767e fix crash-on-startup bug reported by Lacrocivious 2007-08-16 20:59:09 +00:00
Charles Kerr 5f5a743790 the new tracker code seems to be working, so now it's time for me to learn yet again how much better users are at noticing bugs than I am. :) 2007-08-16 20:00:06 +00:00
Charles Kerr 5989151ed5 (trunk) revert yesterday's tracker changes. 2007-08-14 20:08:57 +00:00
Charles Kerr d2ddd4cb4e (trunk) dead code removal. (ticket #286) 2007-08-13 14:35:37 +00:00
Charles Kerr 1fd5f90a77 win32 cleanly compiles and starts now. (still doesn't atually *work*, but we're getting closer...) 2007-08-02 19:43:29 +00:00
Charles Kerr 0e1e45605a fix manual-announce but noted by BMW 2007-08-02 02:38:42 +00:00
Charles Kerr 8aebe31de1 tr_trackerCanManualAnnounce() should return false immediately after the user's manually announced; not just after the announce request is processed by the tracker 2007-08-01 13:33:01 +00:00
Charles Kerr 0f85cc3297 continue whittling away at internal.h to reduce the global #include dependencies 2007-07-31 14:26:44 +00:00
Charles Kerr d209052051 add portability wrapper for in_port_t... 2007-07-30 18:04:10 +00:00
Charles Kerr 1be185aacd (libT) get "update tracker" working again.
(gtk) add "update tracker" button.
2007-07-30 17:11:00 +00:00
Charles Kerr e07d0220a9 this looks bug but it's not: just janitorial cleanup, moving #includes from headers into source file 2007-07-29 18:11:21 +00:00
Charles Kerr 1d95bcc689 re-randomize peer_id each time we start a torrent. (ticket #257) 2007-07-16 11:19:44 +00:00
Charles Kerr ad6ae58e06 fix the bugs outlined by cluthi81 in ticket #255. 2007-07-15 17:36:56 +00:00
Josh Elsasser 1ecbe8da65 Change a couple functions to take an in_addr pointer instead of an in_addr.
Forward declare struct in_addr and include the relevant headers in the .c files where it's used.
2007-07-14 16:29:21 +00:00
Charles Kerr e6e6d574db second draft of a fix for the tracker communication bug reported by TMT 2007-07-13 01:34:14 +00:00
Charles Kerr 5e4a49be16 first draft of a fix for the tracker communication bug reported by TMT 2007-07-12 20:48:13 +00:00
Charles Kerr 9f16191b0e remove unused macros. constify some tracker functions. 2007-07-12 18:54:39 +00:00
Charles Kerr b79beeff66 clean up #includes a bit. 2007-07-09 20:10:42 +00:00
Charles Kerr 37234a3e34 Make tr_trackerAnnouncePulse() just return safely if there's no tracker initialized. 2007-06-28 04:28:23 +00:00
Charles Kerr 7e09d157cd Thread safety improvements. Also, stopping/starting/rechecking/etc. torrents no longer blocks the calling thread. Since this a big commit, it will probably create some short-term pain via new bugs. 2007-06-26 18:45:03 +00:00
Mitchell Livingston 0256f4616d Merge file selection and torrent creation into the main branch.
The new code for these features is under a new license.
2007-06-18 03:40:41 +00:00
Charles Kerr 3b8d1e13c4 uninteresting minor stuff like adding const. this commit is just to reduce the shear between trunk and what lands in the file-selection branch. 2007-06-09 15:36:46 +00:00
Mitchell Livingston 91e4607c64 remove inaccurate comments about announce interval 2007-05-04 17:44:31 +00:00
Mitchell Livingston 7100463899 ensure the download/upload rates that are sent to the tracker are reset when sending "started" 2007-04-29 15:28:56 +00:00
Josh Elsasser aeb6efb6dd Refactor multitracker code a bit. 2007-04-08 05:41:44 +00:00
Josh Elsasser ebcc73121b Remove tr_bencListIter(), it was a stupid idea. 2007-03-31 17:40:28 +00:00
Josh Elsasser 978b5cec11 Add iterator function for bencoded lists. 2007-03-30 00:12:39 +00:00
Mitchell Livingston 84fad8a25f slightly updated help 2007-03-28 01:23:21 +00:00
Josh Elsasser 09c87aad84 Merge PEX branch, I hope this works. 2007-03-23 08:28:01 +00:00
Josh Elsasser 67826df085 Use a tr_tracker_info_t * directly in tr_info_t and tr_tracker_t. 2007-02-27 04:00:38 +00:00
Josh Elsasser adfd4e7ca7 Rework the port handling a bit to allow different bound and advertised ports. 2007-01-27 21:17:10 +00:00
Eric Petit 1eb3cf2a8e Should fix #193 2007-01-23 20:54:54 +00:00
Eric Petit 40d8abb68f More simplifications 2007-01-21 19:42:11 +00:00
Eric Petit 14aa4e5ab0 Officially give up on making libT reentrant, and simplify our code instead 2007-01-21 07:16:18 +00:00
Eric Petit 15fdfda60f small memleaks 2007-01-20 05:07:00 +00:00
Eric Petit 4a567871bb clean up 2007-01-19 11:19:20 +00:00
Mitchell Livingston 2fa4abe63f change to scrape frequency 2007-01-17 01:06:52 +00:00
Mitchell Livingston 20eebf6092 remove unneeded function/warning 2007-01-16 04:20:45 +00:00
Eric Petit cc3bf0cab9 Fixes redirecting (announce has '%'s in it) 2007-01-15 09:00:47 +00:00
Eric Petit e5e6a8b5df Merge io branch into trunk 2007-01-14 12:00:21 +00:00
Eric Petit 58a8bdedf0 BeOS fix 2007-01-14 08:51:15 +00:00
Mitchell Livingston 3cbb5fa681 correctly get the scrape interval 2007-01-12 05:05:11 +00:00
Mitchell Livingston de82956141 define variables at top 2006-12-26 18:43:46 +00:00
Mitchell Livingston 776153c126 better placement of manual announce 2006-12-26 18:40:51 +00:00
Mitchell Livingston f57626a6b1 support manual announcing to tracker (as in user forces an announce) in libT...when implemented in a front end it should limit the use of this 2006-12-26 04:17:37 +00:00
Mitchell Livingston 0aa4d36809 divide error logic in tracker code into multiple variables, allowing to determine if all errors in connecting were from unreachable trackers 2006-12-23 21:18:58 +00:00
Eric Petit 34fbe3a79a When httpPulse gives us TR_ERROR, don't forget to mark the attempt as NOREACH - otherwise if the previous query was successful, we'd try to connect again and again as fast as we could 2006-12-21 12:59:40 +00:00
Josh Elsasser 058b31aaf7 Silence warning. 2006-12-18 03:49:15 +00:00
Mitchell Livingston 38b97ccf13 don't scrape if stopping 2006-12-17 17:35:39 +00:00
Mitchell Livingston d31bd138fb english grammar 2006-12-17 17:09:00 +00:00
Mitchell Livingston 3374ce9a32 merge multitracker branch:
Adds announce list, support for code 301/302 redirect, improvements to mac inspector, better queueing with errors, random extra wait of up to a minute between announces, and other changes.
2006-12-17 16:36:27 +00:00
Josh Elsasser 44f8325312 Merge scrape branch:
Automatically scrape trackers as needed.
  If tracker supplies a trackerid then use it (untested).
  Use tracker's min interval, clamped to the same range as interval.
  Show total completed downloads in the MacOS X frontend.
2006-12-02 01:46:54 +00:00
Mitchell Livingston 52e66c96f8 Don't request more peers if stopping (or changing ports). 2006-11-09 04:38:32 +00:00
Josh Elsasser 631df817ae Fix for trackers that include parameters in announce URL. 2006-10-13 07:42:55 +00:00
Josh Elsasser 9d17424799 Fix extra space in tracker HTTP request line. 2006-09-27 22:23:42 +00:00
Josh Elsasser f7c3910a79 Fix possible uint64_t underflow which could cause insanely huge (16,000,000 TB)
upload and/or download totals to be reported to the tracker.
2006-09-26 22:36:04 +00:00
Josh Elsasser 0257761670 Merge nat-traversal branch to trunk. 2006-09-25 18:37:45 +00:00
Josh Elsasser ff8cef150c Add an assertion. 2006-09-08 23:19:15 +00:00
Josh Elsasser 555f12b64a Allow frontend to supply a custom function for displaying libtransmission errors. 2006-07-16 23:40:22 +00:00
Eric Petit f199e0a9d9 Revert [619] 2006-07-16 19:39:23 +00:00
Mitchell Livingston 5d36721a15 Remove old Sparkle... 2006-07-16 19:28:19 +00:00
Josh Elsasser 23965844d9 Don't try to free memory that we never allocated. 2006-07-04 23:59:51 +00:00
Eric Petit f366b9819c Fixes scraping with transmissioncli (#79) 2006-06-20 00:28:16 +00:00
Eric Petit f98fe6a1b0 Added $Id$ keywords and updated a few headers 2006-05-29 21:21:23 +00:00
Eric Petit 9235d148b0 Be more flexible in case the dictionary isn't at the beginning of the
body (refs http://transmission.m0k.org/forum/viewtopic.php?t=298)
2006-05-03 17:41:51 +00:00
Eric Petit 1ec413ea5c Fixes warnings 2006-04-26 10:59:09 +00:00
Josh Elsasser 9120989a88 Make sure not to go past the end of the buffer when loading bencoded data.
Add code to encode using bencoding.
2006-04-25 07:00:18 +00:00