Mike Gelfand
2a7cf67913
Add generic `check_bool`, extend `check` to be more informative (libtest)
2017-05-30 19:21:14 +03:00
Mike Gelfand
b1b5a577cf
Transform `check_ptr_eq` into generic `check_ptr` (libtest)
2017-05-30 17:51:50 +03:00
Mike Gelfand
437904198e
Transform `check_uint_eq` into generic `check_uint` (libtest)
2017-05-30 17:51:50 +03:00
Mike Gelfand
9c3c6f11e0
Transform `check_int_eq` into generic `check_int` (libtest)
2017-05-30 17:51:50 +03:00
Mike Gelfand
14c30119d4
Transform `check_str_eq` into generic `check_str` (libtest)
2017-05-30 17:51:46 +03:00
Mike Gelfand
341b778099
Continue running other test-cases even if one fails (libtest)
2017-05-30 17:44:51 +03:00
Mike Gelfand
c071f824ec
Pass `(u)intmax_t` instead of `(u)int64_t` to `check_(u)int_eq` (libtest)
2017-05-30 17:44:47 +03:00
Mike Gelfand
7a238e7c65
Rename `check_streq` to `check_str_eq` to be in line with other macros (libtest)
2017-05-30 17:44:42 +03:00
Mike Gelfand
432d573f2c
Fixup 2321bc3fad
(unintended logic change, spotted by cfpp2p in #297 )
2017-05-29 08:50:40 +03:00
Mike Gelfand
f27596238d
Include stdbool.h unconditionally
...
All the compilers should provide the header file by now. Remove `tr_isBool`
sanity checks along the way as compiler should guarantee that bool (_Bool)
values are 0 or 1 and nothing else.
2017-05-24 22:53:06 +03:00
Mike Gelfand
295d3359b2
Little bastards keep popping up here and there :(
2017-05-23 22:17:17 +03:00
Mike Gelfand
501be27972
Reduce code duplication in logging macros
2017-05-22 23:20:28 +03:00
Dhiru Kholia
dda33afbe0
Add Peer ID for PicoTorrent
...
Based on information from https://github.com/picotorrent/picotorrent and
http://www.picotorrent.org/ .
PicoTorrent uses Azureus-style peer ID: -PI-. Example: -PI0091- (major:
0, minor: 09, patch: 1).
2017-05-21 12:30:47 +05:30
Mike Gelfand
82722476aa
Fix some issues reported by Coverity
2017-05-20 23:31:56 +03:00
Mike Gelfand
8f3cb1c68d
Wrap sizeof arguments in braces
2017-05-20 19:29:23 +03:00
Mike Gelfand
6303bb2247
Disable part of mmap test on OpenBSD that depends on UBC
2017-05-20 13:34:23 +03:00
Niklas Haas
4d7446e477
LibreSSL compatibility
...
This seems to be the idiomatic way to fix libressl compatibility issues,
judging by what most other open source projects seem to be doing.
I've confirmed that transmission builds with libressl for me after this
patch is applied.
2017-05-20 07:16:53 +02:00
Mike Gelfand
6b0229a546
Fix some issues reported by Coverity
2017-05-16 21:37:00 +03:00
Mike Gelfand
1e3d20422a
Reduce for loop variables scope
2017-05-14 01:38:31 +03:00
Mike Gelfand
6d5e48f9e2
Fix some more off-by-one errors on last piece
...
See: TRAC-4037 and e2584b04ff
2017-05-09 14:23:25 +03:00
Piotr Drąg
ccabc01900
lib: fix translator comment extraction
...
gettext won’t pick up a comment if it’s
not exactly one line above the string.
2017-05-02 21:22:15 +02:00
Mike Gelfand
87220d44a5
Fix FTBFS on Windows (oops!)
2017-05-01 19:08:30 +03:00
Mike Gelfand
14370e5353
Fix a number of other style inconsistencies met along the way (part 2)
2017-05-01 18:47:49 +03:00
Mike Gelfand
e1d53855f4
Avoid declaring multiple variables on the same line
2017-05-01 18:46:41 +03:00
Mike Gelfand
1bc247c105
Merge pull request #161 from slokhorst/rpc-ipv6
...
Allow the RPC server to listen on an IPv6 address
2017-05-01 13:31:14 +03:00
Mike Gelfand
6a74bd438c
Announce INT64_MAX as size left if the value is unknown
...
This helps with trakers like Amazon S3 where signed type is used but
negative values aren't accepted.
Fixes : #250
2017-05-01 12:33:55 +03:00
Mike Gelfand
ac4fa04277
Announce -1 as size left if the value is unknown
...
Fixes : #250
2017-04-30 21:18:02 +03:00
Mike Gelfand
efaa9d0ddc
Compare system function return value to a specific value indicating the error
2017-04-30 19:47:18 +03:00
Mike Gelfand
b342d134cb
Merge pull request #256 from kholia/Xfplay
...
Add Peer ID for Xfplay torrent client
2017-04-30 19:43:49 +03:00
Mike Gelfand
fbd8d4c79f
Fix a number of other style inconsistencies met along the way
2017-04-30 19:33:55 +03:00
Mike Gelfand
a762c770f2
Make conditional expressions explicitly boolean
2017-04-30 19:26:01 +03:00
Dhiru Kholia
e970d7e546
Add Peer ID for Xfplay torrent client
...
This is based on the following resources,
http://www.xfplay.com/history.html
https://down.xfplay.com/xfplay9.994.exe
https://down.xfplay.com/xfplay9.992.exe
https://down.xfplay.com/xfplay9.991.exe
https://down.xfplay.com/xfplay9.99.exe
http://q.xfplay.com/
2017-04-29 12:40:55 +05:30
Sebastiaan Lokhorst
ac661ff099
Allow the RPC server to listen on an IPv6 address
2017-04-26 17:46:36 +02:00
Mike Gelfand
6a15bc6742
Fix mount points enumeration (platform quota) on Solaris
...
Per documentation, `getmntent` returns 0 on success and -1 on error.
2017-04-22 21:42:44 +03:00
Mike Gelfand
4f9d9ad92b
Code style change leftovers
...
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand
dadffa2c0f
Align type qualifiers to the right (code style)
...
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand
d7930984ef
Adjust uncrustify config, reformat all but Mac client
...
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).
The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand
0f75e64d71
Detach the thread from within itself to avoid race condition
...
Fixes : #188
2017-02-23 00:07:39 +03:00
neheb
944382a62e
Add TCP_FASTOPEN support
...
Should make transmission slightly faster.
2017-02-19 12:54:01 +03:00
Edward Betts
9e1c76a50f
fix spelling mistake
2017-02-01 10:14:11 +00:00
Mike Gelfand
1cc67b31dd
Use PRIdMAX instead of TR_PRI_SOCK to accomodate intltool
2017-01-27 04:50:14 +03:00
Mike Gelfand
c1f08edf79
Fix memory leaks found by GCC's -address=sanitize (reported by milloni)
...
Fixes : #56
2017-01-17 23:55:34 +03:00
Mike Gelfand
67bda2dcb8
Handle two more cases where dirname/basename may have returned NULL (adds to 91f8ceb20d
)
2017-01-17 02:22:31 +03:00
Mike Gelfand
fd93316466
Improve version.h file generation
...
Store full revision hash in REVISION file. Write fixes 10 chars of revision
hash to version.h. Use `#pragma once` in version.h. Support getting revision
from TeamCity environment variable (similar to Jenkins).
2017-01-15 00:54:56 +03:00
Mike Gelfand
3375b22b23
Simplify `tr_ssha1_matches` logic
...
Gets rid of needless heap memory allocations and copying. Convert SHA1 hash
to hex in-place.
Fixes : #141
2017-01-09 14:15:07 +03:00
Mike Gelfand
15625de3c7
Extend SSHA1 test to check for predefined matches
...
Reduce number of test iterations to 4K along the way to shorten execution
time.
2017-01-09 14:12:17 +03:00
Mike Gelfand
4179a623d5
Interrupt verification ASAP if torrent is being removed
2016-12-31 14:23:06 +03:00
Mike Gelfand
0ac657c5f1
Fix up rename test to avoid random use-after-free failures
2016-12-25 19:44:38 +03:00
Mike Gelfand
3cda09ea81
Fix up rename test to avoid random duplicate torrent failures
2016-12-24 21:24:50 +03:00
Mike Gelfand
88505c345f
Allow for different-cased "nan" value returned by tr_truncd
2016-12-24 20:20:55 +03:00