Charles Kerr
7e8eca0e96
refactor: make tr_torrent::seconds_[seeding,downloading] private ( #6279 )
2023-11-22 23:41:12 -06:00
Yat Ho
adc209d7e8
refactor: RPC `port-test` improvements ( #6274 )
2023-11-22 23:02:21 -06:00
Charles Kerr
64d9d57363
chore: fix minor clang-tidy warnings ( #6275 )
2023-11-21 09:02:03 -06:00
Charles Kerr
65d8ae5357
refactor: add a tr_direction arg to tr_torrent::is_queued() ( #6263 )
2023-11-16 23:55:29 -06:00
Charles Kerr
76521a1751
refactor: Values pt. 7 - remove tr_formatter_init methods ( #6258 )
...
* refactor: initialize libtransmission::Values units in Application::initUnits()
* refactor: use libtransmission::Values instead of Formatter::unitStr()
* refactor: remove Formatter::Size, Formatter:Type
* refactor: use Values::Config to init units in transmission-qt
* refactor: use Values::Config to init units in transmission-mac
* chore: remove unused tr_formatter_foo_init() functions
* chore: make Value::operator+() const
* use Values::Speed, Values::Storage in GTK client
* chore: use snake_case for Formatter methods
* refactor: use Values::Speed in GTK client details dialog
* feat: add Values::Value::is_zero()
* refactor: remove unnecessary UTF8String calls
2023-11-15 22:15:40 -06:00
Charles Kerr
f8c544397a
refactor: add private helper class CumulativeCount ( #6260 )
...
* refactor: CumulativeCounts helper class
* refactor: add private CumulativeCounts helper class for tr_torrent
2023-11-15 18:53:43 -06:00
Charles Kerr
ad63c7d77f
refactor: make some tr_torrent fields private ( #6259 )
...
* refactor: make tr_torrent::is_stopping_ private
* refactor: make tr_torrent::is_queued_ private
* refactor: make tr_torrent::is_dirty_ private
* refactor: make tr_torrent::is_deleting_ private
* refactor: make tr_torrent::obfuscated_hash_ private
* refactor: demeter
2023-11-15 16:24:33 -06:00
Charles Kerr
07d96036d9
refactor: Values pt. 6 - remove deprecated API ( #6250 )
2023-11-14 17:23:51 -06:00
Yat Ho
234e3278f1
fix: `assertion failed: is_connectable_.value_or(true) || !is_connected()` ( #6254 )
2023-11-14 09:13:20 -06:00
Charles Kerr
4be0dca5ac
refactor: Values pt. 5 - use Values::Speed in Qt client ( #6248 )
2023-11-13 11:13:17 -06:00
Yat Ho
90e91d6284
refactor: directly check if announcers are idle instead of using a stop counter ( #6237 )
2023-11-12 21:43:43 -06:00
Charles Kerr
8ebb5b0bc3
refactor: Values pt. 4 - use Speed in peer_mgr, peer_msgs ( #6241 )
2023-11-12 14:38:27 -06:00
Charles Kerr
0e85befc0f
refactor: Values pt. 3 - use Speed in tr_session ( #6235 )
2023-11-12 12:30:37 -06:00
Yat Ho
736cf4aa14
refactor: thread-safe `Cache` ( #6231 )
2023-11-12 11:53:04 -06:00
Yat Ho
40fe56f33e
refactor: thread-safe `lru-cache` and `tr_open_files` ( #6230 )
2023-11-11 21:09:23 -06:00
Charles Kerr
a575be778f
refactor: Values pt. 2 - use Speed in tr_bandwidth ( #6234 )
2023-11-10 17:12:24 -06:00
Charles Kerr
37f01fac4c
refactor: migrate variant api ( #6238 )
2023-11-10 15:41:32 -06:00
Charles Kerr
879258d62b
fix: clang-analyzer-core.NullDereference warning in tr_variant_serde::parse_json() ( #6236 )
2023-11-10 08:46:17 -06:00
Charles Kerr
36f33c0d30
fix: recent clang-tidy warnings ( #6233 )
...
* fix: readability-implicit-bool-conversion warnings in file-piece-map
* fix: clang-analyzer-core.NullDereference warning in on_handshake_done()
2023-11-09 19:13:43 -06:00
Yat Ho
a2e97234d2
refactor: optionally include 0 byte files when computing file offset ( #6229 )
2023-11-09 16:49:18 -06:00
Charles Kerr
2e32789193
refactor: add libtransmission::Values ( #6215 )
2023-11-09 08:39:06 -06:00
Cœur
bcbd9b77af
feat: add stats for known peers, not just connected ones ( #4900 )
2023-11-08 11:17:00 -06:00
Yat Ho
077dcc8f9a
fix: parse all http announce responses ( #6223 )
2023-11-08 09:54:19 -06:00
Charles Kerr
089c438512
ci: bump macos-11 to macos-12 in github actions ( #6203 )
2023-11-04 12:33:25 -05:00
Charles Kerr
a952a0731f
refactor: remove the tr_error** idiom ( #6198 )
...
* refactor: remove the tr_error** idiom
* fix: tr_error::message() is only constexpr in c++20 and up
* chore: silence a couple of g++-12 Wshadow warnings
2023-11-04 11:39:41 -05:00
Yat Ho
a2b547fb50
chore: iwyu ( #6201 )
2023-11-03 12:03:26 -05:00
Julien
424a9b5e17
chore: cleanup timespans in remaining headers ( #6199 )
...
* chore: cleanup timespans in remaining headers
* fix: reverted change in generated file
See https://github.com/transmission/transmission/actions/runs/6744426558/job/18334261137?pr=6199
2023-11-03 08:31:39 -05:00
Cœur
2e7448c9bc
fix: appendSanitizedComponent is too aggressive on non-WIN32 (and not enough aggressive on WIN32) ( #6187 )
2023-11-03 00:25:42 -05:00
Charles Kerr
a6c5dea40c
refactor: work around C3779 error in MSVC 14.37.32822 ( #6197 )
2023-11-02 23:18:11 -05:00
Julien
8ac323d5d6
chore: removed copyright timespans in headers ( #4850 )
2023-11-01 16:11:11 -05:00
sfan5
aaed2eb26c
feat: sanitize torrent filenames depending on current OS ( #3823 )
...
Instead of applying the limitations of the least common denominator (Windows) everywhere.
2023-11-01 15:27:04 -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
Dzmitry Neviadomski
c697d95ad3
fix: crash after nullptr dereference in rpcimpl ( #6177 )
2023-10-30 13:30:10 -04:00
Charles Kerr
e27b05bcec
refactor: make class methods private ( #6181 )
2023-10-30 02:32:29 -04:00
Yat Ho
d059669c0e
fix: formatting cmdline help message ( #6174 )
2023-10-29 15:41:39 -04:00
Yat Ho
d224985ef8
fixup! perf: cut down excess copying when downloading ( #5907 ) ( #6169 )
2023-10-27 00:19:24 -04:00
Charles Kerr
72d2823851
refactor: remove tr_torrentTotalSize() ( #6166 )
...
this interim function should have been removed when tr_torrentView() was introduced
2023-10-25 16:37:09 -04:00
Charles Kerr
165cf169e6
refactor: extract the lambda method in tr_variant::Map::find() ( #6161 )
...
experimental change for msvc 19.37 ftbfs
2023-10-25 15:36:28 -04:00
Charles Kerr
901de536a3
fix: in RPC, default to sort torrents by id ( #5604 )
...
When getting all torrents in a batch over RPC, the results are sorted by
info-dict hash. Prior to 4.0.0, they were sorted by ID. This change broke
some peoples' workflows.
I'm OK with breaking workflows if it's necessary to improve the program,
but this was an unintentional side-effect and I don't see any inherent
benefit to either sort order. So this PR restores the 3.00 sort order.
https://xkcd.com/1172/
2023-10-25 13:42:14 -04:00
Yat Ho
5a6f0a5623
fixup! refactor: re-organise net.h member functions ( #5878 ) ( #5933 )
...
* fix: check if address is valid in `tr_address::is_any()`
* refactor: add static implementation of `tr_address::is_valid()`
2023-10-25 11:53:46 -04:00
Yat Ho
6e7fdef721
perf: cut down excess copying when downloading ( #5907 )
...
* refactor: directly copy from socket to incoming payload
* refactor: directly process the incoming field
There is no need to copy the payload to a new buffer before processing.
`process_peer_message()` isn't going to return until it's done, and nothing else is going to mess with the incoming field while inside `process_peer_message()`.
* refactor: remove while loop
* add assert
2023-10-25 09:51:36 -04:00
Charles Kerr
237223aeaf
refactor: prefer std::set over QSet ( #5703 )
...
* refactor: use std::set instead of QSet in WatchDir.cc
* refactor: use std::set instead of QSet in FileTreeView.cc
* refactor: use std::set instead of QSet in ColumnResizer.cc
* refactor: use std::set instead of QSet in Prefs.cc
* chore: fix rebase error that changed libsmall snapshot
* refactor: more replace QSet with std::set
2023-10-24 21:14:37 -04:00
Charles Kerr
69b293a793
refactor: minor decoupling in peer-mgr ( #6155 )
...
* refactor: minor decoupling in peer-mgr
Pass a tr_torrents& and TimerMaker& into the tr_peerMgr and HandshakeMediator
constructors so they can be used directly instead of via tr_session.
No functional changes.
* refactor: in HandshakeMediator, make the session reference const
2023-10-24 15:24:52 -04:00
Charles Kerr
bbc3ce039f
refactor: remove quark support from tr_variant ( #6159 )
2023-10-24 14:49:23 -04:00
Charles Kerr
eb58996c9f
chore: remove unused tr_announce_list::announce_to_scrape(tr_quark) ( #6157 )
...
* chore: remove unused tr_announce_list::announce_to_scrape(tr_quark)
* fixup! chore: remove unused tr_announce_list::announce_to_scrape(tr_quark)
fix test oops
2023-10-24 10:58:01 -04:00
Yat Ho
6d958bd5fc
feat: do separate IPv4 and IPv6 port checks in WebUI ( #5953 )
...
* feat: add `ipProtocol` argument to `port-test` rpc method
* chore: update rpc-spec.md
* feat: split port check UI to IPv4 and IPv6 in webUI
* fix: default `open` to false if cannot get response
* chore: minor docs wording tweak
* chore: make clang-tidy happy
* chore: RPC doc tweaks
* fix: bad merge
* chore: review feedback
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* chore: match quark enum with parameter case
* refactor: use descriptive strings for `ipProtocol`
* chore: update docs
* fixup! refactor: use descriptive strings for `ipProtocol`
* fixup! chore: update docs
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-10-24 09:27:28 -04:00
Charles Kerr
735639c5c7
refactor: make tr_torrent::labels_ private ( #6153 )
2023-10-23 18:11:28 -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
682e4f2c2b
refactor: make tr_torrent::any_date_ private ( #6148 )
2023-10-21 23:23:08 -04:00
Charles Kerr
8f7330523c
chore: remove unused progress arg from tr_torrentSetLocation() ( #6147 )
2023-10-21 22:33:41 -04:00
Yat Ho
2130eb941a
refactor: drop jsonsl in favour of RapidJSON ( #6138 )
2023-10-21 14:00:12 -05:00
Charles Kerr
0457dcb6a8
refactor: make tr_torrent::files_wanted_ private ( #6146 )
2023-10-21 13:21:05 -05:00
Charles Kerr
8c1291ce8a
refactor: make tr_torrent::unique_id_ private ( #6145 )
2023-10-20 21:23:14 -05:00
Charles Kerr
9e5c528056
refactor: add tr_torrent::stat() ( #6143 )
2023-10-20 20:35:59 -05:00
Yat Ho
88fe76781c
perf: connectable pool housekeeping ( #6111 )
2023-10-19 13:05:19 -05:00
Charles Kerr
4bdb3066d8
refactor: decouple tr_verify_worker from tr_torrent ( #6123 )
2023-10-19 08:39:34 -05:00
Yat Ho
c70c49e87b
fix: encode `ip` in network byte order for udp announce ( #6126 )
2023-10-18 09:46:57 -05:00
Charles Kerr
0c3f65e1c6
fix: FTBFS on FreeBSD with clang 14 ( #6110 )
2023-10-16 19:39:14 -05:00
Yat Ho
0259edbaf3
fix: json string serializer improperly escaping characters ( #6005 )
...
* feat: escape json string according to RFC8259
* fix: do not append newline when json serde is in compact mode
* fix: json tests
1. Use the same locale settings as the apps
2. Added additional test case for a string that are known to be prone to locale issues
3. Removed test for escaping non-BMP characters to UTF-16 escape sequences
* chore: add more test cases to `JSONTest.testUtf8`
* chore: order cases in the same order as RFC8259
2023-10-16 19:36:37 -05:00
Yat Ho
6cec60f1fb
refactor: store outgoing handshake in `tr_peer_info` objects ( #6103 )
2023-10-14 12:58:15 -05:00
Yat Ho
43aff088d8
fix: only consider piece data in bandwidth limit ( #6082 )
...
* fix: only consider piece data in bandwidth limit
* refactor: remove unused `tr_bandwidth::clamp()` signature
2023-10-09 08:49:49 -05:00
Charles Kerr
db96771c80
refactor: add tr_torrent::Error helper class ( #6077 )
2023-10-08 21:33:34 -05:00
Yat Ho
0c52b710ad
feat: add option to force verify torrent in WebUI ( #5981 )
2023-10-06 22:52:59 -05:00
Yat Ho
2c97567370
chore: minor housekeeping for bandwidth code ( #6080 )
2023-10-06 18:30:04 -05:00
Charles Kerr
ce39b01dd2
perf: reduce unnecessary size overhead in tr_torrent struct ( #6073 )
2023-10-04 21:38:14 -05:00
Yat Ho
c6236c7bee
fix: reconstruct `utp_core_` when toggling utp ( #6075 )
2023-10-04 20:33:18 -05:00
Charles Kerr
3f7340502f
refactor: add a SimpleSmoothedSpeed helper class ( #6072 )
2023-10-04 17:40:46 -05:00
Yat Ho
93e8bf7330
fixup! refactor: make tr_torrent idle fields private ( #6070 ) ( #6074 )
...
Thanks!
2023-10-04 16:33:04 -05:00
Charles Kerr
68f3c89e3c
refactor: make tr_torrent idle fields private ( #6070 )
2023-10-03 20:18:55 -05:00
Charles Kerr
32a62d85ea
refactor: more tr_variant API ( #6057 )
2023-10-02 16:18:35 -05:00
Charles Kerr
917c00e477
refactor: remove tr_torrentStatCached() ( #6066 )
2023-10-02 14:07:28 -05:00
Yat Ho
5808f72f50
fix: assertion failed: port_empty in `tr_swarm::remove_peer()` ( #6062 )
2023-10-02 11:57:48 -05:00
Yat Ho
170f589b64
fixup! refactor: remove redundant code when adding announce lists to metainfo ( #6050 ) ( #6061 )
2023-10-02 10:18:38 -05:00
Yat Ho
ee4daa059d
feat: check if files are missing after setting location ( #5978 )
2023-10-01 19:21:18 -05:00
Cœur
1722f00777
chore: apply clang-format version 17.0.1 ( #6054 )
2023-10-01 18:45:52 -05:00
Yat Ho
cfa26d0da8
chore: more specific peer error log ( #6029 )
2023-10-01 10:43:17 -05:00
Charles Kerr
55da783e8f
refactor: remove redundant code when adding announce lists to metainfo ( #6050 )
2023-09-30 07:31:43 -05:00
Yat Ho
82a9aa6cf0
fix: correct log output ( #6048 )
2023-09-29 21:37:14 -05:00
hgy59
cf426d8f81
fix: tr_sys_path_copy in file-posix.cc for some Synology Devices ( #5966 ) ( #5974 )
2023-09-29 19:34:51 -05:00
Yat Ho
7973d873ff
feat: BT and MSE handshake rework ( #6025 )
2023-09-26 12:50:41 -05:00
Yat Ho
51995ab63f
fix: remove redundant `tr_lpd::create()` call ( #5900 )
2023-09-25 22:46:41 -05:00
Charles Kerr
114885d67b
fixup! refactor: tr_variant API update ( #5998 ) ( #6036 )
...
fix use of invalidated pointer in rpcipml
2023-09-25 13:24:46 -05:00
Charles Kerr
6ead147620
refactor: use new tr_variant API in tr_session ( #6006 )
2023-09-16 08:23:35 -05:00
Yat Ho
85a120faea
feat: add `preferred-transport` to settings.json ( #5939 )
2023-09-15 20:23:34 -05:00
Charles Kerr
9a82372e95
refactor: tr_variant API update ( #5998 )
2023-09-13 08:49:17 -05:00
luzpaz
3be0d728dd
Fix typos ( #5980 )
2023-09-10 22:31:49 -05:00
Yat Ho
d566695b33
fix: always move duplicate peer_info to graveyard pool ( #5941 )
2023-09-10 21:12:11 -05:00
Charles Kerr
ebb1b775af
refactor: public tr_session settings API now returns tr_variants ( #5983 )
2023-09-07 19:05:16 -05:00
chantzish
de889c93b8
fix: magnet data invalidation of tracker IDs ( #5957 )
2023-09-03 20:40:52 -05:00
Yat Ho
48dcff975a
fix: workaround HSTS upgrading to HTTPS for HTTP trackers ( #5969 )
2023-09-03 18:26:39 -05:00
Charles Kerr
14b324fc9c
fix: transmission-remote -l regression ( #5960 )
2023-09-01 17:23:44 -05:00
Yat Ho
e39045cf69
refactor: tidy up announcer code ( #5945 )
2023-09-01 16:51:58 -05:00
Charles Kerr
fc4b7ed9f4
refactor: prefer functions return std::string instead of tr_strbuf ( #5949 )
2023-08-29 21:58:31 -05:00
Charles Kerr
43030132fc
refactor: use std::variant in tr_variant ( #5936 )
2023-08-23 12:57:58 -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
bb386cf17f
refactor: use one socket for sending and receiving lpd announces ( #5909 )
2023-08-18 15:56:28 -05:00
Yat Ho
eea7d4d886
refactor: re-organise `net.h` member functions ( #5878 )
2023-08-17 22:13:01 -05:00