Commit Graph

80 Commits

Author SHA1 Message Date
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