Commit Graph

292 Commits

Author SHA1 Message Date
Julien 8ac323d5d6
chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
Charles Kerr e54b17d92e
refactor: blocklists (#6189) 2023-10-31 19:20:01 -04:00
Charles Kerr f0e9f90782
refactor: move tr_session::getAllTorrents to tr_torrents (#6179) 2023-10-30 16:38:02 -04:00
Charles Kerr c0e5e3a368
refactor: reduce coupling between tr_session and tr_peerMgr (#6151) 2023-10-23 11:34:30 -04:00
Charles Kerr 8c1291ce8a
refactor: make tr_torrent::unique_id_ private (#6145) 2023-10-20 21:23:14 -05:00
Charles Kerr 4bdb3066d8
refactor: decouple tr_verify_worker from tr_torrent (#6123) 2023-10-19 08:39:34 -05:00
Yat Ho 2c97567370
chore: minor housekeeping for bandwidth code (#6080) 2023-10-06 18:30:04 -05:00
Yat Ho c6236c7bee
fix: reconstruct `utp_core_` when toggling utp (#6075) 2023-10-04 20:33:18 -05:00
Yat Ho 51995ab63f
fix: remove redundant `tr_lpd::create()` call (#5900) 2023-09-25 22:46:41 -05:00
Charles Kerr 6ead147620
refactor: use new tr_variant API in tr_session (#6006) 2023-09-16 08:23:35 -05:00
Charles Kerr ebb1b775af
refactor: public tr_session settings API now returns tr_variants (#5983) 2023-09-07 19:05:16 -05:00
Charles Kerr fbfbfac3ae
fix: minor coverity warnings (#5916)
* fix: unchecked return value from tr_variantDictFindInt()

coverity 1541113

* fix: unchecked return value from tr_variantDictFindBool()

coverity 1541112

* fix: copy-instead-of-move in tr_strlower()

coverity 1541092

* fix: use auto& instead of auto in test

coverity 1541084

* fix: logically dead code

coverity 1541065

* fix: copy-instead-of-move in tr_announcer_impl::addTorrent()

coverity 1541062

* fix: unchecked return value of tr_variantDictFindInt()

coverity 1541061

* fix: copy-instead-of-move in FilterBar::Impl::tracker_filter_model_update()

coverity 1541058

* fix: copy-instead-of-move in gtr_window_on_close()

* fix: silence invalid resource leak warning

coverity 1520595

* fix: unchecked return value from setsockopt()

coverity 1518345

* fix: dereference after null check (FORWARD_NULL)

coverity 1517816
2023-08-21 21:59:47 -05:00
Charles Kerr 59c638c63d
refactor: replace tr_variant::is_*() with tr_variant::holds_alternative() (#5930) 2023-08-21 16:16:54 -05:00
Charles Kerr 5837603b6f
refactor: make tr_variant follow RAII (#5923) 2023-08-20 23:15:23 -05:00
Yat Ho eea7d4d886
refactor: re-organise `net.h` member functions (#5878) 2023-08-17 22:13:01 -05:00
Charles Kerr a4d205612a
refactor: add tr_variant_serde (#5903) 2023-08-17 11:02:45 -05:00
tearfur a88b353576
chore: rename other publicAddress() functions (#5873) 2023-08-14 10:31:12 -05:00
tearfur ca4cb1a675
fix/cleanups to tr_peerMsgsImpl (#5783)
* fix: correct condition to advertise pex support in ltep handshake

1. Advertise pex support regardless of whether the peer had advertised pex support. No reason to give up an opportunity to advertise pex support just because our direct peer does not support it.
2. Check if pex is enabled in global settings as well.
2023-07-14 10:51:52 -05:00
tearfur 5ec4ca550e
chore: iwyu (#5746) 2023-07-08 10:24:03 -05:00
Charles Kerr c364abcb6f
chore: misc-include-cleaner (partial) (#5738) 2023-07-06 10:00:07 -05:00
tearfur 8543555584
refactor: use `std::pair` to store socket addresses (#5723) 2023-07-04 20:29:12 -05:00
Charles Kerr 56b27057fd
refactor: add lightweight observable / observer for decoupling (#5716) 2023-07-04 15:47:18 -05:00
Charles Kerr 8183d7fddf
refactor: utils naming (#5696)
* chore: rename tr_strvContains to tr_strv_contains

* chore: rename tr_strvStartsWith to tr_strv_starts_with

* chore: rename tr_strvEndsWith to tr_strv_ends_with

* chore: rename tr_strvSep to tr_strv_sep

* chore: rename tr_strvStrip to tr_strv_strip

* chore: rename tr_strvToBuf to tr_strv_to_buf

* refactor: rename tr_saveFile() to tr_file_save()

rename tr_loadFile() to tr_file_read()

rename tr_moveFile() to tr_file_move()

* refactor: rename tr_parseNum() to tr_num_parse()

refactor: rename tr_parseNumRange() to tr_num_parse_range()

* chore: group related functions together in header
2023-06-30 09:49:58 -05:00
Charles Kerr ce66e5c442
iwyu: remove, add std headers where used (#5694)
* chore: remove unused #include <array>

* chore: remove unused #include <chrono>

* chore: remove unused #include <set>

* chore: remove unused #include <algorithm>

* chore: remove unused #include "interned-string.h"

* chore: remove unused #include <list>

* chore: remove unused #include <optional>

* chore: iwyu <cstddef>

* chore: iwyu <ctime>

* chore: remove unused #include <cerrno>

* chore: remove unused #include <deque>

* chore: remove unused #include <vector>

* chore: remove unused #include <memory>

* chore: remove unused #include <unordered_set>

* chore: remove unused #include <array>

* chore: remove unused #include <mutex>

* chore: remove unused #include <functional>

* chore: remove unused #include <cmath>
2023-06-29 23:51:55 -05:00
tearfur 280dea4e33
add support for sending the `ipv4` parameter during ltep handshake (#5643) 2023-06-20 10:51:07 -05:00
tearfur 802619e174
fix: fixes and improvements to global IP query (#5510) 2023-06-11 18:27:01 -05:00
Charles Kerr 0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
tearfur d65f9329cd
refactor: followup/cleanup of `tr_global_ip_cache` PR (#5498)
* remove tr_session::bindAddress()

* replace tr_net_hasIPv6 with tr_session::has_ip_protocol()

* update comment
2023-05-05 22:05:28 -05:00
kmikita 693d202a64
refactor: save stats.json periodically and when closing session #5476 (#5490) 2023-05-05 15:33:23 -05:00
tearfur 474a30ab2d
feat: add global IP cache, fix UDP connection failure warnings 2023-05-05 12:17:40 -05:00
Gary Elshaw 2f1d5a225c
fix: comment typos in libtransmission (#5473) 2023-04-30 13:29:29 -05:00
Charles Kerr 9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr f2aa3e197b
refactor: add tr_sys_dir_get_files() (#5412) 2023-04-18 16:23:20 -05:00
Charles Kerr 7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h (#5404) 2023-04-16 15:34:19 -05:00
Charles Kerr 3af9645615
refactor: add tr_address::is_any() (#5398)
As suggested by @tearfur

Xref: https://github.com/transmission/transmission/pull/5329#discussion_r1166236165
2023-04-15 19:30:20 -05:00
Charles Kerr d72cb67cfb
chore: include directory name in libtransmission #includes (#5308) 2023-04-14 14:33:23 -05:00
Charles Kerr 63421489fe
refactor: tr_sys_dir_open() takes a std::string_view (#5380) 2023-04-14 09:31:46 -05:00
tearfur 931beba56f
fix: set log level before constructing tr_session (#5345) 2023-04-03 15:37:28 -05:00
Charles Kerr 47fd150bab
fix: some torrents think they are magnets (#5025) 2023-02-25 07:11:19 -06:00
Charles Kerr 8cee2f952e
fix: port forwarding flag not saved between sessions (#4842) 2023-02-11 20:49:16 -06:00
Julien 4b8cfa2e57
chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
Charles Kerr 7367d465b5
style: use the new paragraph comment style everywhere (#4634) 2023-01-22 13:21:30 -06:00
Charles Kerr b5c9e3d697
fix: clang-tidy warnings in libtransmission/transmission.h (#4628) 2023-01-21 13:49:43 -06:00
Dmitry Antipov a5c7b65869
perf: avoid extra time() call (#4577) 2023-01-11 09:26:58 -06:00
Charles Kerr d9278bd167
refactor: misc-use-anonymous-namespace pt. 5 (#4552) 2023-01-07 16:55:00 -06:00
Charles Kerr 9678b26984
refactor: misc-use-anonymous-namespace pt. 3 (#4539) 2023-01-07 08:27:54 -06:00
Charles Kerr b47c34726b
refactor: tr_peer_socket keeps track of peer count (#4534) 2023-01-04 15:37:55 -06:00
Charles Kerr 5ce503f1ab
refactor: udp_core constructor (#4469)
* refactor: udp_core constructor

* refactor: invert dependency between tr_session.publicAddress() and tr_globalIPv6()
2022-12-28 02:03:35 -06:00
Mike Gelfand 5fd0aff818
Automatically (re)order include directives (GTK client) (#4475)
* Automatically (re)order include directives (GTK client)

Include our headers first to ease IWYU enforcement.

* Fix includes missing from headers (GTK client)

* Fix build on Mac after includes reordering
2022-12-26 21:13:21 +00:00
Charles Kerr a1892f2c7c
fix: 4.0.0-beta.2 regression transmission-show --scrape did not exit cleanly (#4447) 2022-12-23 08:03:26 -06:00