Commit Graph

617 Commits

Author SHA1 Message Date
Jordan Lee 02cff80c2d Copyedit the license's revised text: (1) remove unnecessary repitition use of the word 'license' from the top of the header and source files (2) add the standard 'we hope it's useful, but no warranty' clause to COPYING (3) make explicit that linking OpenSSL is allowed (see https://people.gnome.org/~markmc/openssl-and-the-gpl.html for background) (4) sync the Qt and GTK+ clients' license popups with COPYING's revised text 2014-01-21 03:10:30 +00:00
Jordan Lee 4b9626bb83 Licensing changes:
1. add the option the code to be used under GPLv2 or GPLv3; previously only GPLv2 was allowed

2. add the "proxy option" as described in GPLv3 so we can add future licenses without having to bulk-edit everything again :)

3. remove the awkward "exception for MIT code in Mac client" clause; it was unnecessary and confusing.
2014-01-19 01:09:44 +00:00
Jordan Lee 4904b923fb (trunk) restore copyright year as suggested in email by rms 2014-01-18 20:56:57 +00:00
Jordan Lee 605e2e89ad use evutil_socket_t instead of int to define socket types. Patch my mikedLd :) 2013-09-08 17:03:11 +00:00
Jordan Lee 35638e210e add inline wrapper functions to tr_torrent to decouple the rest of the code from tr_completion 2013-08-18 13:06:39 +00:00
Jordan Lee 0f1f84898b silence a small handful of minor gcc compiler warnings in libtransmission 2013-08-17 17:20:31 +00:00
Jordan Lee de248c94fb in peer-msgs.c's tr_peerMsgsCalculateActive(), adjust some of those new tracer assertions to work better with magnet links. 2013-07-09 17:05:32 +00:00
Jordan Lee 0c507637db in peer-mgr.c's tr_peerMgrGetDesiredAvailable(), confirm we have a swarm pointer before using it. Probable fix for bug #5407 2013-07-08 17:46:12 +00:00
Jordan Lee 058e430251 fix bug #5372, 'wrong peer states displayed'. 2013-07-08 16:41:12 +00:00
Jordan Lee 43b3a47661 (trunk, libT) #53737 fix 2.77+ nightly regression that misreported the number of webseeds 2013-06-09 18:56:10 +00:00
Jordan Lee 30882e69b1 (trunk libT) fix 2.7x crash when dealing with webseeds 2013-06-09 18:39:24 +00:00
Jordan Lee 3fb74c4e00 (trunk, libT) fix tr_torrentStat() regression in the nightlies reported in #5294 by mw3demo 2013-05-27 21:04:48 +00:00
Jordan Lee 094af58f29 undo previous commit's accidental inclusion of changes to peer-msgs.* and peer-mgr.c 2013-05-22 19:06:54 +00:00
Jordan Lee d81f956daa (trunk, libT) #5356 'only set CURLOPT_COOKIEFILE if cookies.txt exists on startup' -- fixed. 2013-05-22 19:02:07 +00:00
Jordan Lee 96691dd019 (libT) make the class hierarchy between tr_peer, tr_peerMsgs, and tr_webseed a little less ad-hoc 2013-02-04 16:23:33 +00:00
Jordan Lee 8a33a1b315 (libT) increment the announced downloadCount only when the piece becomes complete. 2013-01-30 20:06:12 +00:00
Jordan Lee 553bd58681 (libT) peer-mgr doesn't care about non-piece data being transferred, so don't notify it when it happens 2013-01-30 18:00:03 +00:00
Jordan Lee e85ece214e (libT) rename internal struct 'tr_torrent_peers' as 'tr_swarm' 2013-01-27 21:03:52 +00:00
Jordan Lee 388da24dd0 (libT) add package-visible API hook for when a block is downloaded. Add unit test to confirm that when the last file finishes downloading, its .part suffix is removed and it's moved from the incomplete to complete dir 2013-01-26 23:08:51 +00:00
Jordan Lee f75027d5e9 make all the log functions/structs/enums use a single 'tr_log' namespace, such as tr_logGetQueue, tr_logAddInfo, tr_logIsLevelActive 2013-01-25 23:34:20 +00:00
Jordan Lee ad3407567b (libT) copyediting: modify more files to the new indentation/whitespace formatting 2013-01-24 23:59:52 +00:00
Jordan Lee bcc130e804 in getReconnectIntervalSecs(), raise the interval between reconnection attempts if the peer was previously unreachable 2013-01-17 20:08:21 +00:00
Jordan Lee 4d627b79c2 (libT) tweak getMaxAtomCount() 2013-01-17 01:10:59 +00:00
Jordan Lee 3c9640bb8f make tr_info.webseedCount and tr_info.trackerCount unsigned. 2012-12-30 22:06:45 +00:00
Jordan Lee aa906ced75 (trunk, libT) #5199 'tr_sessionGetNextQueuedTorrent() can be faster' -- modify session.c's tr_sessionGetNextQueuedTorrents() and peer-mgr.c's getPeerCandidates() functions use the new tr_quickfindFirstK() utility" 2012-12-28 20:10:03 +00:00
Jordan Lee 7ff9e2d2ba copyediting: correct a couple of code comments. 2012-12-28 08:35:14 +00:00
Jordan Lee c1559f3cc4 (trunk, libT) first drop of the tr_quark patch. 2012-12-22 20:35:19 +00:00
Jordan Lee aea6d7cd6f (trunk, libT) #5168 'make libtransmission's public funcs nonblocking when possible' -- remove tr_torrentRef() and tr_torrentUnref() as discussed in https://trac.transmissionbt.com/ticket/5168#comment:8 2012-12-14 20:04:37 +00:00
Jordan Lee 399c3233b7 remove a couple of unnecessary torrentIsLocked() assertions for #5168 2012-12-12 20:57:13 +00:00
Jordan Lee 079c78981c (trunk) #5168 'make libtransmission's public funcs nonblocking when possible' -- first attempt. 2012-12-12 20:22:57 +00:00
Jordan Lee a2d2a10226 (trunk, libT) #5165: fix r13625 oops 2012-12-07 01:53:31 +00:00
Jordan Lee 3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee ebd4b5e386 (trunk, libT) #5063 'remaining time unknown with magnets that have webseeds' -- fixed. 2012-10-05 22:04:08 +00:00
Jordan Lee 3398a48e57 (trunk libT) #4402 "Transmission Bandwidth allocation getting overflows" -- use gvdl's patch '4402-uint-bpsoverflow.patch' 2012-07-01 02:17:35 +00:00
Jordan Lee 99b615b3b8 (trunk libT) #4931 "Wrong peer percentages for magnetized transfers" -- fixed.
tr_peerUpdateProgress() is guessing at the progress size, but when we don't have the data size yet that guess isn't very good. Add boundary
 clamps on the peer.progress field.
