Charles Kerr
046ba32d33
fixup: heap-use-after-free in announce, scrape response on shutdown ( #4228 )
...
fixes #4222 .
2022-11-23 01:38:31 -06:00
Charles Kerr
a3772dc1fa
refactor: aggregate dh in peer io ( #4218 )
2022-11-21 18:08:06 -06:00
A Cœur
d26db72d7e
Fix "Implicit conversion loses integer precision" ( #4194 )
2022-11-21 10:19:45 -06:00
Charles Kerr
d27c4c59ce
refactor: incremental announcer refactor pt. 2 ( #4214 )
2022-11-18 23:00:25 -06:00
Charles Kerr
4cc0b77eec
refactor: incremental announcer improvements ( #4211 )
2022-11-17 20:23:54 -06:00
Charles Kerr
d61e31c419
fix: more thread safety updates ( #4136 )
...
* fix: thread safety in tr_sessionLoadTorrents()
* refactor: use std::future in tr_sessionSet()
* refactor: use std::future in tr_sessionClose()
2022-11-10 12:04:49 -06:00
Charles Kerr
611d36ac84
refactor: decouple session settings from the session class ( #4053 )
2022-11-01 19:32:26 -05:00
Charles Kerr
b32f3e0a24
refactor: add tr_address::toCompact() ( #4014 )
...
* refactor: add tr_address::toCompact()
* test: use the theory.org compact ipv4/6 examples in NetTest.compact4, NetTest.compact6
* refactor: add tr_address::toCompact()
* test: add toCompact, fromCompact tests
* refactor: add compact <--> sockaddr_storage conversion
2022-10-24 13:40:12 -05:00
Charles Kerr
d191a04228
refactor: decouple tr_announcer_udp ( #4002 )
2022-10-21 13:15:14 -05:00
Charles Kerr
257d98545b
refactor: add tr_port_forwarding::Mediator ( #3855 )
...
* refactor: add a Mediator class to decouple tr_session and tr_port_forwarding
* refactor: add tr_port_forwarding::Mediator::privatePeerPort()
* refactor: add tr_port_forwarding::Mediator::onPortForwarded()
* chore: avoid unnecessary include of timer.h in other headers
* refactor: use a uniform timerMaker() API in mediators
2022-10-01 09:12:49 -05:00
Charles Kerr
56e0a1bda8
chore: add cppcoreguidelines-pro-type-member-init to libtransmission/.clang-tidy ( #3840 )
2022-09-23 00:51:15 -05:00
Charles Kerr
1782dc6d7a
refactor: use readability-identifier-naming in clang-tidy ( #3784 )
2022-09-07 11:04:28 -05:00
Charles Kerr
29f57bc296
chore: iwyu headers ( #3661 )
2022-08-17 11:08:36 -05:00
Charles Kerr
08ec882055
refactor: remove tr_isSession() ( #3638 )
2022-08-14 09:16:08 -05:00
Charles Kerr
5c8695025a
refactor: make tr_session.is_closing_private_ ( #3637 )
2022-08-13 20:04:36 -05:00
Charles Kerr
c66303fae2
refactor: watchdir ( #3606 )
2022-08-10 08:34:51 -05:00
Charles Kerr
b49cccbd3e
refactor: add timer class ( #3603 )
...
Wraps around evtimer so that some of the codebase can use libevent without coupling to it.
2022-08-08 17:53:20 -05:00
Charles Kerr
3428076ecd
fix: cppcoreguidelines-special-member-functions warnings in libtransmission ( #3575 )
2022-08-03 12:03:28 -05:00
Charles Kerr
18e2a04f88
refactor: make sha1, sha256 RAII safe ( #3556 )
2022-07-31 15:58:14 -05:00
Charles Kerr
b889f0c395
chore: iwyu cstring, cstdlib, optional, unordered_set ( #3532 )
2022-07-27 16:53:39 -05:00
Charles Kerr
ec79a2a888
fix: clang-tidy misc-const-correctness warnings ( #3529 )
2022-07-27 09:03:13 -05:00
Charles Kerr
256b436023
fix: clang 15 warnings ( #3172 )
...
* fix modernize-macro-to-enum libtransmission warnings
* fix readability-simplify-boolean-expr libtransmission warnings
* fix bugprone-unchecked-optional-access libtransmission warnings
2022-06-01 11:56:59 -05:00
Charles Kerr
cec2195c78
refactor: tr_peerMgrGetPeers() returns a vector ( #3142 )
...
* refactor: tr_peerMgrGetPeers() returns a vector
* chore: iwyu <iterator> for std::back_inserter
* chore: iwyu <vector> for std::vector
2022-05-26 20:29:10 -05:00
Antoine Cœur
5d52da8726
Address format conversion warnings in localizations ( #3059 )
2022-05-14 00:31:24 -05:00
Charles Kerr
5e769fbc55
refactor: make tr_recentHistory a template class ( #3012 )
...
This gives more flexibility on the size of the count bins, so we can save space on smaller counts
2022-04-28 10:52:26 -05:00
Charles Kerr
7c2477dddf
refactor: reduce field padding in some structs ( #3006 )
...
* refactor: use smaller integral types in tr_bandwidth
* refactor: re-arrange tr_torrent fields to avoid padding
* refactor: re-arrange tr_torrent fields to avoid padding
* refactor: re-arrange tr_announcer fields to avoid padding
2022-04-28 08:44:24 -05:00
Charles Kerr
ed897f93f2
refactor: remove evbuffer_free_to_str() ( #2967 )
2022-04-22 13:05:49 -05:00
Charles Kerr
32f854a7cf
refactor: add a tr_port safety class ( #2952 )
2022-04-21 10:58:13 -05:00
Antoine Cœur
bdac708762
docs: fix various typos and misspellings ( #2955 )
2022-04-21 09:28:38 -05:00
Charles Kerr
6cdc7e3828
refactor: remove tr_announce_list::tracker info.announce ( #2931 )
2022-04-16 15:41:51 -05:00
Charles Kerr
2f97655981
refactor: remove tr_url_parsed_t.portstr ( #2929 )
2022-04-16 13:13:42 -05:00
Charles Kerr
205abbbcce
refactor: iwyu string, vector, cstdint ( #2898 )
...
* refactor: use cstdint for intX_t types
* refactor: iwyu sstring_view
* refactor: iwyu <cstring>
* refactor: iwyu <vector>
2022-04-07 20:50:26 -05:00
Charles Kerr
b256da02e3
refactor: remove unused macros ( #2897 )
...
* refactor: remove unused fu nction tr_lowerBound()
* refactor: tr_timerAdd() takes a reference, not a pointer
* refactor: tr_timerAddMsec() takes a reference, not a pointer
* refactor: tr_moveFile() takes a reference, not a pointer
* refactor: tr_wildmat() takes std::string_views
* refactor: remove unused macro TR_GNUC_NONNULL
* refactor: remove unused macro TR_GNUC_PRINTF
* refactor: remove unused macro TR_GNUC_NULL_TERMINATED
* refactor: remove unused macro TR_GNUC_HOT
* refactor: remove unused macro __has_feature
* refactor: remove unused macro __has_attribute
* refactor: remove unused macro TR_DEPRECATED
* refactor: remove unused macro TR_DISABLE_COPY_MOVE
2022-04-07 19:20:29 -05:00
Charles Kerr
80dd460773
refactor: annotate nodiscard, constexpr, noexcept methods ( #2879 )
2022-04-04 22:51:56 -05:00
Charles Kerr
1d7d17396f
refactor: remove tr_snprintf() pt 2 ( #2871 )
2022-04-03 13:23:00 -05:00
Charles Kerr
76f44b4b6f
fix: sonarcloud ( #2868 )
...
* refactor: make this variable const
* refactor: replace redundant type with auto
* refactor: use the nullptr literal
* refactor: replace declaration by structured binding declaration
2022-04-02 17:42:51 -05:00
Charles Kerr
2f677aebb0
refactor: add tracer assertionf or bug #2727 ( #2836 )
2022-03-28 23:29:35 -05:00
Charles Kerr
2996e223dd
refactor: strbuf for metainfo files ( #2833 )
...
* refactor: tr_ctorSaveContents takes a string_view filename
* refactor: remove tr_ctorSaveMagnetContents
* refactor: announce_list::save takes a std::string_view
* refactor: magnet() takes an OutputIt arg
Generate the magnet link URL into an output iterator
* refactor: remove deprecated calls to tr_http_escape
* refactor: tr_torrent.torrentFile takes an OutputIterator
* refactor: tr_torrent.torrentFile returns a tr_pathbuf
* refactor: tr_torrent_metainfo.makeFilename returns a tr_pathbuf
* refactor: use tr_urlbuf in announcer-http
2022-03-28 17:13:32 -05:00
Charles Kerr
fa8aaf7631
refactor: remove remaining vararg log messages ( #2776 )
2022-03-17 17:39:06 -05:00
Charles Kerr
0be920156b
refactor: fmt part 3 ( #2773 )
2022-03-15 19:51:36 -05:00
Charles Kerr
72a67054ea
refactor: fmt part 2 ( #2771 )
2022-03-15 09:52:16 -05:00
Charles Kerr
a942c67199
refactor: use fmt ( #2758 )
...
* deps: use fmt (8.1.1 tag) to build log strings
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-13 23:43:35 -05:00
Charles Kerr
d2f8e1d4e0
refactor: set logging levels ( #2755 )
2022-03-11 15:09:22 -06:00
Charles Kerr
af339a15ed
refactor: remove deep logging ( #2749 )
...
* refactor: remove "deep logging"
2022-03-09 23:51:14 -06:00
Charles Kerr
60ef1abadf
refactor: tr_torrents ( #2722 )
...
* refactor: add tr_torrents container
2022-03-01 15:06:29 -08:00
Charles Kerr
2c7e167436
chore: exploratory change for #2571 ( #2717 )
...
This _may_ solve the problem by calling tier.useNextTracker(); but if not, it also adds new assertions to try and fail sooner if the announcer gets into a bad state.
2022-02-26 11:53:34 -06:00
Charles Kerr
4450973d94
feat: stop announcing on not-registered tracker error ( #2708 )
...
Fixes #2051 .
2022-02-25 00:26:19 -06:00
Charles Kerr
9c3acc7e8a
fixup: handle unhandled scrape/announce responses ( #2701 )
...
followup to the #2531 benc refactor
2022-02-24 07:59:58 -06:00
Charles Kerr
3780f90ef5
perf: skip some excess announce list rebuilds
2022-02-21 08:34:59 -06:00
Charles Kerr
581c3f9854
refactor: do not mix torrent, default trackers
2022-02-21 08:34:59 -06:00
Charles Kerr
e14c7f38e5
feat: use libpsl ( #2575 )
...
Use libpsl to calculate public and private parts of URL hosts.
2022-02-12 11:30:27 -06:00
Charles Kerr
ebb2ab6aee
chore: update license spdx abbreviations ( #2582 )
...
Use SPDX license list 3.0 terminology: replace deprecated identifiers
GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
2022-02-07 10:25:02 -06:00
Charles Kerr
ecef0feb0c
refactor: clang-tidy in libtransmission ( #2578 )
...
* chore: enable cppcoreguidelines-slicing warning
* chore: enable readability-named-parameter warning
* chore: enable bugprone-reserved-identifier check
* chore: enable bugprone-not-null-terminated-result check
* chore: enable bugprone-sizeof-expression check
* chore: enable bugprone-incorrect-roundings check
* chore: enable misc-misplaced-const check
* chore: enable bugprone-suspicious-include check
* chore: enable bugprone-signed-char-misuse check
* chore: enable modernize-raw-string-literal check
* chore: enable readability-static-accessed-through-instance check
* chore: enable readability-implicit-bool-conversion check
* fixup! Merge branch 'main' into refactor/clang-tidy
2022-02-06 22:28:36 -06:00
Charles Kerr
e908193027
fix: some use-init-statement sonarcloud warnings ( #2563 )
2022-02-01 19:09:11 -06:00
Charles Kerr
878405f862
Revert "fix: sonarcloud ( #2558 )" ( #2562 )
...
This reverts commit 8b9483f7fb
.
2022-02-01 11:30:51 -06:00
Charles Kerr
8b9483f7fb
fix: sonarcloud ( #2558 )
...
* fix: add const modifier for functions
* fix: many sonarcloud use-init-statement warnings
2022-01-31 22:46:27 -06:00
Charles Kerr
b998032305
fix: paused torrents not scraped even if scrape-paused-torrents-enabled setting is true ( #2528 )
2022-01-27 22:17:11 -06:00
Charles Kerr
ac823f3cc4
fix: sonarcloud warnings in new code ( #2500 )
2022-01-24 19:05:24 -06:00
Charles Kerr
26bb9f3440
fix: sonarcloud code smells ( #2486 )
2022-01-23 18:53:35 -06:00
Charles Kerr
e51527203e
refactor: re-enable clang-tidy warnings ( #2485 )
2022-01-23 16:47:41 -06:00
Charles Kerr
b45c831bcb
refactor: use C++ objects in announcer ( #2474 )
2022-01-22 23:41:01 -06:00
Charles Kerr
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
3036a76beb
fix: sonarcloud code smells ( #2421 )
2022-01-17 12:39:50 -06:00
Charles Kerr
b0ee4007ff
refactor: include cleanups ( #2392 )
...
* refactor: include <memory> when using shared_ptr or unique_ptr
* refactor: include <cstdio> iff we use it
* refactor: include <cstring> iff we use it
* refactor: include <cstdlib> iff we use it
* refactor: include <string_view> or <string> iff we use it
* refactor: include <array> iff we use it
* refactor: include <ctime> iff we use it
* refactor: include <cctype> iff we use it
* refactor: misc #include cleanups in libtransmission
2022-01-12 20:13:58 -06:00
Charles Kerr
fa35b8ad39
refactor: use std::string in tr_variantToStr() ( #2351 )
...
* refactor: use std::string in tr_variantToStr()
2021-12-27 16:47:25 -06:00
Charles Kerr
b62b8f28bf
fix: exit time dtor warnings ( #2338 )
2021-12-24 20:07:33 -06:00
Charles Kerr
f3228e9670
refactor: further decouple tr_torrent and tr_info ( #2336 )
2021-12-24 15:12:33 -06:00
Charles Kerr
dd1379b0b6
refactor: add tr_interned_string ( #2332 )
2021-12-23 11:16:05 -06:00
Charles Kerr
bd68d3a2fd
refactor: use tr_sha1_digest_t everywhere ( #2330 )
2021-12-21 16:14:15 -06:00
Charles Kerr
b9406dfebb
refactor: even more torrent housekeeping ( #2323 )
2021-12-16 22:51:53 -06:00
Charles Kerr
e4a172d39c
fix: sonarcloud ( #2322 )
...
* fix: sonarcloud warning - redundant cast
* fix: sonarcloud warning - init-statement
* fix: sonarcloud warning - init-statement
* fix: sonarcloud warning - move #include to top of file
* fix: sonarcloud warning - implicit conversion loses precision
* fix: sonarcloud warning - confirm safe use of strlen
* fix: sonarcloud warning - refactor code to not nest more than three deep
* iwyu: cstring
* iwyu: algorithm
2021-12-16 16:58:58 -06:00
Charles Kerr
4ea2429217
refactor: tr_torrent housekeeping ( #2319 )
2021-12-16 02:49:04 -06:00
Charles Kerr
42b1362760
refactor: tidy libtransmission includes ( #2316 )
2021-12-15 15:25:42 -06:00
Charles Kerr
1c848cf174
refactor: add tr_info accessors to tr_torrent ( #2314 )
...
* refactor: add tr_info accessors to tr_torrent
2021-12-15 09:53:20 -06:00
Charles Kerr
d00be0dec7
refactor: tr_torrentIsSeed() -> tr_torrent::isDone() ( #2313 )
2021-12-15 01:04:26 -06:00
Charles Kerr
656df477f2
refactor: add tr_announce_list ( #2308 )
...
* refactor: add tr_announce_list (#2308 )
2021-12-14 14:59:40 -06:00
Charles Kerr
0cedfec630
fixup! refactor: add tr_torrentTrackers() ( #2282 ) ( #2294 )
...
ensure announcer tracker count is correct
2021-12-09 20:03:26 -06:00
Charles Kerr
ab0c49859e
refactor: add tr_torrentTrackers() ( #2282 )
...
* refactor: add tr_torrentTrackers()
2021-12-08 10:55:52 -06:00
Charles Kerr
2977636d58
fix: sonarcloud warnings ( #2260 )
...
* fix: add-explicit-keyword-to-constructor warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuB-2farvsyMPiZl&open=AX1tyuB-2farvsyMPiZl
* fix: use a structured binding declaration
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuHH2farvsyMPiZm&open=AX1tyuHH2farvsyMPiZm
* Fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuH22farvsyMPiZn&open=AX1tyuH22farvsyMPiZn
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZw&open=AX1tyuO42farvsyMPiZw
* fix implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZs&open=AX1tyuO42farvsyMPiZs
* fix: implicit-conversion-loses-precision warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1tyuO42farvsyMPiZt&open=AX1tyuO42farvsyMPiZt
* fix handle-this-exceeption-or-do-not-catch-it warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpV&open=AX1y7t12cIz3krp3mVpV
* fix make-this-variable-a-reference-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpW&open=AX1y7t12cIz3krp3mVpW
* fix replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1y7t12cIz3krp3mVpY&open=AX1y7t12cIz3krp3mVpY
* Fix use-try_emplace-instead-of-emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk3QwxvzFbF6whWN&open=AX0WPk3QwxvzFbF6whWN
* Fix: make-this-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPUXjI_aUyxGBxB4&open=AX0bZPUXjI_aUyxGBxB4
* Fix use-std::make_unique warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0WPk0twxvzFbF6whWC&open=AX0WPk0twxvzFbF6whWC
* Fix: replace-push_back-with-emplace_back warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0BraL_0QLXO0pQ_Bfv&open=AX0BraL_0QLXO0pQ_Bfv
* Fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB8&open=AX0bZPXajI_aUyxGBxB8
* Fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB9&open=AX0bZPXajI_aUyxGBxB9
* Fix: replace-emplace-with-try_emplace warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxB_&open=AX0bZPXajI_aUyxGBxB_
* Fix: extract-assignment-from-operation warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0bZPXajI_aUyxGBxCA&open=AX0bZPXajI_aUyxGBxCA
* Fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX1op6_hUBCnp-Grmra8&open=AX1op6_hUBCnp-Grmra8
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0L8qgMUnpKTxYiu5CN&open=AX0L8qgMUnpKTxYiu5CN
* Revert "Fix use-std::make_unique warning"
This reverts commit 463a742f34
.
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTZ&open=AX06St241usi2gyYkPTZ
* fix: make-parameter-a-pointer-to-const warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX06St241usi2gyYkPTa&open=AX06St241usi2gyYkPTa
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX01Itn2f_SST5i7BN1o&open=AX01Itn2f_SST5i7BN1o
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv55-MuQoG-Y-NgLX&open=AXziv55-MuQoG-Y-NgLX
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AX0_a_JGNJn7rAzml_68&open=AX0_a_JGNJn7rAzml_68
* fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXzyMRYbK9dvryvWm8XA&open=AXzyMRYbK9dvryvWm8XA
* fix: use-init-statement warning
Xref: https://sonarcloud.io/project/issues?id=transmission_transmission&issues=AXziv52fMuQoG-Y-NgLW&open=AXziv52fMuQoG-Y-NgLW
2021-12-01 17:11:57 -06:00
Charles Kerr
74f367c150
fix: sonarcloud ( #2227 )
...
* fix: sonarcloud useless-sequence-of-pointer-operators warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXzyMRYbK9dvryvWm8XC\&open\=AXzyMRYbK9dvryvWm8XC
* fix: sonarcloud unused-function warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06Stxd1usi2gyYkPTE\&open\=AX06Stxd1usi2gyYkPTE
* fix: sonarcloud init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXzyMRABK9dvryvWm8Wv\&open\=AXzyMRABK9dvryvWm8Wv
* fix: sonarcloud assignment-in-expression warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXztC8rqIH_lVCrUGWcX\&open\=AXztC8rqIH_lVCrUGWcX
* fix: sonarcloud use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXy-sssdW63O2GMuTBKY\&open\=AXy-sssdW63O2GMuTBKY
* fix: replace-redundant-type-with-auto warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXy-sssdW63O2GMuTBKZ\&open\=AXy-sssdW63O2GMuTBKZ
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AXzOK_MX7S1ht0f4sjIh\&open\=AXzOK_MX7S1ht0f4sjIh
* fix: use-structured-binding-declaration warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06Stxd1usi2gyYkPTK\&open\=AX06Stxd1usi2gyYkPTK
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06Stxd1usi2gyYkPTL\&open\=AX06Stxd1usi2gyYkPTL
* fix: use-structured-binding-declaration warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06Stxd1usi2gyYkPTP\&open\=AX06Stxd1usi2gyYkPTP
* fixup! fix: use-structured-binding-declaration warning
* Revert "fix: sonarcloud useless-sequence-of-pointer-operators warning"
This reverts commit 26c99e75c6
.
cannot convert from 'const _InIt' to 'const rpc_method *'
2021-11-25 16:39:19 -06:00
Charles Kerr
de169c7ec3
refactor: tr_completion ( #2220 )
...
* refactor: refactor tr_completion + add test coverage for it
2021-11-25 12:26:51 -06:00
Charles Kerr
da855a7257
refactor: use std mutex/lock intead of bespoke ( #2194 )
...
* refactor: use std mutex/lock intead of bespoke
2021-11-20 15:20:45 -06:00
Charles Kerr
f14e741052
fix: some sonarcloud warnings ( #2189 )
...
* fix: pass-large-object-by-reference-to-const warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0Gz8ze7dx8i2lkKEvq\&open\=AX0Gz8ze7dx8i2lkKEvq
* fix: use-std-array-instead-of-C-array warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5B-\&open\=AX0L8qcgUnpKTxYiu5B-
* fix: extract-assignment-from-expression
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5CH\&open\=AX0L8qcgUnpKTxYiu5CH
* fix: move-include-directives-to-top
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qlYUnpKTxYiu5CQ\&open\=AX0L8qlYUnpKTxYiu5CQ
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0L8qcgUnpKTxYiu5CK\&open\=AX0L8qcgUnpKTxYiu5CK
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlmBwxvzFbF6whWh\&open\=AX0WPlmBwxvzFbF6whWh
* fix: ensure-move-constructor-is-noexcept
https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlWzwxvzFbF6whWU\&open\=AX0WPlWzwxvzFbF6whWU
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP20jI_aUyxGBxCD\&open\=AX0bZP20jI_aUyxGBxCD
* fix: replace-redundant-type-with-auto
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP0rjI_aUyxGBxCB\&open\=AX0bZP0rjI_aUyxGBxCB
* fix: make-parameter-const
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0gkQqqPDVGqE4PY-io\&open\=AX0gkQqqPDVGqE4PY-io
* fix: use-init-statement
https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0rARJbfJ-O-YIDS9xM\&open\=AX0rARJbfJ-O-YIDS9xM
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0WPlmBwxvzFbF6whWh\&open\=AX0WPlmBwxvzFbF6whWh
* fix: explicitly-delete-copy-ctor
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0gkQr6PDVGqE4PY-i4\&open\=AX0gkQr6PDVGqE4PY-i4
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0bZP9wjI_aUyxGBxCF\&open\=AX0bZP9wjI_aUyxGBxCF
2021-11-17 18:17:09 -06:00
Charles Kerr
60b802a22b
refactor: fix some msvc compiler warnings ( #2185 )
...
* refactor: use if-constexpr to silence C4127 warning
* chore: fix C4706 assignment-within-conditional-expression warning
* chore: fix int-widened-to-uint64 warning in tests
2021-11-16 13:25:30 -06:00
Charles Kerr
7693ef69bf
refactor: magnet metainfo ( #2124 )
...
* refactor: magnet-metainfo
2021-11-09 20:42:18 -06:00
Charles Kerr
bdf1bb6d17
refactor: tr_strv*() util functions ( #2123 )
...
* feat: add tr_strv utils
2021-11-09 18:13:47 -06:00
Charles Kerr
d8b57fe4dc
refactor: web_utils ( #2121 )
...
* chore: move web utils from web, utils to web-utils
2021-11-08 21:30:03 -06:00
Charles Kerr
7724111a8b
refactor: increase use of tr sha1 digest t ( #2091 )
...
* refactor: make tr_sha1_digest_t an array of std::byte
* refactor: increase use of tr_sha1_digest_t
2021-11-03 19:55:04 -05:00
Charles Kerr
9dca5f2086
perf: intern the announcer module's URL strings ( #2085 )
...
* perf: intern the announcer module's internal URLs
2021-11-02 18:00:01 -05:00
Charles Kerr
ed801eab8f
feat: less prolix announce error logging ( #2052 )
2021-10-27 08:34:16 -05:00
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
b491da0ce4
refactor: add tr_peer_id_t ( #2004 )
...
* refactor: move handshake_done args into a convenience struct
* refactor: move peer_id from peerIo to tr_handshake
tr_handshake is a short-term object and tr_peerIo is long-term, so this
effectively narrows the scope of this field.
* chore: remove unused field tr_peerIo.isEncrypted
* refactor: add tr_peer_id_t type to hold peer ids.
this is a 'using' alias to a std::array<> so that code passing peer-ids
around doesn't have to memcmp / memcpy PEER_ID_LEN anymore. Also removes
the now-unused PEER_ID_LEN macro.
2021-10-21 21:40:55 -05:00
Charles Kerr
850b3caa61
refactor: prefer constexpr over enum for non enumerated constants ( #1996 )
...
refactor: prefer constexpr over enum for non-enumerated constants
2021-10-20 19:39:05 -05:00
Charles Kerr
ab82e155be
build: add clang tidy modernize loop convert ( #1949 )
...
* build: add clang-tidy check modernize-pass-by-value
* build: add clang-tidy check modernize-loop-convert
* refactor: constexpr
* refactor: make preallocGuess a std::array
2021-10-14 10:36:49 -05:00
Charles Kerr
5df6e4f88f
fix: uninitialized variables in announcer ( #1936 )
2021-10-14 09:22:28 -05:00
Charles Kerr
af2af2a57e
build: add clang-tidy check modernize-pass-by-value ( #1946 )
2021-10-13 19:14:27 -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
83f21b8e0e
refactor: prefer constexpr functions over static inline ones ( #1887 )
...
* refactor: prefer constexpr functions over static inline ones
2021-10-06 17:24:04 -05:00
Charles Kerr
cc204e0b2c
refactor: prefer "using" over "typedef" ( #1883 )
...
* refactor: prefer "using" over "typedef"
2021-10-06 09:26:07 -05:00
Charles Kerr
6b71050000
fix: recent regressions ( #1873 )
...
* fixup! refactor: use std::set in tr_webseed (#1847 )
fix: use placement new to instantiate tr_webseeds.tasks
* fixup! refactor: use std::string in tr_scrape_response (#1866 )
fix: avoid assigning a nullptr to std::string
* fixup! refactor: use std::string in tr_scrape_response (#1866 )
fix: avoid assigning a nullptr to std::string
2021-10-01 16:57:30 -05:00