Commit Graph

88 Commits

Author SHA1 Message Date
Mike Gelfand 6101a69957 Avoid possible `_XOPEN_SOURCE` redefinition warning 2015-06-23 21:16:33 +00:00
Mike Gelfand e0dc1d6735 Fix some issues revealed by coverity 2015-05-09 14:10:55 +00:00
Mike Gelfand 4cfe7e7ddb #4400, #5462: Move SHA1 helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing SHA1 calculation to crypto-utils.{c,h}. OpenSSL-related
functionality (SHA1 context management) is moved to crypto-utils-openssl.c.

Add new tr_sha1_ctx_t type and functions to be implemented by crypto
backends:
* tr_sha1_init - allocate SHA1 context and and initialize it,
* tr_sha1_update - hash some [more] data,
* tr_sha1_final - finish hash calculation and free the context.

Add new files to CMakeLists.txt (leftover from previous commit) to fix
CMake-based configuration.
2014-12-04 12:13:59 +00:00
Mike Gelfand e30728367f #5771: Use true and false instead of 1 and 0 for bool variables (patch by ticamkq + additional fixes) 2014-11-30 19:38:47 +00:00
Jordan Lee b33a7d4dc1 (trunk, libt) #4160 - the slow slog to catch trunk up to mike.dld's 4160 diff continues. This step applies 4160-03b-file.patch, which replaces native file operations with the tr_sys_file_*() portability wrappers added in r14321. 2014-07-28 04:13:38 +00:00
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 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 ef9d4eee33 (libT) ensure that tr_torrentVerify()'s completion callback gets invoked even if it's removed from the verify queue before it gets a chance to run. 2013-02-01 00:21:30 +00:00
Jordan Lee 69f3e31230 (libT) change the API signature for tr_torrentVerify() s.t. client code can be notified when the verify is finished 2013-01-31 21:58:25 +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 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 b4d36aeb54 (trunk) #4138 "use stdbool.h instead of tr_bool" -- done. 2011-03-22 15:19:54 +00:00
Jordan Lee 374ed10f3b (trunk) it's bad form to #include so many system headers in libtransmission/utils.h... 2011-03-16 18:04:23 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Charles Kerr e5bb3205a1 (trunk) Join the 21st century and use only 1 space at the end sentences. This commit is nearly as important as the semi-annual ones that remove trailing spaces from the ends of lines of code... :) 2010-12-27 19:18:17 +00:00
Charles Kerr 6b7babde5c (trunk libT) remove some of the lazy-verify debug messages. 2010-12-21 23:09:26 +00:00
Charles Kerr 43ed57b278 (trunk libT) #2955 "Lazy Verification (aka Just-in-Time Verification)" -- implemented. 2010-12-09 20:43:23 +00:00
Charles Kerr 9335e02e6d (trunk libT) add some new bugs to the code so that it will crash when vraa tries to use it 2010-11-11 15:31:11 +00:00
Charles Kerr 6e29ad9459 (trunk libT) #3716 "take torrent priority into account when choosing which torrent to verify next" -- done. 2010-11-06 15:59:51 +00:00
Charles Kerr 851ed9f929 (trunk libT) #3622 "verification ignores return value of pread" -- commit fixVerify.patch 2010-10-19 13:56:58 +00:00
Charles Kerr 5c46cdb161 (trunk libT) remove dead variable pieceBytesRead from verify.c. Reported by Longinus00 2010-10-12 15:52:20 +00:00
Charles Kerr e7cf05a6ba (trunk libT) #3427 "use shortest-job-first scheduling for verifying local data" -- patch from wateenellende and sadface 2010-07-19 14:44:24 +00:00
Charles Kerr 254a1f15cb (trunk libT) down the rabbit hole: various minor type correctness changes unearthed by -Wconversion 2010-06-30 16:40:19 +00:00
Charles Kerr 8a835610c6 (trunk libT) remove unused code 2010-06-28 13:42:45 +00:00
Charles Kerr a1b85a633c (trunk libT) #3234 "Checking existing data can show 100%" -- fixed in trunk for 2.00 2010-05-26 16:40:47 +00:00
Charles Kerr 035dea80df (trunk libT) fix r10689 oops 2010-05-25 20:42:32 +00:00
Charles Kerr 25a5b2918a (trunk libT) #3231 "Check existing data is extremely slow" -- increase the read buffer size as suggested by eridius 2010-05-25 20:19:34 +00:00
Charles Kerr d0873d8369 (trunk libT) reduce the period to sleep per second during verification from 200 msec to 100 msec 2010-04-28 19:04:09 +00:00
Charles Kerr c615514944 (trunk libT) add a wrapper function tr_valloc() to try posix_memalign(), getpagesize(), valloc() etc 2010-02-23 06:06:45 +00:00
Mitchell Livingston 3ff11837d4 disable posix_memalign() on Mac - it requires 10.6 2010-02-22 02:36:17 +00:00
Mitchell Livingston b562dc13ec Mac has getpagesize() and posix_memalign() 2010-02-22 02:21:50 +00:00
Charles Kerr 204243c5bd (trunk libT) #2952: "When possible, use posix_memalign() instead of valloc()" -- fixed in trunk for 1.91 2010-02-22 01:01:59 +00:00
Charles Kerr c0cf694b85 (trunk libT) optimize out some unnecessary cycles when there are missing files in a torrent being verified 2010-02-13 05:46:31 +00:00
Charles Kerr adc7d6f8a4 (trunk libT) minor tweak to verify: use tr_pread() instead of lseek+read 2010-02-12 21:06:21 +00:00
Charles Kerr d3ae2cf696 (trunk libT) use valloc() and st.st_blksize when verifying local data 2010-02-12 19:59:30 +00:00
Charles Kerr 5c26afdb52 happy new year! 2010-01-04 21:00:47 +00:00
Charles Kerr 283b6d6a36 (trunk libT) rename tr_wait() tr_wait_msec() 2010-01-01 22:30:36 +00:00
Mitchell Livingston 8dbfb708f5 #2696 posix_fadv_dontneed undeclared 2009-12-25 15:48:41 +00:00
Eric Petit a91c5e44e3 build fix 2009-12-16 07:47:04 +00:00
Charles Kerr 122d69d013 (trunk libT) try not to cache file data read in during verification 2009-12-16 06:34:17 +00:00
Charles Kerr 78ead8c3dd (trunk) update the copyright notices 2009-12-05 02:19:24 +00:00
Charles Kerr e1c6b792aa (trunk libT) #2610 "avoid unnecessary calls to time(NULL)" 2009-11-26 18:47:08 +00:00
Charles Kerr 05c77cc975 (trunk) #1483: move completed torrents to a user-specified directory + #629: different file extension for incomplete files 2009-10-19 05:05:00 +00:00
Charles Kerr 504eaa6410 (trunk, libT) #2425: New torrents are verified after pause. 2009-10-11 03:10:17 +00:00
Charles Kerr fa1fa11fdb (trunk, libT) #2390: when you add a new torrent while one is verifying local data, the new torrent will be added on wait list, rather than download automatically. (Reported by Adys in irc) 2009-09-09 12:44:11 +00:00
Charles Kerr c930f805cb (trunk libT) #2383: Faster verification for local data with small piece size 2009-09-06 14:05:06 +00:00
Charles Kerr f7129f2f30 (trunk libT) #2335: when verifying local data, pause a few msec between pieces to give the system some breathing room and other processes a shot at the disk IO 2009-08-14 20:55:22 +00:00