Mike Gelfand
bb4741002f
Go back to using hash as base name for resume and torrent files
...
The format introduced in TRAC-394 is nice but brings its own issues (e.g.
TRAC-4189, #122 ). I'm okay with a bit of grepping myself if it makes the
experience better for end users.
Using hashes results in filenames well under 255 bytes limit on some
filesystems. If even that will not be enough, I'd suggest reporting the
issue elsewhere.
Fixes : #122
2017-07-26 21:32:26 +03:00
Mike Gelfand
55b41c9015
Patch up file test to allow for a bit of time discrepancy
...
Since one cannot really compare system time to filesystem time (see e.g.
https://lkml.org/lkml/2017/3/30/809 ), allow for 1 second error to avoid
(or at least minimize) random test failures.
2017-07-21 00:45:30 +03:00
Simon Wells
44411d719c
Change TR_CURL_SSL_VERIFY to TR_CURL_SSL_NO_VERIFY
...
use secure by default and change the env var to match curl -k behaviour
Closes : #179
2017-07-16 20:48:44 +03:00
Mike Gelfand
580c5e4166
Rename `tr_sys_file_prefetch` to `tr_sys_file_advise`
...
New function now supports two flags: will need and don't need.
2017-07-08 16:09:37 +03:00
Mike Gelfand
28c872af1e
Change `tr_sys_file_prefetch` behavior a bit
...
Return true by default. Only return false if we did in fact perform some
action and it failed.
2017-07-08 12:51:36 +03:00
Mike Gelfand
8c88e8bba0
Change torrent location even if no data move is needed
...
This helps when old and new location point to the same place but the actual
path differs (i.e. one of the paths is a symlink).
Fixes : #35
2017-07-06 21:46:32 +03:00
Mike Gelfand
a86266d3c2
Don't switch trackers while announcing
...
Fixes : #297
2017-07-04 21:22:26 +03:00
Mike Gelfand
d46fdda9ea
Correct "annouce" spelling
...
Fixes : #303
2017-07-02 19:18:02 +03:00
Mike Gelfand
27b6884408
Move uTP timer to session struct
2017-07-02 13:31:33 +03:00
Mike Gelfand
87c9596305
Fix a couple more implicit boolean expressions
2017-07-02 13:26:26 +03:00
Mike Gelfand
18aabdeb06
Introduce peer socket struct to improve readability
2017-06-28 18:50:05 +03:00
Mike Gelfand
74548e01b6
Remove obsolete comment as we're using C99 now
2017-06-28 18:50:05 +03:00
Mike Gelfand
13bbaeec76
Use field initializers for readability
2017-06-24 13:30:33 +03:00
Aleksej Lebedev
b7b1d2475e
Fixed platform-quota.c for DragonFly. The patch is taken from dports.
2017-06-19 19:27:05 +03:00
Mike Gelfand
f701d501a8
Move generic macros to a separate tr-macros.h file
2017-06-18 17:11:20 +03:00
Mike Gelfand
deea6fc6a2
Bring assertions closer to the beginning of blocks
2017-06-13 07:44:09 +03:00
Mike Gelfand
98695fe3c1
Introduce our own assertion macros with finer control
2017-06-08 10:24:12 +03:00
Mike Gelfand
5f7bc801c8
Make use of new checking capabilities in unit tests
2017-05-30 20:56:12 +03:00
Mike Gelfand
3d0b06ca0f
Add generic `check_mem` (libtest)
2017-05-30 20:09:19 +03:00
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