2012-07-01 02:00:02 +00:00
Jordan Lee d717248e75 (trunk libT) fix the Linux build wrt compiling with the new snapshot of libutp checked into r13317
Previously we made sure to include stdbool.h (via transmission.h) before utp.h, since the latter used 'bool' without defining it. The new snapshot defines it unconditionally in non-C++ code, so now we need to include it first.
2012-05-30 17:47:29 +00:00
Jordan Lee cac5c360f2 (trunk libT) #4690 "getPeerCandidates() uses more CPU than necessary" -- fixed.
Once we've scored all n candidates, we sort them by score so that we can pick out the k best candidates. If n is large, sorting them can be expensive. If we use the Selection Algorithm, we select in O(n) without having to sort.
2011-12-31 21:28:53 +00:00
Jordan Lee 2786136015 (trunk) #4490 "Transmission 2.40b1 fails to build: undefined references" -- fixed. 2011-10-08 23:53:27 +00:00
Jordan Lee bf6c2a0df7 peer.have was being initialized to the block count, rather than the piece count, resulting in wasted overhead. 2011-09-26 22:48:50 +00:00
Jordan Lee daa795fb6a #4496 'freeze when having a huge torrent' -- more tweaks based on Shark reports from MechMK1 2011-09-21 23:04:39 +00:00
Jordan Lee 3778da6f82 remove dead code 2011-08-08 16:58:29 +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 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 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 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