1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00
Commit graph

12595 commits

Author SHA1 Message Date
Mike Gelfand
67dc1c8485 Strip spaces around :: in C++ code (Qt client) 2014-12-12 23:05:10 +00:00
Mike Gelfand
faf1b2fbdf #5848: Use theme-provided icons in Qt client (patch by equeim + small additions) 2014-12-12 21:47:22 +00:00
Mike Gelfand
79848c36c0 #5841: Fix initial watchdir scan in Qt client
Run the initial scan after application has finished initializing and
session has been created. Otherwise, adding torrents is a no-op.
2014-12-11 22:21:24 +00:00
Mike Gelfand
64757f640a #5685: Use proper icon in Qt client desktop file (reported by rahulsundaram) 2014-12-11 20:13:45 +00:00
Mike Gelfand
aedfc35393 #5692: Fix build under Cygwin (patch by rb07) 2014-12-11 20:06:07 +00:00
Mike Gelfand
74c6719bb2 #5407: Fix crash on Mac when pausing torrents (patch by x190) 2014-12-11 19:57:52 +00:00
Mike Gelfand
7de6a52e14 Fix utils test; move -Winline to C-only flags (it only harms C++) 2014-12-11 05:25:26 +00:00
Mike Gelfand
fed15dc29d Fix a couple of ordinary and pedantic warnings
Add previously missing -Wall to warning flags in CMake. Remove -Wformat
and -Wvariadic-macros (enabled by default; latter is not meaningful in
C99 mode we use), -Wdeclaration-after-statement (again, not needed as
we use C99). Move -Wmissing-declarations to C-only flags (GCC man says
so).

Add copyrights year to crypto-utils-fallback.c.
2014-12-11 05:11:02 +00:00
Mike Gelfand
bb09ad5a50 Add missing svn:keywords property to recently (and not so recently) added files 2014-12-10 18:58:12 +00:00
Mike Gelfand
4fe156a255 Fix tr_moveFile error reporting
Remove unused `renamed` argument.
Use tr_error instead of errno to report errors to support Win32 file
wrappers which do not map Windows error codes to POSIX ones.
Return bool instead of int (0/-1).

Uncomment tr_error_prefix and tr_error_propagate_prefixed functions.
2014-12-10 18:37:58 +00:00
Mike Gelfand
a3fdd5f029 #5369: Improve file allocation error checking (initial patch by g.proskurin)
Additionally,
* always close file descriptor on error in cached_file_open (FD leak),
* only store file descriptor to tr_cached_file on success,
* call ftruncate after xfsctl-based preallocation so that correct size
  is reported by the system.
2014-12-10 18:23:11 +00:00
Mike Gelfand
1560ebd3ff Fix small memory leaks in crypto (base64) and rename (multi-file torrent) unit tests 2014-12-07 10:42:12 +00:00
Mike Gelfand
b9d844b166 Increase move test timeouts from 5 sec to 5 min 2014-12-07 10:10:16 +00:00
Mike Gelfand
5a05ceee5e Include CTest to enable memcheck 2014-12-07 10:00:34 +00:00
Mike Gelfand
e7382071d0 Remove duplicate -Wcast-align flag, add canonicalize_file_name function check 2014-12-06 16:28:53 +00:00
Mike Gelfand
627555f47b #4400, #5462: Fix Mac build by adding new crypto-utils files to Xcode project. 2014-12-05 23:41:09 +00:00
Mike Gelfand
42de056a4b #4400, #5462: Move SHA1/HEX 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/HEX conversion to crypto-utils.{c,h}.

Rename functions:
* tr_sha1_to_hex -> tr_binary_to_hex (add length argument),
* tr_hex_to_sha1 -> tr_hex_to_binary (add length argument).

