Mike Gelfand
45f8bb8c40
#4400 , #5462 : Add possibility to test one crypto backend against another (reference) backend
2015-01-01 14:23:47 +00:00
Mike Gelfand
342f38bbc5
Factor RPC logic out from session (Qt client)
2014-12-27 20:03:10 +00:00
Mike Gelfand
eee49af2b4
Improve cross-compilation support when using CMake
2014-12-20 22:28:43 +00:00
Mike Gelfand
c845e35ce1
Fix format specifier warning introduced couple commits earlier
2014-12-13 17:04:14 +00:00
Mike Gelfand
74a5bdb9e6
Don't mess with MinGW printf support for now (tricky)
2014-12-13 16:00:14 +00:00
Mike Gelfand
52a9d774e4
Fix compilation on Windows
...
This should not affect non-Win32 platforms in any way.
As for Win32 (both MinGW and MSVC), this should hopefully allow for
unpatched compilation. Correct functioning is not yet guaranteed though.
2014-12-13 15:22:39 +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
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
83c4edb008
#5828 : Initial CMake build system support
2014-12-01 19:55:22 +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
Jordan Lee
ed12ddb090
fix infinite loop in deleteLocalData().
2014-11-10 01:39:14 +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
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
b325bc0a16
(trunk) #5759 compilation error, undefined reference to sqrt
2014-08-20 17:14:17 +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
ab24ef9fcb
use pkg-config to get the zlib cflags/libs; remove obsolete zlib.m4 macro
2014-07-13 21:54:56 +00:00
Jordan Lee
2e3ffdc6ec
since libz's been required in rpcimpl.c for ages and nobody's complained, remove the HAVE_ZLIB cruft for conditional-compiling with and without zlib.
2014-07-13 21:50:56 +00:00
Jordan Lee
c1beabfea6
(trunk, libT) #4160 'foreign character support' -- merge mike.dld's 4160-03a-file.platch, which introduces tr_sys_file_*() portability wrappers
2014-07-08 00:15:12 +00:00
Jordan Lee
0323639e57
(trunk, libT) #4160 'foreign character support' -- merge mike.dld's 4160-02b-path.patch, which updates the codebase to use the new tr_sys_path_*() portability wrappers introduced in 4160-02a
2014-07-08 00:08:43 +00:00
Jordan Lee
d7f4478679
(trunk, libT) #5735 'segfault iside node_alloc' -- fixed with patch by benjarobin
2014-07-06 20:06:45 +00:00
Jordan Lee
a2898f2ee9
(trunk, libT) #5656 'Problems renaming files' -- fixed, patch by rb07
2014-07-04 03:23:27 +00:00
Mitchell Livingston
0e01879974
Use built-in _WIN32 macro instead of WIN32
2014-07-04 00:00:07 +00:00
Jordan Lee
60a5c793d9
(trunk, libT) mike.dld's 4160-02a-path.patch: portability wrapper around file paths.
2014-07-03 21:58:39 +00:00
Jordan Lee
b939f98ec7
(trunk, libT) #5709 'Fix an instance of time_t printing' -- fixed, patch by naddy
2014-07-03 19:28:21 +00:00
Mitchell Livingston
084273c106
Use built-in __APPLE__ macro instead of SYS_DARWIN and MACOSX
2014-07-03 19:20:12 +00:00
Jordan Lee
821aa2aaff
fix tr_bencParseStr() bug reported by Ben Hawkes
2014-06-29 01:44:22 +00:00
Jordan Lee
b224148ed9
Fix peer communication vulnerability (no known exploits) reported by Ben Hawkes
2014-06-29 01:43:27 +00:00
Jordan Lee
92daae473e
mike.dld's portability improvements to libtransmission, pt 1
2014-06-23 02:38:53 +00:00
Jordan Lee
ef9370783a
(trunk, utils) in transmission-create, return an error if a user tries to manually set a piece size that isn't a power of two.
2014-06-10 00:43:21 +00:00
Jordan Lee
f433f2ee17
(trunk, libT) #5517 when parsing a torrent's metainfo's path list, allow empty components because some .torrent files innocently have them. Update unit tests.
2014-06-09 02:53:04 +00:00
Jordan Lee
4a61241406
(trunk, libT) #5714 : ensure we don't add empty path components when creating an info dict in tr_makeMetaInfo().
2014-06-09 01:14:14 +00:00
Jordan Lee
99eda37b5e
in makemeta-tests, add tests to generate a .torrent file from a folder of randomly-generated files.
2014-06-08 22:21:27 +00:00
Jordan Lee
e40a7d5359
(trunk) replace the tr_metainfo_builder.isSingleFile and tr_info.isMultifile fields an 'isFolder' bool in both structs.
...
This makes the variable naming more uniform. It also clarifies the information we're really trying to convey -- previously, isSingleFile was false whenever the torrent held a directory tree, even if there was only a single file in the tree.
Sync the Mac OS X client's use to match the libtransmission variable names.
2014-06-08 22:16:01 +00:00
Jordan Lee
db8a589ec4
add tr_makeMetaInfo() unit test for creating a single-file torrent
2014-06-08 20:01:10 +00:00
Jordan Lee
f17d152e2b
separate out the sandbox code so that test sandboxes can be created without a tr_session
2014-06-08 19:09:41 +00:00
Jordan Lee
755b47b498
builder.isSingleFile should be a bool, not an int.
2014-06-08 19:07:59 +00:00
Jordan Lee
a0fff80248
(trunk, libT) #5711 : add support for BitTorrent client peer-id
2014-06-07 15:07:51 +00:00
Jordan Lee
4bb7f61e31
fix tr_cryptoGetTorrentHash() behavior for crypto-test.c
2014-05-18 20:47:58 +00:00
Jordan Lee
6ee973aaac
(trunk) #5671 'dht-0.22': update third-party/dht.c to Juliusz Chroboczek's upstream v0.22
2014-05-05 20:45:14 +00:00
Jordan Lee
b00b90c48c
(trunk, libT) #5650 : 'make log timestamp format configurable' -- timestamp expanded to include full date/time/tz info, patch by mike.dld
2014-04-28 15:31:46 +00:00
Jordan Lee
5a2268289e
(trunk, libT) #5651 'int to bool patch' -- fixed, patch by rajmannugetr
2014-04-27 23:10:01 +00:00
Jordan Lee
8f5c7809e7
(trunk, libT) #5517 'Don't create or add torrents with "../" at the beginning of the path or "/../" anywhere in the path' -- fixed.
2014-04-27 20:17:16 +00:00
Jordan Lee
a7137b7bb9
upgrade miniupnp version to 1.9. update autoconf script to detect the API version; update upnp.c's #ifdefs to use the API version.
2014-04-27 19:31:10 +00:00
Jordan Lee
fef15a7ab2
(trunk, libT) #5643 'quota support for NetBSD >= 6' -- patch by wiz
2014-04-27 00:02:00 +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
d49b8b6650
(trunk, libT) #5467 : 'transmission-daemon SEGFAULTs on startup without error message if ~/.config does not exist and ~ is not writeable' -- nice quick fix by mike.dld
2014-01-21 02:27:46 +00:00
Jordan Lee
1637da5c1d
when we free the UDP trackers on shutdown, make sure to cancel any DNS requests that are pending for them.
2014-01-20 23:18:52 +00:00
Jordan Lee
b342c2c180
(trunk, libT) #4089 : 'magnet download not verified for existing data' -- patch by cfpp2p
2014-01-19 05:03:27 +00:00
Jordan Lee
2ec84b2e32
(trunk, libT) #5573 'crypto unit test' -- written by mike.dld
2014-01-19 04:41:20 +00:00
Jordan Lee
fa23e1e60a
(trunk, libT) #5517 'fix error adding torrents whose names with an ellipsis' -- fix by e5g6s.
2014-01-19 04:19:14 +00:00
Jordan Lee
f470ab3210
(trunk, libT) #5583 'blockfile.tmp file descriptor is leaked when importing blocklist' -- fix by rb07.
2014-01-19 02:03:41 +00:00
Jordan Lee
9fc4260295
(trunk, libT) #5570 'regression: peers no longer load from .resume files' -- fix submitted by Nonal
2014-01-19 01:55:54 +00:00
Jordan Lee
15d11de5f4
add svn:keywords on source files that were missing them
2014-01-19 01:29:38 +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
2002253802
(trunk, libT) allocate in jsonsl, allocate jpr_root using the correct integral type. upstream xref: https://github.com/mnunberg/jsonsl/issues/6
2013-12-16 16:32:55 +00:00
Mitchell Livingston
4ecbb29137
#5304 daemon fails to build on mac
2013-10-27 19:31:36 +00:00
Jordan Lee
cd00ad4f55
(trunk, libT) #5450 : when starting torrents via RPC with torrent-start or torrent-start-now requests, work through the rpc-supplied torrent list in queue order
2013-10-20 17:24:57 +00:00
Jordan Lee
451d398aa6
(trunk, libT) #5427 'torrents start in pause' -- fix resume issue with que_restart_v2 patch by cfpp2p
2013-10-20 17:15:19 +00:00
Jordan Lee
d9a6539e19
fix pedantic compiler warnings
2013-09-09 01:32:09 +00:00
Jordan Lee
80a5815c0c
(trunk, libT) tr-getopt-test fixes similar to r14192
2013-09-09 00:40:20 +00:00
Jordan Lee
eff3b75586
blocklist cleanup: use bool instead of int where appropriate, use tr_fileExists() instead of stat()
2013-09-08 21:25:13 +00:00
Jordan Lee
36cc115c7b
have the peer-id test follow the other unit test files' naming conventions
2013-09-08 19:30:16 +00:00
Jordan Lee
0e453bb873
(trunk, libT) improved/new MSVC portability wrappers dirname, basename, gettimeofday(). patch by mikedld, breakage by charles
2013-09-08 18:27:27 +00:00
Jordan Lee
0ba7c5f3cf
fix a handful of CL warnings & errors in libtransmission. mikedld
2013-09-08 17:58:14 +00:00
Jordan Lee
677769a462
remove a few straggling uses of %zu to follow up on the previous TR_PRIuSIZE commit
2013-09-08 17:36:11 +00:00
Jordan Lee
ea7d2482dd
introduce TR_PRIuSIZE macro for portable printf()ing of size_t. mikedld
2013-09-08 17:32:09 +00:00
Jordan Lee
98dd141449
correct function pointer type correctness. mikedld
2013-09-08 17:29:25 +00:00
Jordan Lee
4c8bda8805
function pointer type correctness. mikedld
2013-09-08 17:08:18 +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
4aa5c5c08d
(trunk, libT) #5476 : also, define __USE_MINGW_ANSI_STDIO and __STDC_FORMAT_MACROS on win32 systems so these new macros will work on mingw-w64 and mingw. (rb07)
2013-08-26 17:15:12 +00:00
Jordan Lee
9fe48d7a08
(trunk, libT) #5476 : correct the definitions of PRIu64 and PRIu32 on win32 systems; thanks to rb07 for this correction
2013-08-26 17:12:16 +00:00
Jordan Lee
d112a813e9
make accessing tr_list's recycle nodes threadsafe. patch by mike.did, fixes #5352
2013-08-25 16:27:19 +00:00
Jordan Lee
5661aaad5e
add windows-friendly definitions for PRIu64, PRId64, PRIu32
2013-08-24 20:49:27 +00:00
Jordan Lee
65f15a4ba9
more treating-bools-as-bools
2013-08-24 18:18:38 +00:00
Jordan Lee
f762c2ce6a
treat bool args as booleans rather than ints; no need to compare them a la 'if (boolVal != 0)'
2013-08-24 18:08:38 +00:00
Jordan Lee
28fe36f1f8
#include limits.h where we use it, and don't where we don't
2013-08-24 17:53:45 +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
765879ddba
silence a small handful of minor gcc compiler warnings in libtransmission
2013-08-17 17:03:15 +00:00
Jordan Lee
ba688e2811
silence a small handful of minor gcc compiler warnings in libtransmission
2013-08-17 16:31:03 +00:00
Jordan Lee
9182c34711
#5298 'Transmission not holding queue order' -- fixed with patch by gabrielrcp
2013-08-17 16:20:32 +00:00
Jordan Lee
6fc8481524
(trunk, libT) #5452 'preventing zombies from child scripts' -- fixed.
2013-08-05 13:07:23 +00:00
Jordan Lee
76528d8e14
(trunk, libT) #5451 : 'crash in tr_torrentGetPeerId() during incoming encrypted handshake' -- fixed.
2013-08-05 04:39:43 +00:00
Jordan Lee
21c869ad03
(trunk, libT) #5443 'tr_clientForId() misidentifies Tixati as BitTornado': fixed
2013-07-29 04:29:22 +00:00
Jordan Lee
a8f965b489
(trunk libT) #5444 'underflow in bitfield.c's set_all_true()' -- fixed
2013-07-29 04:19:15 +00:00
Jordan Lee
29e53df9d9
silence a pair of 'unused variable' gcc warnings
2013-07-27 17:48:59 +00:00
Jordan Lee
6897197729
(trunk, libt) #4147 'bad file descriptor': in cached_file_open(), ensure the file is always opened with writable permissions if we need to call ftruncate() to resize it. Large credit to karamanolev for tracking this down with strace.
2013-07-27 16:18:12 +00:00
Jordan Lee
20ee16b8cb
fix Transmission 2.81 FTBFS in OpenBSD, patch by naddy
2013-07-24 00:02:16 +00:00
Jordan Lee
580c00c4be
always clean up the paused_easy_handles list.
2013-07-24 00:00:03 +00:00
Jordan Lee
db6fd6630d
tweak previous commit
2013-07-21 21:11:54 +00:00
Jordan Lee
4787364b1a
(trunk, libT) #5432 'on scrape and announce failures, the retry interval is longer than intended' -- fixed.
2013-07-21 21:10:28 +00:00
Jordan Lee
773d276fb5
(trunk, libT) #5427 'queued torrents' state changes to paused when restarting transmission' -- fixed with patch by rb07
2013-07-21 14:58:24 +00:00
Jordan Lee
73d4be24c7
(trunk, libT) #5426 'Crash when adding UDP tracker with a large number of characters in the tracker URL' -- fixed.
2013-07-20 23:29:42 +00:00
Jordan Lee
8dd572076a
(trunk, libT) #5429 'nightly build crashes on webseed torrents' -- fixed.
2013-07-20 16:45:02 +00:00
Jordan Lee
fe79ad39bc
add tr_sessionGetTorrents(), a private utility to avoid code duplication in libtransmission
2013-07-20 15:37:13 +00:00
Jordan Lee
7bcaf891d1
when a torrent finishes downloading, first rename/move the files (if there's a temp directory or .part suffix), then check to fire the completeness callback, then check to fire the ratio limit callback, then check to fire the done callback.
2013-07-16 00:50:45 +00:00
Jordan Lee
ee130e773d
(trunk, libT) #5395 : when announces fail, lower the period before the first retry to fix unspecified 'network problems'.
2013-07-16 00:13:30 +00:00
Jordan Lee
768142fcac
change the callback functions' orders s.t. torrent-completed is called before torrent-done
2013-07-15 23:53:48 +00:00
Jordan Lee
d4e0194ce2
(trunk, libT) #5275 : fix platform quota crash on solaris 2.12, patch by godot
2013-07-14 23:00:39 +00:00
Jordan Lee
ba465de7d1
in libtransmission/platform-quota.c, a one-liner patch to fix compilation on some versions of Linux. Patch by rb07
2013-07-12 22:42:40 +00:00
Jordan Lee
af3481400f
fix a couple of unlikely-to-be-triggered errors reported by clang static analyzer
2013-07-10 22:28:40 +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
74d0f305a6
move platform.c's quota code into its own file. Fixes FTBFS reported in bug #5389 and is also a nice piece of encapsulation. Patch by rb07
2013-07-08 17:07:31 +00:00
Jordan Lee
e0e4849abd
in peer-msgs.c's my_funcs struct, remove an unnecessary trailing comma in the designated initializers.
2013-07-08 16:44:19 +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
5452908346
whitespace/indentation
2013-05-23 05:43:12 +00:00
Jordan Lee
f36d705060
whitespace/indentation
2013-05-23 03:20:18 +00:00
Jordan Lee
e39c11316f
whitespace/indentation
2013-05-23 00:11:09 +00:00
Jordan Lee
96aaa41218
safer implementation of tr_torrentName()
2013-05-22 22:56:13 +00:00
Jordan Lee
027e3f3066
(trunk, libT) #4682 'Add return id from duplicate torrent torrent-add rpc' -- added.
2013-05-22 20:35:38 +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
68665b939d
(libT) prevent possible oscillation in paused_easy_handles reported by vipjml in bug #1079 comment:27
2013-04-28 00:06:22 +00:00
Jordan Lee
ff4267bf00
(trunk libT) #1079 'webseeds don't respect speed limits': fixed.
2013-04-13 20:56:24 +00:00
Jordan Lee
96786b7fa1
(trunk) update web.h's API s.t. there's an explicit function to use when downloading webseed content.
2013-04-13 20:25:28 +00:00
Jordan Lee
6bcdd93e45
(trunk libT) #5318 : 'socket leak when bind() fails': fixed.
2013-04-13 19:34:34 +00:00
Jordan Lee
d4d2a04560
libT: undo r13901 regression to #4888 in the nightlies
2013-04-13 19:28:49 +00:00
Jordan Lee
f1d616d37c
(trunk libT) #5316 'UMR in quark, tr-getopt code': fixed.
2013-04-13 18:29:56 +00:00
Jordan Lee
908af43d99
add unit tests for tr-getopt
2013-04-13 18:27:36 +00:00
Jordan Lee
de6d57af43
(qt) freespace fixes by rb07 from https://trac.transmissionbt.com/ticket/4076#comment:40
2013-02-18 14:45:44 +00:00
Jordan Lee
c32e4cdde1
(libT) #5293 'Wrong error codes used in upnp.c': second patch from rb07 to handle older versions of miniupnpc
2013-02-18 00:36:20 +00:00
Jordan Lee
a2ce709d8c
(web) #5290 'Use HTML5's FileReader to upload .torrent files': done
2013-02-18 00:12:51 +00:00
Jordan Lee
b24a550459
(libT) fix memory leak regression in the nightlies reported by x190
2013-02-17 23:00:11 +00:00
Jordan Lee
fcdec9a8bc
(libT) don't start the web thread until we have a task to feed to curl
2013-02-15 01:52:47 +00:00
Jordan Lee
58862d0fc4
(libT) remove code to migrate config files from pre-2008
2013-02-15 01:51:49 +00:00
Jordan Lee
bb05b943e9
(libT) #5293 'Wrong error codes used in upnp.c': patch by rb07
2013-02-14 23:45:13 +00:00
Jordan Lee
0be5e8deef
(libT) #5291 'increase scrape buffer sizes to accomodate for multiscrape': done with patch by reardon
2013-02-10 23:21:58 +00:00
Jordan Lee
5040778a92
(libT) restore the RPC download-dir-free-space argument to avoid unscheduled breakage. Document the timetable for its removal in rpc-spec.txt.
2013-02-10 19:36:13 +00:00
Jordan Lee
a7c6e78985
In Web Client, use jQuery.ajax() to upload files
...
If we use FormData and jQuery.ajax() calls to upload a torrent,
we can stop bundling the jquery.form.js module. In addition, this
simplifies passing arguments in the headers s.t. rpc-server.c doesn't
have to look for the CSRF token as one of the multiparts.
This changes the upload POST behavior, so give it a new name (upload2).
The old function (upload) will be deprecated but kept until 2.90 so
that third-party web clients using the old POST semantics will have
time to update.
Bug #5290 <https://trac.transmissionbt.com/ticket/5290 >
2013-02-10 18:33:04 +00:00
Jordan Lee
cd09204a6e
(trunk) first draft of changing the FreeSpace API to behave as https://trac.transmissionbt.com/ticket/4076#comment:25 -- libT, rpc, qt, and gtk implementations.
2013-02-09 04:05:03 +00:00
Jordan Lee
836fcc31d2
(libT) #5276 'regression in nightly: assert (tr_sessionIsLocked (session))': fix the bug; tests now pass again
2013-02-06 05:52:41 +00:00
Jordan Lee
3eff07dde4
(libT) #5276 'regression in nightly: assert (tr_sessionIsLocked (session))': add unit test (currently failing) to reproduce this error
2013-02-06 05:51:51 +00:00
Jordan Lee
12c2b35abb
(libT) #5275 'quotactl breaks compilation of libT/platform.c on Solaris' -- fixed with patch from spaam
2013-02-05 14:35:01 +00:00
Jordan Lee
445609f690
(trunk) prefer tr_remove() to unlink() or rmdir()
2013-02-04 21:53:19 +00:00
Jordan Lee
407c0b53c7
(trunk) add portability wrappers tr_rename(), tr_remove() for the rename() and remove() funcs s.t. utf16 can be handled
2013-02-04 21:45:20 +00:00
Jordan Lee
a04fb2c9d9
(libT) add rb07's win32 implementation of tr_mkstemp()
2013-02-04 21:07:24 +00:00
Jordan Lee
911d64df44
(libT) add rb07's win32 implementation of tr_is_same_file().
2013-02-04 20:57:20 +00:00
Jordan Lee
5307bef4ec
(libT) when logging on win32, use OutputDebugStringA instead of OutputDebugString
2013-02-04 20:48:33 +00:00
Jordan Lee
6d5a54e52c
(libT) add '#include errno.h' to announcer-udp.c to ensure errno is declared
2013-02-04 20:46:16 +00:00
Jordan Lee
e899519a97
(libT) #5274 '"copy magnet link to clipboard" doesn't include webseeds': fixed.
2013-02-04 18:54:38 +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
5475e1507e
(libT) reduce the scope of REQUEST_BUF_SECS from peer-common.h to peer-msgs.c
2013-02-03 23:29:34 +00:00
Jordan Lee
f370a76c57
move tr_peer.encryptionPreference to tr_peermsgs.encryptionPreference
2013-02-03 22:45:32 +00:00
Jordan Lee
3cb7595b85
(libT) move the tr_peer declaration from peer-mgr.h to peer-common.h
2013-02-03 22:40:00 +00:00
Jordan Lee
67ae1e7b2e
(libT) remove redundancy from compareKeys()
2013-02-03 21:43:17 +00:00
Jordan Lee
84aed36ba9
(libT) copyediting: whitespace/indentation
2013-02-02 20:17:52 +00:00
Jordan Lee
c8e22c46d4
(libT) #5267 : 'speed limits wrap around too low number (~8589 kB/s)': patch by const
2013-02-02 16:31:05 +00:00
Jordan Lee
273e0a4504
(libT) copyediting: indentation/whitespace in rpc-server.c
2013-02-02 16:22:21 +00:00
Jordan Lee
1f2bccd17b
(libT) recycle the peer id used for public torrents after N hours of use
2013-02-02 13:42:50 +00:00
Jordan Lee
aa8ddcb218
(libT) remove pointless tr_session.peer_id variable
2013-02-02 05:31:43 +00:00
Jordan Lee
70289d9629
(libT) #5259 'Minor memory leaks in tr_torrentDeleteLocalData()': cleaner patch suggested by cfpp2p
2013-02-01 19:21:38 +00:00
Jordan Lee
3819360ca0
(libT) when unable to run locale-specific json tests, give a hint in the terminal about how to remedy that
2013-02-01 06:11:41 +00:00
Jordan Lee
1a99b9c168
change the test harness' session initialization s.t. we can configure it for per-test needs. Add tests for moving completed torrents when downloadDir is a subdirectory of incompleteDir. (Hi, KyleK)
2013-02-01 05:57:47 +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
d84836a81c
fix r13913 oops: I didn't mean to check in the fail.sh change that only called rename-test
2013-01-31 22:00:32 +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
9c550b5a78
(libT) fix dangling pointer in tor->currentDir when reloading a .resume file from disk
2013-01-31 21:57:08 +00:00
Jordan Lee
1eb2933fc5
(libT) maybe fix removed-file-found issue reported by Lacrocivious
2013-01-31 19:07:34 +00:00
Jordan Lee
500aa4569f
(libT) fix a filesystem sync issue in rename-test, reported by Lacrocivious
2013-01-31 18:20:37 +00:00
Jordan Lee
47d2a1ee8f
(libT) add assertions to check that block-writing functions are only invoked in the libtransmission thread
2013-01-31 17:39:06 +00:00
Jordan Lee
65859df967
fix oops
2013-01-31 05:11:32 +00:00
Jordan Lee
3eb533336d
fix a race condition error in move-test
2013-01-31 05:10:08 +00:00
Jordan Lee
ae1ec6aab4
fix a race condition error in rename-test
2013-01-31 05:09:19 +00:00
Jordan Lee
4aa4012a73
fix race condition triggered in the unit tests by requiring a libtransmission thread lock in torrentRemove()
2013-01-31 05:05:44 +00:00
Jordan Lee
0b9f651a93
(libT) add to rename-tests
2013-01-30 21:26:04 +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
6d8080bcf4
(libT) copyediting: fix whitespace
2013-01-30 20:00:43 +00:00
Jordan Lee
1b5cc093e6
(libT) when announcing a magnet link for the first time, send 'left=0'
2013-01-30 19:59:55 +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
fdcba2a7fa
only show ratios to one decimal place
2013-01-30 00:16:20 +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
722867ad62
(libT) tweaks to rename-test to give better line numbers on failure in Jenkins
2013-01-27 17:47:38 +00:00
Jordan Lee
cee6cb5c61
(libT) better implementation of move-test
2013-01-27 06:20:39 +00:00
Jordan Lee
d9940acf75
(libT) #5259 'Minor memory leak in tr_torrentDeleteLocalData()' -- fixed.
2013-01-27 06:19:33 +00:00
Jordan Lee
5f9e7f773b
#5146 'seeding complete callback called twice': revert r13627 due to issues described in https://trac.transmissionbt.com/ticket/5146#comment:15
2013-01-27 06:02: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
797976b336
copyediting: modify more files to the new indentation/whitespace formatting
2013-01-25 06:01:45 +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
eb4b2d609a
(libT) #5249 'error parsing json in some locales': fix the bug; the new locale unit tests in json-test pass now
2013-01-24 16:33:49 +00:00
Jordan Lee
887850a636
(libT) #5249 'error parsing json in some locales': add unit tests to test for this bug.
2013-01-24 16:04:09 +00:00
Jordan Lee
644c647799
(libT) unroll decode_hex_string()
2013-01-24 00:53:37 +00:00
Jordan Lee
06d9f20759
(libT) #1220 'change file and folder names': finish cleaning up the unit test for calling tr_torrentRenamePath() on an incomplete torrent with .part files
2013-01-23 22:53:58 +00:00
Jordan Lee
e34be5e573
(libT) rename-test tracers
2013-01-23 22:43:16 +00:00
Jordan Lee
ee2e408288
(libT) rename-test tracers
2013-01-23 22:30:23 +00:00
Jordan Lee
a75f9394a6
(libT) rename-test tracers
2013-01-23 22:20:37 +00:00
Jordan Lee
beee17f9b2
(libT) more hacking on the rename + .part unit test
2013-01-23 22:10:40 +00:00
Jordan Lee
0daad8b7f6
(libT) fix red herring issue that tr_mkdirp() was setting errno even if the call succeeded. Add tests to confirm the fix.
2013-01-23 21:28:35 +00:00
Jordan Lee
5fb6ec36de
continuation of previous commit to find out why Jenkins doesn't like the new rename unit tests
2013-01-23 20:59:20 +00:00
Jordan Lee
cd4543fe4c
add temporary verbosity to the rename-test to coax log info out of Jenkins
2013-01-23 20:51:55 +00:00
Jordan Lee
ef2cb627f2
(libT) #1220 'change file and folder names': add a unit test for the r13837 bugfix of .part files + tr_torrentRenamePath()
2013-01-23 20:23:37 +00:00
Jordan Lee
e2c1a360d4
(libT) replace errant snprintf() calls with tr_snprintf() calls
2013-01-23 04:28:37 +00:00
Mitchell Livingston
45c8174cc2
Use tr_torrentRenamePath() instead of the removed tr_torrentRename()
2013-01-23 03:44:47 +00:00
Jordan Lee
3f4c9e9d2f
(libT) #1220 'change file and folder names': handle .part file suffixs
2013-01-22 05:58:31 +00:00
Jordan Lee
e898374a48
(libT) #1220 'change file and folder names': add unit tests for renaming a root, then branch, then leaf in the torrent
2013-01-22 05:40:10 +00:00
Jordan Lee
77ecf6d08c
(libT) #1220 'change file and folder names': add a test to confirm passing tor->info.name as the 'oldname' argument works
2013-01-22 05:06:38 +00:00
Jordan Lee
2e354dfb10
(libT) #1220 'change file and folder names': fold tr_torrentRename() into tr_torrentRenamePath(); it's not useful enough on its own to be a separate function
2013-01-22 04:57:45 +00:00
Mitchell Livingston
aae38eb05f
(libT) update the rename callback to include the previous torrent name
2013-01-22 00:43:50 +00:00
Jordan Lee
434bd6b287
(libT) #1220 'change top folder names' -- when the root file/folder is changed, update tr_info.name too.
2013-01-22 00:25:42 +00:00
Jordan Lee
0da726e639
(libT) #4632 'custom blocklist generates 2x # of rules': add a fix, which causes r13825's test to pass
2013-01-21 21:14:14 +00:00
Jordan Lee
5d9335201d
(libT) #4632 'custom blocklist generates 2x # of rules': add unit test (currently failing) to test for this issue.
2013-01-21 21:11:00 +00:00
Jordan Lee
2d5fe73969
(libT) copyediting: rename the internal tr_blocklist class 'tr_blocklistFile' to distinguish the private per-file API from the public, global API in libtransmission.h
2013-01-21 17:48:36 +00:00
Jordan Lee
1ece2b3f98
(libT) copyediting: reformat blocklist.c to the new indentation style
2013-01-21 17:39:20 +00:00
Jordan Lee
1f817193ef
(libT) update our jsonsl snapshot
2013-01-21 01:26:59 +00:00
Jordan Lee
cc3d08da3d
(libT) #5234 'typo causing RPC session-get error in nightlies': remove the typo'ed quark to avoid future confusion
2013-01-21 00:11:48 +00:00
Jordan Lee
473c20f612
(libT) #5234 'typo causing RPC session-get error in nightlies': add a fix, which causes r13814's test to pass
2013-01-21 00:03:52 +00:00
Jordan Lee
5ccf3fc7e2
(libT) #5234 'typo causing RPC session-get error in nightlies': add unit test (currently failing) to test for this issue.
2013-01-21 00:00:00 +00:00
Jordan Lee
b42a7ebdc3
(qt) Qt client should have the option to play a sound when the download completes, as the Mac and GTK+ clients do -- implemented.
2013-01-20 23:57:09 +00:00
Jordan Lee
ac28b6df6e
(trunk) move sandboxed session creation/teardown into libtransmission-test.[ch] so that it can be reused as a fixture by future tests
2013-01-20 04:41:38 +00:00
Jordan Lee
dd955b121e
(trunk) #1220 'change top folder names' -- add file-renaming to the Qt client
2013-01-20 01:31:58 +00:00
Jordan Lee
10e4c297d6
(trunk) #1220 'change top folder names' -- tweak the API documentation in transmission.h
2013-01-19 08:50:57 +00:00
Jordan Lee
016f38f066
(trunk) #1220 'change top folder names' -- added support for this in libtransmission's C and RPC APIs.
2013-01-19 08:43:26 +00:00
Jordan Lee
818308376b
(libT) #5102 'don't invalidate the OS' filesystem cache when closing files -- done.
2013-01-18 19:20:22 +00:00
Jordan Lee
7c6868b622
reduce the default peer counts: global goes from 240 to 200, per-torrent goes from 60 down to 50
2013-01-17 20:39:16 +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
447b558cdf
(utils) #4137 'support user-defined piece sizes in transmission-create' -- done. Initial patch by lav.
2013-01-17 18:55:51 +00:00
Jordan Lee
4d627b79c2
(libT) tweak getMaxAtomCount()
2013-01-17 01:10:59 +00:00
Jordan Lee
e3eb1afeae
(qt) #5218 -- fix 'set location' regression introduced during the migration to tr_quark. report & patch by rb07.
2013-01-15 21:55:04 +00:00
Jordan Lee
297566dc64
(libT) make ptrarray's assertions consume fewer CPU cycles
2013-01-13 22:09:18 +00:00
Jordan Lee
03da3e0a60
(libT) #5220 'add etaIdle to torrent-get in RPC' -- done.
2013-01-13 20:39:56 +00:00
Jordan Lee
cb448dad6a
minor code simplification in torrent.c's deleteLocalData() function.
2013-01-09 01:11:36 +00:00
Jordan Lee
569b895cef
increase the per-peer prefetch count from 12 to 18. Add a symbolic constant for it.
2013-01-09 00:33:00 +00:00
Jordan Lee
1e9f6d44f9
copyediting: update torrent-magnet.c to the new indentation style
2013-01-07 18:16:34 +00:00