1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-15 00:19:01 +00:00
Commit graph

77 commits

Author SHA1 Message Date
Yat Ho
47eb4ee2bc
refactor: dedicated class for torrent queue ()
* Revert "feat: save queue order between sessions ()"

This reverts commit 4db50dae10.

* refactor: new torrent queue class

* refactor: replace queue code with new class

* test: new tests for new class

* feat: store and load queue order across sessions

* build: xcode

* refactor: use set_difference instead of unordered_set

* code review: use `tr_torrent_id_t` as key

* fix: don't overflow when moving up/down

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-03-09 19:08:50 -05:00
Yat Ho
2ba8cccfa7
fix: check full path when parsing http tracker responses ()
* refactor: move path checking methods to base

* refactor: differentiate "empty string key" and "no key"

* fix: check full path when parsing http announce response

* fix: check full path when parsing http scrape response

* refactor: avoid copying when checking scrape info hash

* fixup! fix: check full path when parsing http scrape response
2024-12-24 14:30:50 -06:00
Bark
1a38830ada
fix: Take into account only the private that is inside info. () 2024-12-23 14:08:05 -06:00
Yat Ho
9748f42c5a
fix: restore portable file path check ()
* chore: change to snake_case naming

* fix: restore portable file path check

* fix: macosx build
2024-05-25 10:08:53 -05:00
Yat Ho
459c8d3791
fix: escape single file torrent name () 2024-05-24 10:08:33 -05:00
Yat Ho
152f3e91a5
refactor: convert tr_peerMsgsImpl helper functions to class methods ()
* refactor: update bep links

* chore: use more appropriate data types

* chore: checkpoint

* refactor: split `can_request()` into each of their own different signature

* chore: checkpoint

* refactor: convert tr_peerMsgsImpl functions to methods

* chore: checkpoint

* refactor: store peer info as reference

* refactor: convert all member variables to private

* chore: re-arrange methods

* refactor: optimise tmp vector default size in `send_ut_pex()`

* chore: housekeeping

* chore: housekeeping

* refactor: avoid `dynamic_cast` when sending cancel

* fix: restore `blocks_sent_to_peer` stat

regression e91af26923

* fix: choke first then reject

* refactor: convert `tr_peerMsgsNew()` to static factory function

* refactor: store `tr_torrent` reference instead of pointer

* Revert "refactor: store peer info as reference"

This reverts commit bb419bf2

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-03-15 19:52:09 -05:00
Charles Kerr
eeea3c540f
fix: clang-tidy-19 warnings ()
* fix: readability-redundant-casting warnings in libtransmission

* fix: readability-avoid-return-with-void-value warnings in libtransmission

* fix: readability-redundant-member-init warnings in libtransmission

* fix: readability-redundant-inline-specifier warnings in libtransmission

* fix: performance-avoid-endl warnings in libtransmission

* fix: bugprone-multi-level-implicit-pointer-conversion warnings in libtransmission

* fix: bugprone-switch-missing-default-case warnings in libtransmission

* fix: readability-redundant-string-cstr warnings in libtransmission

* fixup! fix: bugprone-multi-level-implicit-pointer-conversion warnings in libtransmission
2024-02-13 10:42:19 -06:00
Charles Kerr
239478925f
fix: performance-enum-size warnings () 2024-01-08 08:32:58 -06:00
Charles Kerr
56837517b0
refactor: tr_block_info cleanup ()
* refactor: make tr_block_info::init_sizes() private

* refactor: remove unuse tr_file_piece_map::empty()

* refactor: remove tr_file_priorities::reset()

* refactor: remove tr_files_wanted::reset()

* refactor: rename method to tr_file_piece_map::piece_span_for_file()

more consistent naming with tr_block_info

* refactor: rename method to tr_file_piece_map::file_span_for_piece()

more consistent naming with tr_block_info

* refactor: use standard class field order in tr_block_info

* refactor: move CompareToSpan from header to cc file

* refactor: make tr_file_piece_map::reset() private

* refactor: rename method to tr_file_piece_map::file_count()

* refactor: rename method to tr_file_piece_map::byte_span_for_file()

* refactor: constify tr_block_info function args

