Commit Graph

10324 Commits

Author SHA1 Message Date
Mitchell Livingston 7b31b3023f set 2.20 release date in NEWS 2011-02-06 20:12:18 +00:00
Jordan Lee ce08e00e2e (trunk libT) #3975 "tr_bencToFile() contains unnecessary calls to stat() and unlink()" -- fixed for win32.
remove() doesn't have the same behavior on Windows. On that platform, we should use MoveFileEx( oldpath, newpath, MOVEFILE_REPLACE_EXISTING )." Thanks to rb07 for testing & confirming the fix.
2011-02-06 18:56:44 +00:00
Jordan Lee 24b9dc7dc2 (trunk gtk) #3866 "Popup menu for file list manipulation" -- removing from the 2.20 milestone
Looking over the 2.20 tickets, this one keeps sticking out. A popup menu may be useful if the "delete files" ticket is accepted in 2.30, but for this release (2.20) it doesn't really add anything new. One lesson from the 2.1x cycle was that features are a harder to remove than to add. So I'm going to hold off on adding this feature until it has a clear raison d'être.
2011-02-06 18:50:35 +00:00
Mitchell Livingston b2a7f130ee update French localization for 2.2 2011-02-06 18:07:32 +00:00
Mitchell Livingston c165ff1463 #3675 handle trashing data over RPD in the Mac client 2011-02-06 17:32:16 +00:00
Jordan Lee 1fabb9b9ea (trunk) #3675 "Not all .part files are removed" -- handle trashing files via RPC.
When libtransmission gets a "remove torrent" request from RPC, it tries to delegate the work. This is because the GTK+ and Mac clients don't want torrents disappearing in a different thread and causing possible thread issues. So the GTK+ and Mac clients get notification about this via libtransmission's RPC callback and remove the torrents themselves. Unfortunately, that notification doesn't include information about whether or not to delete local data.

This commit adds that information to the RPC callback so that the Mac and GTK+ clients will know whether or not to trash the local files when a third-party RPC client requests that at torrent and its files be deleted.
2011-02-06 17:30:46 +00:00
Jordan Lee 11c0517cc8 (trunk libT) #3931 "'Announce is Queued' but doesn't get announced" -- remove the 'unresponsive tracker' penalty from torrents whose announce time has been reached.
The 'bad tracker' penalty was introduced in 2009 after a top tier trackers went down. Announces to it would hang, tying up an announce slot in libcurl for minutes at a time. If a user had enough torrents from that tracker, it could bottleneck all announce slots. The workaround was to deprioritize failing trackers so that they wouldn't obstruct other trackers.

Its implementation could be better, however. There are two parts:

  1. Deciding how frequently to retry unresponsive trackers

  2. Once an unresponsive tracker announce was ready to go, it would be bumped down the queue if other announces were ready too.

Part 2 probably contributes to #3931. If there are enough torrents loaded, there will always be good tracker announces that get pushed ahead of a bad one in the queue. Modifying 2's heuristics would be one option, but it seems simpler to remove it altogether now that getRetryInterval() grades more hashly for consecutive failures. Altering the retry interval also gives better visual feedback to users than Part 2 did.

