Commit Graph

3966 Commits

Author SHA1 Message Date
Mitchell Livingston 516164e78e add an RPC session callback for when queue order changes 2011-08-27 23:54:10 +00:00
Jordan Lee 6c61d6ac67 (trunk libT) #4437 "Multi file webseeds don't work" -- fixed. 2011-08-25 09:08:50 +00:00
Jordan Lee 56e47e96d0 (trunk libT) improve the is_same_file() test in deleteLocalData() to handle nonexistent directories too. 2011-08-20 18:41:45 +00:00
Jordan Lee a14e72b1f7 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- fix r12665-r12667 regression reported by KyleK in comment:31 2011-08-16 22:42:43 +00:00
Mitchell Livingston fbfae34837 #4422 On Mac, tr_getWebClientDir() uses incorrect encoding for creating the web content dir path 2011-08-15 00:10:06 +00:00
Jordan Lee 177f2398a5 (trunk libT) #4396 "Scrape requests not showing in logfile" -- when the announce response contains scrape information, add a log message saying that the next scrape has been rescheduled. 2011-08-14 14:45:54 +00:00
Jordan Lee ecb2054493 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- another revision to r12665 2011-08-12 01:56:35 +00:00
Jordan Lee 6d36b3d763 (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- minor revision to r12665 to fix a minor memory leak with the 'subpath' string. 2011-08-11 21:02:15 +00:00
Jordan Lee d9541de52d (trunk libT) #4377 "Incomplete Folder removed when sub-folder of Default Location" -- possible fix. 2011-08-11 14:16:29 +00:00
Jordan Lee 3778da6f82 remove dead code 2011-08-08 16:58:29 +00:00
Jordan Lee ff303e6fd7 queuing: lower the default 'active downloads' value to 5 2011-08-08 16:29:47 +00:00
Jordan Lee 398b6ad8dc bump RPC_VERSION to 14 because of the queuing changes 2011-08-07 19:25:36 +00:00
Jordan Lee 313bd9e211 Add a mechanism for enabling/disabling the stalled minutes feature. This is a pre-existing feature in the Mac client. 2011-08-07 19:24:33 +00:00
Jordan Lee fbc2eb1a65 silence a minor compiler warning when building with -DNDEBUG 2011-08-05 17:03:34 +00:00
Jordan Lee 7915b49b03 revert the last commit -- the Mac client uses the isIdle flag to know when hibernation is allowed 2011-08-04 04:31:14 +00:00
Jordan Lee d8a11a33f1 tr_torrentIsStalled(): return false if that torrent's queue is disabled. 2011-08-04 02:25:38 +00:00
Jordan Lee ae89e4683d add user_data (void *) to the queue callback 2011-08-03 23:40:51 +00:00
Jordan Lee ce77935009 Add a callback to be invoked when the queue starts a torrent. 2011-08-03 03:14:57 +00:00
Jordan Lee 3430ce714c #671 "torrent queuing" -- fix r12611 oops 2011-08-02 14:03:43 +00:00
Jordan Lee 307754e807 #671 "torrent queuing" -- modify the queue implementation s.t. every torrent has a queuePosition, even if it's not currently in the queue. 2011-08-02 03:59:54 +00:00
Jordan Lee 2e9d419bd4 #671 "torrent queuing" -- add a tr_stat.isStalled flag. 2011-08-01 23:27:11 +00:00
Jordan Lee 61174b007e (trunk) #671 "torrent queuing" -- Preliminary implementation. Covers libtransmission; GTK+ and Qt clients, and rudimentary web client support. 2011-08-01 22:24:24 +00:00
Jordan Lee 56525f4b80 (trunk libT) Remove the backup implementation of tr_ptrArrayLowerBound() that was added 5 weeks ago in r12512. This was for testing in the nightlies, to use its output against the function's primary implementation. 2011-07-31 14:04:43 +00:00
Jordan Lee 60f9191fdc (trunk libT) modify announcer's scrape triggers as per discussion with Elbandi 2011-07-31 00:58:05 +00:00
Jordan Lee 0bffa36377 (trunk libT) improve the debugging message that logs an http announce response 2011-07-30 22:40:15 +00:00
Jordan Lee 8ae478a62f (trunk libT) #4395 "Crash when removing data for incomplete magnetized torrent file" -- fixed. 2011-07-30 13:11:06 +00:00
Mitchell Livingston d7ab7d9012 #4387 Update miniupnpc to 1.6 2011-07-26 01:36:30 +00:00
Jordan Lee b14c44a3a6 (trunk libT) during the extended handshake, don't send the "m" dict if it doesn't have any entries. 2011-07-25 22:33:07 +00:00
Jordan Lee 8fab45f0fc undo r12585, where I checked in the wrong file. 2011-07-25 22:30:56 +00:00
Juliusz Chroboczek 7eda3ae2ec Add stub for the DHT blacklisting support.
Using blacklists with Kademlia is not a good idea, which is why we
don't support it in Transmission.  However, some people insist on
implementing the support in their own copies, this well-defined
hook ensures that at least they'll do it right.
2011-07-25 21:30:46 +00:00
Jordan Lee fe42e456b4 (trunk libT) during the extended handshake, don't send the "m" dict if it doesn't have any entries. 2011-07-25 20:46:56 +00:00
Juliusz Chroboczek 17d1210b95 Reword debugging messages for the IPv4 DHT.
The IPv6 DHT is no longer expermiental, no need for the asymmetry.
2011-07-25 19:53:39 +00:00
Jordan Lee 434a988165 (trunk libt) #4305 "New Torrent via RPC Error:No data found when subfolder does not exist" -- revert r12076 s.t. parent directories are created as necessary when saving local data to disk. 2011-07-25 17:48:14 +00:00
Jordan Lee feb4ddadd5 (trunk libT) #4383 "transmission-create bug when using leading ./" -- fixed. 2011-07-24 20:18:33 +00:00
Jordan Lee 3928a9d8e9 (trunk libT) #3219 "Don't scrape paused torrents" -- allow this as a 'hidden' option in settings.json, but don't add it to the GUI or to RPC. 2011-07-23 17:14:12 +00:00
Jordan Lee 5076efd20e (trunk libT) "DHT and blocklists are incompatible" -- revert r12544. 2011-07-22 17:47:08 +00:00
Jordan Lee bd6aaf9a12 (trunk libT) remove trailing spaces from a couple of lines of code 2011-07-17 18:11:34 +00:00
Jordan Lee f8c92d06e6 (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:34:33 +00:00
Jordan Lee dcd7bed20a (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:33:20 +00:00
Jordan Lee b4960a3f29 (trunk libT) fix minor compiler warning when compiling with assertions disabled 2011-07-17 14:32:51 +00:00
Jordan Lee efc306a8d3 (trunk libT) truncate the fractions when formatting KB/s speeds 2011-07-17 14:15:02 +00:00
Jordan Lee de34a0545b (trunk libT) minor #include cleanups 2011-07-13 03:23:37 +00:00
Jordan Lee a4e095b26f (trunk libT) #4016 "blocklists loaded in Transmission should be used to filter DHT communication." -- fixed. 2011-07-12 12:30:17 +00:00
Jordan Lee 7b71470ea0 (trunk libT) #4351 "DHT can't be uninitialized during a session" -- don't process incoming DHT messages if DHT is disabled. Don't process incoming UTP messages if UTP is disabled. 2011-07-12 12:26:24 +00:00
Jordan Lee 731ee3640c (trunk libT) remove unnecessary "UNUSED" attribute 2011-07-12 12:24:41 +00:00
Jordan Lee 2c69c42554 (trunk libT) restore setrlimit(), although in an non-configurable mode. 2011-07-11 20:48:06 +00:00
Jordan Lee 9b208d2777 (trunk libT) possible fix for three related tickets. still needs more testing.
#3732 "Delete system files when removing torrent data"
#4224 "Folders don't get deleted"
#3871 "torrent-set-location does not delete old folder if only one file in torrent"
2011-07-10 17:34:03 +00:00
Jordan Lee 2317f08d38 (trunk libT) #4338 "improved webseed support" -- patch by alexat 2011-07-10 15:24:51 +00:00
Jordan Lee fdec244f04 (trunk libT) #4336 "availablility nonsense" -- fix bug in tr_cpMissingBytesInPiece() introduced last week by r12515 for #4332. Add assertions to the nightly build to watch for regressions of this fix.
The bug was that I fixed #4332's off-by-one improperly in tr_cpMissingBlocksInPiece(). The piece's last block has to be calculated separately because its byte size may be different than the other blocks, The mistake in r12515 was that the last block could wind up being counted twice.
2011-07-02 13:20:17 +00:00
Jordan Lee 23adb55d2e (trunk libT) #4101 "RPC method blocklist-update is broken" -- use lower-level zlib API calls so that we can skip writing a temporary gzipped file to disk 2011-06-26 17:05:17 +00:00
Jordan Lee b4ffdaac42 (trunk libT) #4277 "Checkmarks for leechers" -- possible fix.
It appears 2.30 and 2.31 might be making too many assumptions about which peers are seeds.
2011-06-25 19:29:25 +00:00
Jordan Lee 34642e7259 (trukn libT) lessen the importance of error messages returned by trackers in a multi-tracker torrent. It's all too often that people will load up a .torrent file with dozens of announce URLs, many of them dead... 2011-06-25 18:47:35 +00:00
Jordan Lee 42a49a6c70 (trunk libT) #4332 "countRange/countArray exception" -- fix bug in tr_cpMissingBytesInPiece() 2011-06-25 13:31:25 +00:00
Jordan Lee 35fb00fd9e (trunk libt) #4315 "Transmission 2.31 crashes (segfaults) immediately after launch" -- remove the "max-open-files" code.
max-open-files might have been a nice configuration option once, but (1) we've never advertised it in the gui apps, and (2) the crazy cases are causing more trouble than this feature is worth. It's more complicated now after #4164 -- see #4294, #4311, and this ticket.
2011-06-24 22:39:20 +00:00
Jordan Lee f5815a89bf (trunk libT) minor code formatting 2011-06-24 19:30:25 +00:00
Jordan Lee 2d3fdc4235 (trunk libT) the edge condition bug in ptrarray's bsearch code seems to be fixed, so let's commit the fix with lots of assert()ions enabled so that the nightly build users can show me where I'm wrong :) 2011-06-24 18:25:56 +00:00
Jordan Lee 2362580e0e (trunk libT) add a unique key to each tr_bandwidth object, so that when sorting them arbitrarily we can use that key rather than their pointer address. Apparently comparing pointers that aren't allocated in the same array is undefined behavior. 2011-06-19 18:34:10 +00:00
Jordan Lee f134858453 (trunk libT) avoid thread issues on startup by ensuring that tr_sessionLoadTorrents() runs in the libtransmission thread. 2011-06-19 18:30:57 +00:00
Jordan Lee bcf89fa9c3 (trunk libT) modify how the "stops" sorted container is used s.t. the container's uniqueness requirements are met. 2011-06-19 18:26:04 +00:00
Jordan Lee 437ebe32c7 (trunk libT) don't use tr_list for the tr_web_task queue 2011-06-19 18:18:48 +00:00
Mitchell Livingston 62f594267a #4326 flags for completeness and wasRunning flipped in completeness callback 2011-06-19 03:31:41 +00:00
Mitchell Livingston 0a5d025568 add µTorrent Embedded to the client list 2011-06-16 12:08:52 +00:00
Jordan Lee f6d68844bd (trunk libT) #4101 "RPC method blocklist-update is broken" -- add debugging error messages for cases where gzopen/gzread fails 2011-06-10 05:34:16 +00:00
Jordan Lee 0aa163dfe9 (trunk libT) #4295 "'download-dir-free-space' contains garbage" -- fixed by bugmenot patch 2011-05-30 18:17:16 +00:00
Jordan Lee 3f6ffb90c2 (trunk libt) #4301 "strerror used instead of tr_strerror -- fix in peer-io.c too 2011-05-30 15:50:50 +00:00
Jordan Lee 7f2e4084dc (trunk libT) fix webseed issue reported by Alex Hartl 2011-05-29 14:59:00 +00:00
Jordan Lee d6e39e4d2f (trunk libT) #4284 "crash via webfrontend or transmission-remote" -- use patch from jerwied 2011-05-27 23:28:40 +00:00
Jordan Lee dcf814a481 (trunk libT) #4283 "Remove 'Prefetch failed' error message" -- done. 2011-05-27 23:26:05 +00:00
Jordan Lee 33eb6d3f9e (trunk) #3817 remove OS proxy integration from the GTK+ client 2011-05-27 13:36:53 +00:00
Jordan Lee eb53352d40 fix an r12447 typo -- SoMud's two-letter prefix is SM, not SO 2011-05-20 18:00:57 +00:00
Jordan Lee c453175e0e (trunk libT) recognize a few more peer apps by name: Arctic, BitBuddy, GSTorrent, Hekate, Meerkat, SoMud, SymTorrent, TuoTu, and XSwifter 2011-05-20 17:55:48 +00:00
Jordan Lee 52512857ae (trunk libT) better r12434 2011-05-16 07:11:21 +00:00
Jordan Lee 7cd9cc0176 (trunk libT) #4237 "tarnsmission-remote -l shows torrent list in reverse order" -- revert r12424 to fix this 2011-05-16 02:09:31 +00:00
Jordan Lee a4ab013568 (trunk libT) fix magnet link crash in peer-msgs.c's updateDesiredRequestCount() reported by quinx in the forums.
In some odd cases (such as if unchoked without having shown interest), the code could dividing a number by the torrent's block size without checking to see if the torrent had its metadata yet. This caused a division by zero because a magnet torrent's blocksize is unset until the metadata is downloaded.
2011-05-12 06:43:40 +00:00
Jordan Lee ddaaa92c31 (trunk libT) make allocateBandwidth()'s "priority" field const. 2011-05-11 21:09:31 +00:00
Jordan Lee d32c5b36c7 (trunk libT) minor CPU improvement to peer-mgr.c's bandwidthPulse()
We looped through all the torrents 3x to do three separate tasks... instead, loop only once and do the three tasks inside the single loop.
2011-05-10 14:41:59 +00:00
Jordan Lee ffba6a16bd (trunk libT) oops, r12424 included a second CPU improvement patch that I had in the pipeline. Fix a typo in that patch. 2011-05-10 05:18:40 +00:00
Jordan Lee 94cc3f87f7 (trunk libT) CPU improvement in torrent.c's torrentInit()
Add the new torrent to the session's torrent list by prepending it instead of appending it. That way we don't have to walk the list in order to add it. tr_session.torrentList is an unordered list, so there's no real difference between prepending and appending.
2011-05-10 04:46:44 +00:00
Jordan Lee 3aaeaddbaf (trunk libT) CPU optimization in peer-mgr.c's rechokeDownloads()
Instead of recalculating interesting pieces for each peer we loop through, calculate them just once into a bitfield and then reuse that bitfield inside the loop.
2011-05-10 03:50:54 +00:00
Jordan Lee 0b11909854 (trunk libT) small CPU optimization in bitfield.c's countRange() 2011-05-10 03:43:06 +00:00
Jordan Lee 6a38a368d6 (trunk libT) CPU improvement in peer-mgr.c's getPeerCandidates()
getPeerCandiates() used to read through all the torrents to determine the global peer connections, and then again to determine the global peer candidates. Now this is done in one loop instead of two.
2011-05-10 01:51:12 +00:00
Jordan Lee 3c3fda5c66 (trunk libT) CPU optimization in tr_bandwidthClamp().
Don't call tr_time_msec() if it's not necessary. This was one of the top CPU sinks in profiling, so removing it is a nice improvement in cases when it's not necessary, such as when speed limiting is disabled.
2011-05-09 04:16:49 +00:00
Jordan Lee c0e1cd8007 (trunk libT) torrent-get CPU optimization.
Move the tr_torrentStat() call outside of the addField() loop so that it's only called once instead of N times.
2011-05-09 04:13:14 +00:00
Jordan Lee 3269d99287 (trunk libT) experimental fix for the unterminated announce URLs reported by blacklion in the forums 2011-05-05 20:41:09 +00:00
Jordan Lee 45669fed08 (trunk libT) #4227 "invalid URLs aren't filtered out of .torrents' webseed lists"
If we can't parse a URL provided in the .torrent files' webseed list, that URL should be discarded.
2011-05-05 03:10:51 +00:00
Jordan Lee f8f02fe7c3 (trunk libT) #2338 "Add uTP support" -- increase the block bandwidth to 3000 bytes in phase 1 as suggested by jch in comment:120.
The rationale is that by using 3000 bytes we'll send one full-size frame straight away, and leave enough buffered data for the next frame to go out in a timely manner.
2011-05-04 21:38:01 +00:00
Jordan Lee f5a0276332 (trunk libT) the functions tr_peerMsgsSetChoke() and tr_peerMsgsSetInterested() have bool arguments whose types never got switched from "int" to "bool" when "bool" was adopted. 2011-05-01 19:10:34 +00:00
Jordan Lee 50ceaafeb8 (trunk libT) very minor copyediting: remove a little unwanted whitespace 2011-04-30 00:08:24 +00:00
Jordan Lee 841bfffff8 (trunk libT) simplify the code in peer-mgr.c's rechokeDownloads().
The new code has fewer calls to malloc/free and, more importantly, has less copy-and-pasted code to handle the different rechoke states.
2011-04-29 23:25:12 +00:00
Jordan Lee 92ad42e10c (trunk libT) #4215 "bug in unchoking algorithm" -- fixed. 2011-04-29 22:39:54 +00:00
Jordan Lee 513a3fcc1d (trunk libT) tr_torrentGetFileMTime(): if the file being looked at is aleady open in fdlimit's file cache, use that cached handle instead of deriving our own. 2011-04-28 18:40:46 +00:00
Jordan Lee e514f93fd1 (trunk libT) in peer-mgr.c's refillUpkeep(), allocate the temporary array outside of the loop instead of inside... 2011-04-28 17:46:31 +00:00
Jordan Lee 1bddadf1c6 (trunk libT) #4212 "excessive UDP logfile entries in debug mode" -- fixed. 2011-04-28 02:51:07 +00:00
Jordan Lee 2ecca714f1 (trunk libT) heap pruning: use tr_bencToBuf() instead of tr_bencToStr() when building LTEP messages. This saves us from a handful of unnecessary malloc+memcpy+free calls in each instance where the change is made. 2011-04-27 21:38:45 +00:00
Jordan Lee c061390f65 (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free in tr_bencToFile() 2011-04-27 21:33:52 +00:00
Jordan Lee c9b54799e3 (trunk libT) tweak the ABI of tr_bencToBuf() to match the way it's being used 2011-04-27 21:22:08 +00:00
Jordan Lee 6e99c6cd69 (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when building the URL for a webseed download request 2011-04-27 20:52:07 +00:00
Jordan Lee aa41779aaa (trunk libT) heap pruning: using the same mechanism as in r12388, avoid an unnecessary malloc+memcpy+free when TR_CURL_VERBOSE is logging HTTP messages 2011-04-27 20:50:43 +00:00
Jordan Lee 5681ea73e2 (trunk libT) heap pruning: avoid unnecessary malloc+memcpy+frees in announcer.
1. when creating announce URLs in announcer-http.c
2. when creating scrape URLs in announcer-http.c
3. when deep-logging what announces are in a torrent's queue in announcer.c
2011-04-27 20:41:47 +00:00
Jordan Lee 2f95dd54e8 (trunk libT) heap pruning: lazy-allocate the array in peer-mgr.c's getPeersToClose(). 2011-04-27 19:06:06 +00:00