Juliusz Chroboczek [Wed, 30 Mar 2011 00:14:41 +0000 (00:14 +0000)]
Protect against monotonic time being non-monotonic, take 2.
This is a better fix, suggested by ghazel.
Juliusz Chroboczek [Tue, 29 Mar 2011 23:15:38 +0000 (23:15 +0000)]
Protect against monotonic time being non-monotonic.
Within utp.cpp, there's a bunch of assertions that will cause us
to crash if monotonic time isn't. While I have no idea about Windows,
under Unix we use real time instead of monotonic time if POSIX clocks
are not available, and real time can be stepped backwards. Since the
protection is cheap, we perform it on all platforms.
Jordan Lee [Tue, 29 Mar 2011 22:02:27 +0000 (22:02 +0000)]
(trunk libT) fix endgame detection bug introduced in r12248
Jordan Lee [Tue, 29 Mar 2011 21:10:20 +0000 (21:10 +0000)]
(trunk libT) fix a crasher introduced yesterday in r12248
Jordan Lee [Tue, 29 Mar 2011 21:09:37 +0000 (21:09 +0000)]
(trunk libT) safeguard against a minor memory leak if io->sokcet couldn't be opened.
Jordan Lee [Tue, 29 Mar 2011 16:39:30 +0000 (16:39 +0000)]
(trunk libT) fix bitfield.c assertion failure reported by Rolcol
Jordan Lee [Tue, 29 Mar 2011 15:23:54 +0000 (15:23 +0000)]
(trunk libT) don't cache unininteresting peer addresses between sessions
For example, if we're both seeds, or if the peer is not connectible, don't bother caching it for the next session. If it's still alive, we'll find it up through DHT or tracker announces next time around. As with r12253, this commit's intention is to reduce the number of unproductive peer_atoms that we waste time trying to connect to.
Jordan Lee [Tue, 29 Mar 2011 15:18:25 +0000 (15:18 +0000)]
(trunk libT) better scrape management on private trackers.
If a private tracker scrape says that there are no downloaders in the swarm, mark all the peers in the private swarm as seeds. This can greatly reduce unnecessary overhead on large seedboxes. We don't do this same trick on public torrents, since a public tracker won't know of all the peers.
Jordan Lee [Tue, 29 Mar 2011 01:47:17 +0000 (01:47 +0000)]
(trunk libT) fix bitfield assertion failure due to invalid assumption in tr_bitfieldIsValid()
Jordan Lee [Tue, 29 Mar 2011 01:17:18 +0000 (01:17 +0000)]
(trunk libT) more completion and bitfield cleanup: (1) fix regression in tr_cpSizeWhenDone() reported by Waldorf, (2) make simple one-liner functions inlined
Jordan Lee [Mon, 28 Mar 2011 16:46:57 +0000 (16:46 +0000)]
(trunk mac) delete bitset.[ch] from the xcode file. No, I don't know what I'm doing, but what's the worst that could happen, it could break the build... :)
Jordan Lee [Mon, 28 Mar 2011 16:33:40 +0000 (16:33 +0000)]
(trunk libT) whoops, remove 4 debugging fprintf()'s from the previous commit
Jordan Lee [Mon, 28 Mar 2011 16:31:05 +0000 (16:31 +0000)]
(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
Jordan Lee [Mon, 28 Mar 2011 13:37:46 +0000 (13:37 +0000)]
(trunk libT) strip trailing whitespace
Jordan Lee [Mon, 28 Mar 2011 03:45:31 +0000 (03:45 +0000)]
(trunk libT) fix memory leak in tr_utf8clean()'s utility function to_utf8()
Mitchell Livingston [Sun, 27 Mar 2011 22:10:03 +0000 (22:10 +0000)]
drop two NSLogs
Mitchell Livingston [Sun, 27 Mar 2011 15:56:05 +0000 (15:56 +0000)]
update Spanish localization for 2.3
Mitchell Livingston [Sun, 27 Mar 2011 02:50:38 +0000 (02:50 +0000)]
Attempt to fix #4148 "Mac client gives inappropriate error if data volume is not mounted"
Mitchell Livingston [Sat, 26 Mar 2011 17:01:49 +0000 (17:01 +0000)]
add µTP to the help documentation
Mitchell Livingston [Sat, 26 Mar 2011 16:05:11 +0000 (16:05 +0000)]
update NEWS
Mitchell Livingston [Sat, 26 Mar 2011 16:02:13 +0000 (16:02 +0000)]
update Credits to match AUTHORS
Mitchell Livingston [Sat, 26 Mar 2011 15:46:12 +0000 (15:46 +0000)]
update Italian localization for 2.3
Jordan Lee [Sat, 26 Mar 2011 12:06:04 +0000 (12:06 +0000)]
(trunk libT) remove the tr_session argument from the announce/scrape response callbacks
Jordan Lee [Sat, 26 Mar 2011 10:22:25 +0000 (10:22 +0000)]
(trunk libT) minor code cleanup in announcer-udp: whitespace & function names
Jordan Lee [Fri, 25 Mar 2011 18:00:14 +0000 (18:00 +0000)]
draft of NEWS for 2.30
Jordan Lee [Fri, 25 Mar 2011 17:54:01 +0000 (17:54 +0000)]
add Andreas Nilsson to the credits
Jordan Lee [Fri, 25 Mar 2011 17:42:47 +0000 (17:42 +0000)]
(trunk) fix a handful of small memory leaks that valgrind found.
Jordan Lee [Fri, 25 Mar 2011 15:03:42 +0000 (15:03 +0000)]
(trunk) yet more "#include" tweaks
Jordan Lee [Fri, 25 Mar 2011 07:32:30 +0000 (07:32 +0000)]
(trunk gtk) get everything except torrent-cell-renderer building under GTK+ 3.0.5
Jordan Lee [Fri, 25 Mar 2011 06:40:46 +0000 (06:40 +0000)]
(trunk gtk) gtk_open_uri(): use gtk_show_uri() as the default implementation for GTK+ > 2.14.0.
gtk_show_uri() was added in 2.14.0
Jordan Lee [Fri, 25 Mar 2011 06:20:12 +0000 (06:20 +0000)]
(trunk libT) copyediting: yes, removing more unnecessary #includes
Jordan Lee [Fri, 25 Mar 2011 05:34:26 +0000 (05:34 +0000)]
(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...
Jordan Lee [Fri, 25 Mar 2011 01:41:57 +0000 (01:41 +0000)]
(trunk libT) still fiddling around with #includes -- this time removing unncecessary libT includes from libT .c files
Mitchell Livingston [Fri, 25 Mar 2011 01:37:50 +0000 (01:37 +0000)]
#4055 Fix a memory leak when removing a transfer + data file
Jordan Lee [Fri, 25 Mar 2011 01:21:31 +0000 (01:21 +0000)]
(trunk libT) copyediting: '#include "crypto.h"' cleanup
Jordan Lee [Thu, 24 Mar 2011 22:57:39 +0000 (22:57 +0000)]
(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...
Jordan Lee [Thu, 24 Mar 2011 22:45:04 +0000 (22:45 +0000)]
(trunk libT) copyediting: clean up the "#include <event2/*>" directives in libtransmission's header files
Jordan Lee [Thu, 24 Mar 2011 21:49:42 +0000 (21:49 +0000)]
(trunk) copyediting: remove some unneeded #includes, and annotate some needed ones
Jordan Lee [Thu, 24 Mar 2011 18:32:05 +0000 (18:32 +0000)]
(trunk gtk) gtr_compare_double() is only used in one place, so make it a private function there instead of leaving it public in utils.h
Jordan Lee [Thu, 24 Mar 2011 18:29:07 +0000 (18:29 +0000)]
(trunk gtk) gtr_localtime() is only used in one place, so make it a private function there instead of leaving it public in util.h
Jordan Lee [Thu, 24 Mar 2011 18:24:21 +0000 (18:24 +0000)]
(trunk gtk) gtr_cell_renderer_get_padding() is only used in one place, so make it a private function there instead of leaving it public in util.h
Jordan Lee [Thu, 24 Mar 2011 18:20:47 +0000 (18:20 +0000)]
(trunk gtk) remove function gtr_strcmp0, which is redundant due to tr_strcmp0
Mitchell Livingston [Thu, 24 Mar 2011 00:56:36 +0000 (00:56 +0000)]
#4063 Adding a tracker before last failed add causes lockup
Mitchell Livingston [Wed, 23 Mar 2011 22:39:02 +0000 (22:39 +0000)]
ensure the Stats window's min and max widths are the current width
Mitchell Livingston [Wed, 23 Mar 2011 22:36:08 +0000 (22:36 +0000)]
update Brazilian Portuguese localization for 2.3
Mitchell Livingston [Wed, 23 Mar 2011 22:24:10 +0000 (22:24 +0000)]
update Chinese localization for 2.3
Jordan Lee [Wed, 23 Mar 2011 18:26:01 +0000 (18:26 +0000)]
(trunk qt) housekeeping: tr_bool --> bool
Jordan Lee [Wed, 23 Mar 2011 18:25:41 +0000 (18:25 +0000)]
(trunk libT) If transmission.h is being processed by a C++ compiler, it shouldn't #include stdbool.h
Jordan Lee [Wed, 23 Mar 2011 18:22:23 +0000 (18:22 +0000)]
(trunk qt) move "#include <QFile>" from the header to the .cpp file
Jordan Lee [Tue, 22 Mar 2011 23:49:29 +0000 (23:49 +0000)]
(trunk libT) tr_set_func is only used in one place, so make it a private function there instead of leaving it public in utils.h
Jordan Lee [Tue, 22 Mar 2011 23:46:31 +0000 (23:46 +0000)]
(trunk libT) tr_strtruncd() is only used in one place, so make it a private function there instead of leaving it public in utils.h
Jordan Lee [Tue, 22 Mar 2011 23:42:25 +0000 (23:42 +0000)]
(trunk libT) tr_set_compare() is only used in one place, so make it a private function there instead of leaving it public in utils.h
Jordan Lee [Tue, 22 Mar 2011 23:37:20 +0000 (23:37 +0000)]
(trunk) remove unused gcc symbol: TR_GNUC_PURE
Jordan Lee [Tue, 22 Mar 2011 16:50:09 +0000 (16:50 +0000)]
(trunk libT) #4136 "r12181 causes excessive disk activity and logfile bloat" -- fixed.
Jordan Lee [Tue, 22 Mar 2011 16:07:49 +0000 (16:07 +0000)]
still trying to make hudson happy
Jordan Lee [Tue, 22 Mar 2011 16:03:10 +0000 (16:03 +0000)]
(trunk gtk) revert r12201 to try & make hudson happy
Jordan Lee [Tue, 22 Mar 2011 15:19:54 +0000 (15:19 +0000)]
(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.
Jordan Lee [Tue, 22 Mar 2011 14:45:04 +0000 (14:45 +0000)]
test & see if xcode/osx has stdbool.h
Jordan Lee [Mon, 21 Mar 2011 20:45:50 +0000 (20:45 +0000)]
(trunk gtk) tweak Makefile.am
Jordan Lee [Mon, 21 Mar 2011 20:26:15 +0000 (20:26 +0000)]
(trunk gtk) dbus tweaks in Makefile.am based on examples from http://live.gnome.org/DBusGlibBindings .
1. tweak the way dbus-binding-tool is invoked... use --output=$@ $^
2. add the file generated by dbus-binding-tool to BUILT_SOURCES
Jordan Lee [Mon, 21 Mar 2011 17:08:10 +0000 (17:08 +0000)]
(trunk libt) more transmission.h copyediting
Jordan Lee [Mon, 21 Mar 2011 16:42:32 +0000 (16:42 +0000)]
(trunk libT) discard out-of-range reject messages from peers.
Jordan Lee [Mon, 21 Mar 2011 16:33:16 +0000 (16:33 +0000)]
(trunk libT) remove dead code: tr_sessionSetLazyBitfieldEnabled(), tr_sessionIsLazyBitfieldEnabled()
Jordan Lee [Mon, 21 Mar 2011 16:30:58 +0000 (16:30 +0000)]
tidy up
Jordan Lee [Mon, 21 Mar 2011 16:28:44 +0000 (16:28 +0000)]
maybe fix the mac build?
Jordan Lee [Mon, 21 Mar 2011 16:26:45 +0000 (16:26 +0000)]
(trunk libT) copyediting in transmission.h: fix some line wraps
Jordan Lee [Mon, 21 Mar 2011 16:22:39 +0000 (16:22 +0000)]
(trunk libT) remove unused configDir argument from tr_sessionGetDefaultSettings()
Mitchell Livingston [Sun, 20 Mar 2011 17:22:50 +0000 (17:22 +0000)]
update Localizable.strings
Jordan Lee [Sun, 20 Mar 2011 15:56:32 +0000 (15:56 +0000)]
(trunk libT) tweak comments to fix inconsistent capitalization
Jordan Lee [Sun, 20 Mar 2011 15:42:54 +0000 (15:42 +0000)]
(trunk libT) #117 "UDP tracker support" -- fix add-UDP-tracker-URL-via-RPC bug reported by johnea @ https://trac.transmissionbt.com/ticket/117#comment:79
Jordan Lee [Sun, 20 Mar 2011 15:33:45 +0000 (15:33 +0000)]
(trunk libT) #117 "UDP tracker protocol support" -- fix trivial r12141 log message typo: s/Unsupported ur/Unsupported url/
Jordan Lee [Sun, 20 Mar 2011 15:28:41 +0000 (15:28 +0000)]
(trunk libT) #117 "UDP tracker protocol support" -- (1) fix connection attempt retries after a failed connection attempt. (2) extract method from tau_tracker_upkeep() for clarity: tau_tracker_send_reqs() and tau_tracker_timeout_reqs()
refactor the timeout/request code a bit.
Jordan Lee [Fri, 18 Mar 2011 17:11:42 +0000 (17:11 +0000)]
(trunk libT) #4114 "crash on open r12168 in tau_sendto()" -- fixed.
Jordan Lee [Fri, 18 Mar 2011 15:15:13 +0000 (15:15 +0000)]
(trunk qt) #4130 "Remove -levent from qtr.pro and let pkg-config takes care of it." -- apply patch from mezz.
Mitchell Livingston [Thu, 17 Mar 2011 22:33:42 +0000 (22:33 +0000)]
#4124 Show years in Statistics window
Jordan Lee [Thu, 17 Mar 2011 21:22:58 +0000 (21:22 +0000)]
(trunk libT) tr_udpParse(): default to port 80 for URLs with a udp scheme and no explicit port.
Jordan Lee [Thu, 17 Mar 2011 18:51:31 +0000 (18:51 +0000)]
(trunk libT) better shutdown management of libutp and UDP trackers in tr_sessionClose().
This is a little overlapping since the utp code can be closed more-or-less immediately, but the udp manager needs to stay open in order to process the udp tracker connection requests before sending out event=stopped. Moreover DNS resolver can be shut down after the UDP tracker is shutdown.
Jordan Lee [Thu, 17 Mar 2011 13:16:23 +0000 (13:16 +0000)]
(trunk libT) as a followup to r12182, move LPD's periodic upkeep timer into the tr-lpd.c module where it can be started & stopped with the pre-existing tr_lpdInit() and tr_lpdUninit() functions.
Jordan Lee [Thu, 17 Mar 2011 12:45:29 +0000 (12:45 +0000)]
(trunk libT) move tr_lpdAnnounceMore() out of the announcer module
We can stop local peer discovery immediately during shutdown, but need to leave the announcer running for the event=stopped messages. So it doesn't make sense to keep them on the same periodic timer.
Jordan Lee [Thu, 17 Mar 2011 12:34:43 +0000 (12:34 +0000)]
(trunk libT) move tr_dhtUpkeep() out of the announcer module
During shutdown, we can stop DHT almost immediately, but need to leave the announcer running for the DHT tracker event=stopped messages. So it doesn't make sense to keep them on the same periodic timer.
Jordan Lee [Thu, 17 Mar 2011 04:16:19 +0000 (04:16 +0000)]
(trunk libT) #117 "UDP tracker protocol suppoort" -- in case the tracker gives an error message in response to a connection response, store the error message in the scrape/announce response structs' errmsg fields.
Mitchell Livingston [Thu, 17 Mar 2011 01:06:31 +0000 (01:06 +0000)]
#4109 Recycle: Show a confirmation dialog
Jordan Lee [Wed, 16 Mar 2011 18:11:48 +0000 (18:11 +0000)]
(trunk libT) #4127 "Torrent complete script doesn't pass on the environment" -- fixed with patch from geirha.
The fix was to putenv() the new environment variables, then call execvp() instead of execve().
Jordan Lee [Wed, 16 Mar 2011 18:04:23 +0000 (18:04 +0000)]
(trunk) it's bad form to #include so many system headers in libtransmission/utils.h...
Jordan Lee [Wed, 16 Mar 2011 17:42:32 +0000 (17:42 +0000)]
(trunk libT) move the single-use utility function "evbuffer_ref_cleanup_tr_free()" from a public header into a private function to limit its visibility/scope
Jordan Lee [Wed, 16 Mar 2011 04:44:38 +0000 (04:44 +0000)]
(trunk libT) make readOrWriteBytes() more readable
Mitchell Livingston [Wed, 16 Mar 2011 03:51:01 +0000 (03:51 +0000)]
Remove the miniupnp framework from the Transmission.app linked frameworks
Jordan Lee [Wed, 16 Mar 2011 03:19:56 +0000 (03:19 +0000)]
(trunk libT) remove the "a file disappeared!" check from readOrWriteFile().
In both the reading and writing case, this is handled with human-readable errors further up the call chain.
Jordan Lee [Wed, 16 Mar 2011 03:17:26 +0000 (03:17 +0000)]
(trunk libT) remove unused code from inout.c
Jordan Lee [Wed, 16 Mar 2011 00:49:43 +0000 (00:49 +0000)]
(trunk libT) minor tweak to the cache sorting code
Jordan Lee [Tue, 15 Mar 2011 18:11:31 +0000 (18:11 +0000)]
(trunk libT) cpu load improvements based on profiling by gunzip
Jordan Lee [Tue, 15 Mar 2011 17:03:09 +0000 (17:03 +0000)]
Show whether a tracker is http or udp. Without that context, it could be confusing to see the same tracker twice in a tier
Jordan Lee [Tue, 15 Mar 2011 04:22:47 +0000 (04:22 +0000)]
(trunk) #4081 "Add 'cookieString' argument 'torrent-add' method in RPC" -- done.
Jordan Lee [Tue, 15 Mar 2011 03:21:25 +0000 (03:21 +0000)]
(trunk libT) annnouncer.c: as discussed with Waldorf, massage the tracker lists a bit:
1. remove duplicate URLs caused by implicit vs. explicit port numbers
2. if two announce URLs are duplicates /except/ for their scheme, put them in the same tier.
3. try announce URLs with a "udp" scheme before trying ones with an "http" scheme.
Mitchell Livingston [Mon, 14 Mar 2011 23:46:53 +0000 (23:46 +0000)]
Rename "cleanup all completed" to "remove all completed from list".
Mitchell Livingston [Mon, 14 Mar 2011 22:19:42 +0000 (22:19 +0000)]
#4119 Add "matches" option for all properties of "assign group to new transfers"
Jordan Lee [Mon, 14 Mar 2011 16:52:47 +0000 (16:52 +0000)]
(trunk libT) more announce.c work: better handling of incrementing the retry interval on scrape failures
Jordan Lee [Mon, 14 Mar 2011 14:29:00 +0000 (14:29 +0000)]
(trunk daemon) #4118 "transmission-remote, document peer status for H and T in its man page" -- done.
Jordan Lee [Mon, 14 Mar 2011 14:15:58 +0000 (14:15 +0000)]
(trunk libT) #117 "UDP tracker protocol support (BEP #15)": (1) use the UDP tracker error response's error string (2) better handling of requests that timeout (3) better filtering of non-tracker UDP messages
Jordan Lee [Mon, 14 Mar 2011 14:09:41 +0000 (14:09 +0000)]
(trunk libT) make tr_ptrArrayNth() an inline function