Make tr_sha1_to_hex and tr_hex_to_sha1 wrappers around above functions.
2014-12-04 20:53:56 +00:00
Mike Gelfand
748f8a75d2 #4400, #5462: Move SSHA1 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 SSHA1 password generation and checking to crypto-utils.{c,h}.
2014-12-04 20:45:18 +00:00
Mike Gelfand
5c43b5c23c #4400, #5462: Move BASE64 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 BASE64 encoding and decoding to crypto-utils.{c,h}. OpenSSL-
related functionality is moved to crypto-utils-openssl.c.

Add new functions to be implemented by crypto backends:
* tr_base64_encode_impl - encode from binary to BASE64,
* tr_base64_decode_impl - decode from BASE64 to binary.

Change `tr_base64_encode` and `tr_base64_decode` functions to expect
non-negative input data length which is considered real and never adjusted.
To process null-terminated strings (which was achieved before by passing 0
or -1 as input data length), add new `tr_base64_encode_str` and
`tr_base64_decode_str` functions which do not accept input data length as
an argument but calculate it on their own.
2014-12-04 19:58:34 +00:00
Mike Gelfand
117ab3e8d2 #4400, #5462: Move DH 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 DH key exchange to crypto-utils.{c,h}. OpenSSL-related
functionality (DH context management) is moved to crypto-utils-openssl.c.
Since we know in advance that DH secret key management code will be the
same for most of backends, implement common functionality in separate
crypto-utils-fallback.c.

Add new tr_dh_ctx_t and tr_dh_secret_t types and functions to be
implemented by crypto backends:
* tr_dh_new - allocate DH context,
* tr_dh_free - free the context,
* tr_dh_make_key - generate private/public keypair,
* tr_dh_agree - perform DH key exchange and generate secret key,
* tr_dh_secret_derive - calculate secret key hash,
* tr_dh_secret_free - free the secret key,
* tr_dh_align_key - align some DH key in the buffer allocated for it.

Make DH secret key not accessible in plain form outside the crypto
backend. This allows for implementations where the key is managed by
the underlying library and is not even exposed to our backend.
2014-12-04 19:18:08 +00:00
Mike Gelfand
7e23390fa2 #4400, #5462: Do not assert on input to SHA1 or RC4 if input length is 0. 2014-12-04 18:20:46 +00:00
Mike Gelfand
d424ed143e #4400, #5462: Move RC4 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 RC4 ciphering to crypto-utils.{c,h}. OpenSSL-related
functionality (RC4 context management) is moved to crypto-utils-openssl.c.

Add new tr_rc4_ctx_t type and functions to be implemented by crypto
backends:
* tr_rc4_new - allocate RC4 context,
* tr_rc4_free - free the context,
* tr_rc4_set_key - set cipher key,
* tr_rc4_process - cipher memory block.
2014-12-04 12:37:08 +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
f6f7bf8227 #4400, #5462: Move random 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 random numbers/data generation to crypto-utils.{c,h}. OpenSSL-
related functionality (generation of cryptographically strong random
data) is moved to crypto-utils-openssl.c.

Rename functions to follow currently accepted style:
* tr_cryptoRandBuf -> tr_rand_buffer
* tr_cryptoRandInt -> tr_rand_int
* tr_cryptoWeakRandInt -> tr_rand_int_weak