* refactor: fix more signed vs unsigned
2023-12-05 22:06:27 -06:00
Yat Ho
ed4fad9b18
feat: support creating 0 byte files () 2023-11-28 10:51:13 -06:00
Charles Kerr
64d9d57363
chore: fix minor clang-tidy warnings () 2023-11-21 09:02:03 -06:00
Charles Kerr
a952a0731f
refactor: remove the tr_error** idiom ()
* 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
Julien
8ac323d5d6
chore: removed copyright timespans in headers () 2023-11-01 16:11:11 -05:00
Charles Kerr
fc4b7ed9f4
refactor: prefer functions return std::string instead of tr_strbuf () 2023-08-29 21:58:31 -05:00
Charles Kerr
c364abcb6f
chore: misc-include-cleaner (partial) () 2023-07-06 10:00:07 -05:00
Charles Kerr
8183d7fddf
refactor: utils naming ()
* 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 ()
* 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
Charles Kerr
9d2507c7e3
refactor: snake_case in libtransmission class methods () 2023-04-22 20:25:55 -05:00
Charles Kerr
7d86d67bc7
chore: prefer fmt/core.h over fmt/format.h () 2023-04-16 15:34:19 -05:00
Charles Kerr
d72cb67cfb
chore: include directory name in libtransmission #includes () 2023-04-14 14:33:23 -05:00
Charles Kerr
0e2b8d721c
fix: only torrent metainfo display-name as a fallback ()
Fixes .
2023-04-12 17:26:43 -05:00
Charles Kerr
c76cb4db51
fix: silence torrent-metainfo warnings for cross_seed_entry, uid () 2023-04-10 11:07:43 -05:00
Cœur
c60bb5b834
fix: crash when magnet dn isn't utf-8 () 2023-03-19 10:36:16 -05:00
Colin B
59a157ebde
feat: restore support for nonstandard path.utf-8 () 2023-03-13 13:58:59 -05:00
Charles Kerr
d3273504bd
fix: 5053 old torrent files keep appearing () 2023-03-01 20:12:19 -06:00
Charles Kerr
47fd150bab
fix: some torrents think they are magnets () 2023-02-25 07:11:19 -06:00
Cœur
649fd4d0d2
fix: do not lose magnet links when upgrading from tr3 to 4 () 2023-02-12 18:10:54 -06:00
Julien
4b8cfa2e57
chore: update copyrights to 2023 () 2023-02-11 14:49:42 -06:00
Charles Kerr
c75f9a4a7a
refactor: tidy libtransmission symbol visibility () 2023-01-27 14:25:08 -06:00
Charles Kerr
8b1290c895
build: remove explicit iconv dependency in libtransmission () 2023-01-08 22:21:31 -06:00
Charles Kerr
dd12fd010a
chore: iwyu headers () 2022-09-21 18:34:18 -05:00
Charles Kerr
29f57bc296
chore: iwyu headers () 2022-08-17 11:08:36 -05:00
Charles Kerr
6b25a57899
refactor: don't use tr_free in tr_strvUtf8Clean() () 2022-08-16 21:47:07 -05:00
Charles Kerr
e49747ab51
feat: add tr_strvToBuf() ()
* feat: add tr_getDefaultConfigDirToBuf()

* feat: add tr_getDefaultDownloadDirToBuf()

* feat: add tr_strvToBuf()

* feat: add tr_torrentFindFileToBuf()

* feat: add tr_torrentGetMagnetLinkToBuf()

* refactor: remove unused makeString() from tests

* feat: add tr_torrentFilenameToBuf()

* feat: add tr_torrentGetTrackerListToBuf()

* chore: remove obsolete comment references to tr_free

* chore: remove unused tr_strdup()

* chore: remove unused forward declarations
2022-08-16 19:28:57 -05:00
Guido Vranken
b1cc968969
Fix out-of-bounds read in torrent parsing ()
Fixes 
2022-08-09 17:04:56 -05:00
Charles Kerr
18e2a04f88
refactor: make sha1, sha256 RAII safe () 2022-07-31 15:58:14 -05:00
Charles Kerr
1a0afbe95e
refactor: iwyu () 2022-07-25 21:45:54 -05:00
Colin B
c3db52e310
Fix , support single file hybrid torrents. () 2022-07-14 13:53:00 -05:00
Colin B
5e43731bcf
Ensure hybrid torrents are parsed correctly. () 2022-07-02 12:16:34 -05:00
Colin B
3237323b8e
Add basic support for v2 hashes in transmission-show ()
* Add basic support for v2 hashes in transmission-show

* Add sha256 for more libraries

* Fix issue with sha256 digest length
* Add sha256 for polarssl
    Note: Bumping miniumum PolarSSL version to 1.3 because of
    sha2->sha256 name change.
* Add sha256 for CommonCrypto/ccrypto
* Add sha256 for cyassl
2022-07-01 09:49:33 -05:00
Charles Kerr
9170c0f5fc
fix/unexpected-filehash-warning () 2022-06-01 16:14:09 -05:00
Charles Kerr
256b436023
fix: clang 15 warnings ()
* 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
26b1a9154e
fix: silence unexpected key warnings in torrent file parser () 2022-05-24 15:28:02 -05:00
Charles Kerr
fe288b45e5
perf: do not use tr_variant when parsing .torrent files 2022-05-23 23:05:16 -05:00
Charles Kerr
19db28c04d
perf: faster detection of invalid filenames ()
* refactor: move file_info into tr_torrent_files

* chore: rename files-test as torrent-files-test.cc

* test: add tests for tr_torrent_files::isSubpathPortable()
2022-05-23 17:53:26 -05:00
Charles Kerr
c0bb2d40f1
refactor: add pathbuf and std::string-friendly helpers to tr_sys file and path funcs ()
* refactor: add sv-friendly tr_sys_dir_create() variant

* refactor: add sv-friendly tr_sys_path_get_info() variant

* refactor: add sv-friendly tr_sys_path_exists() variant

* refactor: add sv-friendly tr_sys_path_remove() variant

* refactor: add sv-friendly tr_sys_path_rename() variant

* fixup! refactor: add sv-friendly tr_sys_path_rename() variant
2022-05-21 20:17:00 -05:00
Antoine Cœur
bdac708762
docs: fix various typos and misspellings () 2022-04-21 09:28:38 -05:00
Charles Kerr
2866638e1b
refactor: add tr_torrent_files::move() and remove() () 2022-04-15 18:39:04 -05:00
Antoine Cœur
4590d172de
meta info piece_size should be maximum UINT32_MAX () 2022-04-15 00:38:59 -05:00
Charles Kerr
9f9f60f1e3
refactor: tr_block_info () 2022-04-13 20:22:59 -05:00