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

607 commits

Author SHA1 Message Date
Charles Kerr
c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used (#2033)
* refactor: [[maybe_unused]] iff arg _might_ be used

If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr
236a0965fa
refactor: tr_variant*Str() functions now take a std::string_view (#1990)
* refactor tr_variant*Str functions now take a std::string_view

* refactor: tr_torrentPrimaryMimeType returns a string-view
2021-10-19 21:30:50 -05:00
Charles Kerr
567f1e48c8
tr_quark_new() now takes a std::string_view (#1961) 2021-10-15 08:28:47 -05:00
Charles Kerr
1fb5a79813
refactor: use maybe unused attribute (#1918)
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Charles Kerr
003685b40a
refactor: use nullptr instead of NULL (#1884)
* refactor: use nullptr instead of NULL.

No functional changes; just more C++ification
2021-10-06 11:32:17 -05:00
Charles Kerr
1ee88c019f
refactor: port daemon and utils to C++ (#1825)
* refactor: compile daemon/ and utils/ as C++

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-21 18:03:39 -05:00
Dmytro Lytovchenko
312d18281d
C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806)
* C++ modernize: Replace MIN/MAX with type safe std::min/std::max

* Template std::min/max invocations now explicitly use largest integer type

* torrent.cc did not have <algorithm> included

* MIN/MAX Changes for subprocess-win32.cc

* Using type{} style cast instead of template parameter in std::min/max

* 32-bit type cast errors with uint64_t versus size_t

* 32-bit type cast errors inout.cc and file.cc

* Missing include in windows code; Type cast error fixed

* Missing macro in win32 daemon; Replaced MIN in commented code with std::min

* Update libtransmission/tr-getopt.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* Update libtransmission/file-posix.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* Update tests/libtransmission/copy-test.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* Update libtransmission/peer-mgr.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* Strlen returns size_t, remove cast

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-09-19 15:41:35 -05:00
Mike Gelfand
db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Charles Kerr
7f147c65fb
refactor: fix more sonarcloud warnings (#1508)
* refactor: const correctness

* refactor: use getpwuid_r instead of getpwuid

* chore: simplify dict walking loop logic

* refactor: remove dead store assignment in announcer

* refactor: use std::make_shared
2020-11-05 16:46:21 -06:00
Mike Gelfand
4c7153fa48
Remove autotools-based build system (#1465)
* Support .git files (e.g. for worktrees, submodules)
* Fix symlinks in source tarball, switch to TXZ, adjust non-release name
* Remove autotools stuff
2020-10-13 03:15:19 +03:00
Charles Kerr
83cc7e04c8
Fix more coverity warnings (#1445)
cast intentionally-ignored function retval to null

remove superfluous JSON polyfill from web client.
2020-09-12 08:17:18 -05:00
Charles Kerr
efaa66a920
fix: resolve some lgtm warnings (#1444)
* fix: warnings found by LGTM static analyzer
2020-09-11 16:07:45 -05:00
Mike Gelfand
b7a8bd45b7 Reformat affected code after recent changes 2020-08-18 20:31:06 +03:00
Mike Gelfand
75458d6be3 Make use of TR_UNUSED macro where cast-to-void was used before 2020-08-18 14:34:49 +03:00
Mike Gelfand
ff8d0dbf3b Switch from UNUSED macro to TR_UNUSED macro
Since there is no way to mark parameters as [potentially] unused in
standard C and when using MSVC compiler, use the widely accepted
cast-to-void approach instead.
2020-08-18 14:19:55 +03:00
Charles Kerr
677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Charles Kerr
8739cb9c88
fixup! (trunk) update credits (#1205) 2020-05-02 11:42:18 -05:00
Mike Gelfand
10cdd7f790 Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
Mike Gelfand
a3e4919385 Introduce tr_str_is_empty to relay intent better 2019-07-13 12:00:06 +03:00
Mike Gelfand
3d9fd25269 Fixup invalid daemon foreground mode check (2cc996cb77) 2019-04-22 07:20:46 +03:00
Mike Gelfand
2cc996cb77 Refactor daemon startup a bit
Fix exit code to be zero when dumping settings along the way.

Closes: #487
2019-03-15 21:55:45 +03:00
Mike Gelfand
82df3a87f4 Update to Uncrustify 0.68.1
Tweak a few rules in the process. Now all code in cli, daemon, gtk,
libtransmission, qt, and utils is properly formatted with no manual
intervention.
2019-02-15 09:21:48 +03:00
Charles Kerr
7058f37bed
Merge pull request #816 from PeterDaveHello/improve-shellscript
fix shell script syntax errors and spacing inconsistencies
2019-02-01 22:36:54 -06:00
Peter Dave Hello
7a0d2e63c7 Refactor shell scripts with syntax and styling fixes 2019-01-16 03:22:29 +08:00
Jelle van der Waa
d1d060c3a9 daemon: harden transmission-daemon.service
Systemd 227 introduced the option to make a service disallow elevating
privileges.
2018-12-28 22:47:16 +01:00
Mike Gelfand
204e9b04f5 Move transmission-remote to utils 2018-11-06 20:10:10 +00:00
Mike Gelfand
896de2b593
Merge pull request #500 from michaelskree/null-terminate
Ensure buffer contents are null-terminated
2018-02-03 23:27:29 +03:00
Michael Skree
663c4532f0 Ensure buffer contents are null-terminated
Data added with `evbuffer_add` isn't null-terminated. This was causing
extra characters to appear at the end of the output.

Fixes: #174
2018-02-03 13:45:44 -06:00
Mike Gelfand
ee259c617f Fix some leaks in tr-remote reported by GCC's sanitizer 2018-02-03 12:39:24 +03:00
Mike Gelfand
94be7dbd9b Merge branch '2.9x' 2018-01-25 03:07:52 +03:00
Mike Gelfand
aa2730d47c Switch to HTTPS links, adjust wiki links where possible
Fixes #39
2018-01-16 01:12:59 +03:00
lasers
e389c3d2d3 remove whitespace and a comma in the manuals 2017-11-28 16:58:21 -06:00
Mike Gelfand
ddd5dbae39 Handle IPv6 RPC addresses in transmission-remote 2017-06-29 09:59:47 +03:00
Mike Gelfand
13bbaeec76 Use field initializers for readability 2017-06-24 13:30:33 +03:00
Mike Gelfand
1e3d20422a Reduce for loop variables scope 2017-05-14 01:38:31 +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
Carl Michael Skog
65c9970ac7 Enlarge IP address column in transmission-remote
When using the transmission-remote program to list
peers(e.g. transmission-remote -t42 -ip), there is
not enough room for ipv6 addresses.
Increase the ip address column width from 20 to 40
(128/4 hex numbers + 32/4 - 1 colons + 1 space =
40 character width).
2017-04-30 21:42:42 +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
Sebastiaan Lokhorst
ac661ff099 Allow the RPC server to listen on an IPv6 address 2017-04-26 17:46:36 +02: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
5f3abbd6d8 Add myself to the list of Transmission authors 2017-01-15 01:38:45 +03:00
Mike Gilbert
d8cb7b3e0c cmake: add FindSYSTEMD module
Fixes: https://github.com/transmission/transmission/issues/117
2016-12-18 22:06:37 -05:00
Markus Amalthea Magnuson
5b9ba3be0d HTTPS links for trac, forum, portcheck, and build subdomains. 2016-11-02 20:50:22 +01:00
Markus Amalthea Magnuson
727b9671f7 Update all website links to canonical HTTPS version. 2016-10-31 10:00:11 +01:00
Mike Gelfand
2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00