Fix rare case of invalid value being returned from tr_rand_int. Return
value for abs(INT_MIN) may be undefined and thus negative, and so
tr_rand_int will return negative value which is incorrect (out of
requested and expected range).
2014-12-04 11:27:38 +00:00
Mike Gelfand
ecfa96bf38 Do not use target_include_directories which requires CMake 2.8.11 2014-12-02 20:42:33 +00:00
Mike Gelfand
b4a662ba37 Create QDBusConnection after QApplication has been initialized
Doing otherwise causes Qt warning "QDBusConnection: session D-Bus
connection created before QCoreApplication. Application may misbehave."
Also, don't try to do anything D-Bus-related if connection fails.
2014-12-01 21:05:44 +00:00
Mike Gelfand
3e43a308af Sync Qt translation files with current source code 2014-12-01 20:29:03 +00:00
Mike Gelfand
83c4edb008 #5828: Initial CMake build system support 2014-12-01 19:55:22 +00:00
Mike Gelfand
17769e2e2a #5077: Remove torrent file from watch directory even if "show options dialog" is not set (patch from rb07 + some improvements)
Refactor Session::addTorrent (add new method) to eliminate duplicate
code in options.cc and ensure that FileAdded object is being created
on torrent addition even with non-interactive workflow.
Move FileAdded class from options.{h,cc} to session.{h,cc}.
2014-12-01 19:24:07 +00:00
Mike Gelfand
13cad2fb55 #5722: Rename remaining WIN32 uses to _WIN32 2014-11-30 20:08:20 +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
Mike Gelfand
10e59dbc90 #5800: Add Ukrainian translation to Qt client (patch by olexn) 2014-11-30 18:43:50 +00:00
Mike Gelfand
d6c32595a6 #5827: Improve torrent files tree updating performance
Do not unnecessarily emit dataChanged signals for items which didn't change.
Cache file item indices to speedup lookup.
As a bonus, this also fixes wrong file progress display in rare cases.
2014-11-30 18:12:28 +00:00
Jordan Lee
ed12ddb090 fix infinite loop in deleteLocalData(). 2014-11-10 01:39:14 +00:00
Mitchell Livingston
0d49daf36d Yosemite: slight sseparation between pause/resume buttons in the toolbar 2014-10-18 16:41:31 +00:00
Mitchell Livingston
2187da2351 drop all units on stats times 2014-10-18 15:09:44 +00:00
Mitchell Livingston
a7444a21b5 Yosemite: use NSDateComponentsFormatter instead of custom time string code 2014-10-17 05:12:00 +00:00
Mitchell Livingston
953780f38e Improve the looks a bit on Yosemite. The app must now be compiled with the 10.10 SDK. 2014-10-16 13:01:17 +00:00
Eric Petit
82cc420214 Fix make dist 2014-09-24 05:58:34 +00:00
Jordan Lee
c54f220fe8 add libtransmission/file.c 2014-09-21 18:08:56 +00:00
Jordan Lee
870041d92d (trunk) #4160: mike.dld patch: 4160-08-args.patch 2014-09-21 18:06:28 +00:00
Jordan Lee
be290162c2 (trunk) #4160: mike.dld patch: 4160-07-env.patch 2014-09-21 18:05:14 +00:00
Jordan Lee
3e4ceecf03 #4160: mike.dld patch: 4160-06-misc.patch 2014-09-21 18:03:13 +00:00
Jordan Lee
01196c8c4f mikedld patch: 4160-05b-file-fmt.patch 2014-09-21 18:01:36 +00:00
Jordan Lee
a59d3392b6 (trunk, libT) #4160: apply mike.dld's patch: 4160-05a-file-fmt.patch 2014-09-21 17:58:22 +00:00
Jordan Lee
90bbbaefc3 (trunk, libT) #4160: apply mike.dld's patch: 4160-05a-file-fmt.patch 2014-09-21 17:57:45 +00:00
Jordan Lee
d9d66e3e42 (trunk, libt) #4160 - the slow slog to catch trunk up to mike.dld's 4160 diff continues. This step applies 4160-04b-dir.patch, which replaces native file operations with the tr_sys_dir_*() portability wrappers added in the previous commit. 2014-09-21 17:55:39 +00:00
Jordan Lee
51a90d0da0 (trunk, libt) #4160 - the slow slog to catch trunk up to mike.dld's 4160 diff continues. This step applies 4160-04a-dir.patch, which adds tr_sys_dir_*() portability wrappers. 2014-09-21 17:52:36 +00:00
Jordan Lee
728957c46a (trunk, qt) #5774 'Alternative Speed Limits Scheduled Times broken in transmission-qt' -- fixed, plus more gratuitous c++11isms 2014-08-26 23:26:00 +00:00
Jordan Lee
b325bc0a16 (trunk) #5759 compilation error, undefined reference to sqrt 2014-08-20 17:14:17 +00:00