This commit removes "Part 2" as described above.
2011-02-05 18:46:10 +00:00
Jordan Lee ddfb113f70 (trunk libT) announcer.c cleanup, part 1
Separating this commit into a few different stages. This one is superficial/readability changes, such as grouping related functions together.
2011-02-05 16:45:06 +00:00
Jordan Lee c90ddfa1c3 (trunk libT) #3980 "segfault when adding many torrents remotely" -- possible fix.
gtk/main.c's onRPCChanged() is called from inside the libtransmission thread, yet it still made GTK+ calls to modify the GTK+ client's tr-core object when a torrent was added. This caused a race condition inside of the GTK+ internals. onRPCChanged() already knows to delegate work back to the GTK+ thread when a torrent is removed via RPC. This commit uses the same kind of mechanism to delegate work back to the GTK+ thread when a torrent is added via RPC.
2011-02-05 05:03:00 +00:00
Jordan Lee b3227b9567 bump to nightly peer-id 2011-02-05 04:22:38 +00:00
Mitchell Livingston 9c2a25a702 update Dutch localization 2011-02-04 13:22:45 +00:00
Jordan Lee a358858a99 (trunk libT) #3978 "Message window column sorting fails and triggers gtk warnings" -- fixed.
I'm not sure why sorting was in there in the first place; it doesn't make sense in a message log.. Disabling sorting fixes this bug.
2011-02-04 06:12:55 +00:00
Jordan Lee 865bfb0e91 bump to 2.20 beta 4 2011-02-04 04:00:16 +00:00
Jordan Lee af1e920ab7 (trunk libT) minor futzing: remove unnecessary "assert( tr_isTorrent( tor ) );" calls
Remove these calls from private functions whose callers have already asserted the same thing.
2011-02-03 22:53:02 +00:00
Jordan Lee e24c18fcd9 (trunk qt) in the "new torrent" dialog, have the "save to" and "source folder" file dialogs be QFileDialog::DirectoryOnly rather than QFileDialog::Directory 2011-02-03 22:13:31 +00:00
Jordan Lee 11d60307cf (trunk libT) #3967 "regression: transmission-daemon's non-inotify watchdir is broken in 2.20 betas" -- fixed.
When inotify isn't available, watch.c uses readdir() to look for new .torrent files. It keeps a list of old .torrent files internally so that it doesn't try to keep re-adding the same file. This list is stored in an evbuffer. As part of the libevent2 upgrade (#3836), r11594 changed how the buffer is searched by replacing the (deprecated) event_find() call with libevent2's evbuffer_search(). However the latter's semantics are different in that searching stops when '\0' is reached, so '\0' is no longer a good filename delimiter. Fixed by changing watch.c's internal delimiter from '\0' to '\t' ... so all those torrents with tabs in their filenames had better watch out.
2011-02-03 17:37:53 +00:00
Mitchell Livingston ca55bca4fa update Simplified Chinese localization for 2.2 2011-02-03 12:36:30 +00:00
Jordan Lee deac8fedbe (trunk libT) now that bencode.c doesn't call stat() anymore, we can remove a couple of #includes 2011-02-03 06:19:54 +00:00
Jordan Lee 2450d6514b (trunk libT) #3519 "Webseeds don't work" -- handle nonresponsive webseeds
Don't keep trying to use nonresponsive webseeds or it will generate unnecessary network traffic and kill us during endgame.
2011-02-03 04:17:48 +00:00
Jordan Lee 3282e1ea81 (trunk libT) #3975: "tr_bencToFile() contains unnecessary calls to stat() and unlink()" -- fixed.
When saving a tr_benc object to disk at $dst, bencode.c saves it to a tmp file in the same directory as $dst, unlinks $dst if it exists, and then renames $tmp as $dst. This commit removes the middle step, which is unnecessary because rename() has guarantees about atomically overwriting $dst.
2011-02-03 00:48:05 +00:00
Jordan Lee e8614030a2 (trunk libT) #3973 "JIT verification verifies fresh downloaded torrents" -- remove a debugging printf() statement that shouldn't have been checked in. 2011-02-02 23:33:25 +00:00
Jordan Lee 22660ed751 (trunk libT) #3973 "JIT verification verifies fresh downloaded torrents" -- improvement to r11813.
r11813 fixed the timestamp issue by fsync()ing files before close()ing them in tr_close_file(). This causes a little overhead as even read-only files cause a sync as their atimes are modified. Instead, we should call fsync() further back in the call chain in tr_fdFileClose() so that we can know to only sync torrent files that were opened with write access.
2011-02-02 23:29:17 +00:00
Jordan Lee 4bf6f0ac40 (trunk libT) #3973 "JIT verification verifies fresh downloaded torrents" -- win32 portability fix for r11813.
fsync() doesn't exist on Windows. bencode had a private function, tr_fsync(), that is a portability wrapper around fsync() on *nix and _commit() on win32. Make this function package-visible, rather than private, so fdlimit.c can use it too.
2011-02-02 23:19:54 +00:00
Mitchell Livingston 9d3a97f3ed update European Portuguese for 2.2 2011-02-02 22:55:13 +00:00
Jordan Lee 06948a8514 (trunk libT) #2955 "verify pieces only when necessary, or when the user requests it." -- improvements to .resume file
As pointed out by longinus00 and ijuxda, storing per-piece timestamps in the .resume file can involve a lot of overhead. This commit reduces the overhead by adding a couple of optimizations: (1) in cases where *all* or *none* of the files' pieces were checked after the file's mtime, we can safely fold all the pieces' mtimes into a single per-file mtime. (2) since unix time takes up a lot of space when rendered as a benc integer, find a common per-file "baseline" number, then store the pieces' timestamps as offsets from that number.  Also add documentation explaining this new format, and also better explaining the pre-2.20 progress format.
2011-02-02 21:17:16 +00:00
Jordan Lee 5fc1ff8855 (trunk libT) #3973 "JIT verification verifies freshly-downloaded torrents" -- test fix.
Files downloaded in Transmission 2.20 betas [1..3] forced each piece to be checked twice -- once on download, and once when uploading the piece for the first time. Older versions of Transmission didn't perform the latter check unless the file had changed after it was downloaded. This commit restores that behavior.
2011-02-02 20:30:04 +00:00
Jordan Lee 859570345d (trunk libT) tweak the documentation on a couple of structs 2011-02-02 17:15:41 +00:00
Jordan Lee 4736d863bf (trunk libT) minor code cleanup to inout.c's readOrWriteBytes().
Use ijuxda's suggestion of making the fstat(fd) call dependent on (fd>=0) rather than (!err).
2011-02-02 06:06:09 +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 cea3221461 (trunk daemon) #3775 "'-tall' no longer works for transmission-remote" -- fixed.
looks like this was broken in r10907 for #3368 in 2.00 when we added "-ta" as the short form of "--tracker-add". "-ta" seems to be conflicting with "-tall". This can be fixed by changing --tracker-add's short form.
2011-02-02 03:17:38 +00:00
Jordan Lee 7a5f87a207 (trunk gtk) #3972 "Verify progress changes not displaying" -- fixed.
make sure to call gtk_list_store_set() on rows matching torrents whose tr_stat.recheckProgress value has changed, triggering a row change event that causes the verify progress change to be displayed.
2011-02-02 02:45:20 +00:00
Jordan Lee ba7e856ce2 (trivial) make the implementation of tr_torPieceCountBlocks(), tr_torPieceCountBytes(), and tr_torBlockCountBytes() consistent. 2011-02-01 21:32:03 +00:00
Jordan Lee ee849ab82b (trunk libT) #3956 "tr_bencFree() could be faster" -- fix memory error.
#3956's r11780 has uncovered a longstanding memory error that occurs when tr_bencParse() fails to parse a dict and leaves a dangling key. This is fixed by cleaning up the key.
2011-02-01 17:56:19 +00:00
Jordan Lee 3f2e8b7b02 (trunk gtk) #3817 "use the OS' proxy support" -- fix memory leaks in the GTK+ implementation.
r11512 introduced a handful of memory leaks by not freeing the GConfValue objects after use.
2011-02-01 17:46:42 +00:00
Jordan Lee 705b27d128 (trunk gtk) #3876 "Give filesize its own column in the Files tree" -- fix minor memory leak introduced by r11642
r11642 allocated a pango font description with pango_font_description_copy() but never freed it.
2011-02-01 17:42:50 +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 88df1b15ee (trunk gtk) #3970 "tr_core_update() wastes CPU cycles by toggling the sort mode" -- fix minor r11799 regression.
Clearing the model on shutdown generated a warning because it used the wrong cast. Rather than fixing the cast, add tr_core_clear() for symmetry with tr_core_load().
2011-02-01 01:45:41 +00:00
Jordan Lee be99878e98 (trunk gtk) #3971 "favicons do not work for IP addresses" -- fixed.
gtr_get_host_from_url() wasn't written to handle dotted-quad or IPv6 address strings, but can handle them now.
2011-02-01 01:38:58 +00:00
Jordan Lee 2f5fc4ade7 (trunk libT) #3959 "by default, disable prefetch for lightweight builds" -- fixed.
User jusid reports prefetch causes load on his NMT to jump from <1 to 3-4. He requests a way to disable prefetch, and suggests that prefetch be disabled by default on lightweight builds.  This commit adds a new settings.json key, "prefetch-enabled", which defaults to "true" on standard builds and "false" when compiled with --enable-lightweight.
2011-01-31 23:35:10 +00:00
Jordan Lee b084493bfe (trunk gtk) #3970 "tr_core_update() wastes CPU cycles by toggling the sort mode" -- fixed.
Long description in #3970. Split tr_core's torrent GtkTreeModel into two models: one low-level unsorted one, and one proxy sorted one. That way we don't have to disable sorting before walking through the low-level one to sync the table's attributes with the tr_torrent and tr_stat.
2011-01-31 23:01:46 +00:00
Jordan Lee 392df7ceb8 (trunk libT) #3969 "tr_base64_encode() has unnecessary overhead with linefeeds" -- fixed.
Don't add linefeeds to base64-encoded data. We don't need it and it just increases the length of the string, which is typically sent over the network to an RPC client.
2011-01-31 22:47:07 +00:00
Jordan Lee 9ed800c45a (trunk libt) #3968 "tr_cpFileIsComplete could be faster" -- fixed.
Rewriting this function as described in ticket #3968. This rewrite drops it from 1.77% of cpu use to 0.07%.
2011-01-31 16:43:37 +00:00
Mitchell Livingston ccc75eecc7 fix icon alignment in inspector tabs 2011-01-30 21:34:46 +00:00
Mitchell Livingston 985f1fd485 always unlock focus when drawing the inspector buttons 2011-01-30 19:34:38 +00:00
Mitchell Livingston 444847fe35 tweak inspector button drawing to account for black lines 2011-01-30 19:32:40 +00:00
Jordan Lee 1b52155954 (trunk) update NEWS and bump version to 2.20 beta 3. 2011-01-30 17:52:11 +00:00
Jordan Lee c137858b84 (trunk utils) #3964 "transmission-edit replace option cuts off strings" -- fixed.
The trailing text after the last substring match wasn't being retained.
2011-01-30 16:40:11 +00:00
Jordan Lee a9e104d591 (trunk libT) #3931 "announce is queued" -- minor revision for uClibc compatibility
jusid reports that powl() doesn't exist on uClibc, so getRetryInterval() needs to work without it. A simple left-bit shifting would be fine, but since we max out after a handful of cases, a switch statement seems slightly more readable than shifting or powl().
2011-01-30 16:23:53 +00:00
Mitchell Livingston 8294f1c34c tweak the inspector button gradient 2011-01-30 02:52:03 +00:00
Mitchell Livingston 8f64909bc3 use the control color for the selected inspector button; small tweaks to the updated button bar's drawing code 2011-01-30 02:36:08 +00:00