1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00
Commit graph

389 commits

Author SHA1 Message Date
tearfur
802619e174
fix: fixes and improvements to global IP query (#5510) 2023-06-11 18:27:01 -05:00
Daniel Kamil Kozar
c1c27f3da0
Expose files' begin and end pieces via RPC (#5578)
* Expose files' begin and end pieces via RPC

This adds two arguments, `beginPiece` and `endPiece`, for each of the entries
in the `files` array of the RPC's `torrent-`get` method.

The point is to allow RPC clients to display a file's completion progress as
piece-based in addition to byte-based.
2023-06-05 13:15:32 -05:00
Charles Kerr
52b03c2489
refactor: migrate methods to buffer reader (#5533) 2023-05-18 16:56:29 -05:00
Charles Kerr
4fd5f3a490
refactor: use reserve_space() in peer-io (#5532) 2023-05-17 13:57:27 -05:00
Charles Kerr
b9698210ef
refactor: restore part of Buffer::reserve_space() (#5529) 2023-05-16 21:46:41 -05:00
Charles Kerr
2cf9678737
fix: revert buffer reserve space (#5528)
* Revert "refactor: use BufferReader, BufferWriter as function args (#5518)"

This reverts commit c2d48a7d11.

* Revert "fixup! refactor: add BufferReader, BufferWriter::reserve_space() (#5513)"

This reverts commit b08e17beef.

* Revert "refactor: add BufferReader, BufferWriter::reserve_space() (#5513)"

This reverts commit 51fd7056ba.
2023-05-14 17:24:42 -05:00
Charles Kerr
8a1a6dba49
perf: avoid extra heap alloc in block cache (#5522) 2023-05-13 14:16:00 -05:00
Charles Kerr
51fd7056ba
refactor: add BufferReader, BufferWriter::reserve_space() (#5513) 2023-05-12 11:15:15 -05:00
Charles Kerr
c61d8b7cf7
refactor: rename tr_tracker_view.host to .host_and_port for clarity (#5508) 2023-05-08 20:28:10 -05:00
Charles Kerr
ea500ecdcd
fixup! feat: add global IP cache, fix UDP connection failure warnings (#5506) 2023-05-08 17:53:25 -05:00
Charles Kerr
0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
tearfur
474a30ab2d
feat: add global IP cache, fix UDP connection failure warnings 2023-05-05 12:17:40 -05:00
Gary Elshaw
2999e71e76
fix: typos in libtransmission tests (#5468) 2023-04-28 18:42:45 -05:00
Mike Gelfand
e8fcb025a0
fix: use user-preferred locale (#5444)
* Use user-preferred locale

Previous fix adding `L` format specifier was correct but only fixed half
of the problem, as C++ locale is set up to be "C" by default. GTK client
used to call `setlocale(LC_ALL, "")` to set up user-preferred locale
which only affected C functions and `std::locale` (used by libfmt) was
unaware of those changes.

Apply the fix to all the binaries since they're all doing some sort of
output to the user and calling libtransmission helpers, as well as using
libfmt directly.

* Improve libtransmission's json-test

Set the locale C++ way to avoid any sort of inconsistencies, and also
restore it to the old one once finished testing.

* Improve transmission-show test runner script

Quote outputs to avoid CMake error about `message()` being called with
no arguments. Capture stderr to the same output file. Fallback to `git
diff` if `diff` wasn't found. A few other minor changes.
2023-04-27 09:10:33 -05:00
Charles Kerr
9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr
9f8a7a656e
fix: Buffer::Buffer(Buffer&&) bug (#5435) 2023-04-22 16:10:09 -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
9158ae7126
feat: add tr_bitfield::intersects() (#5155) 2023-04-14 18:45:46 -05:00
Charles Kerr
ed4919a4f4
feat: Add BufferWriter class (#5154) 2023-04-14 17:08:01 -05:00
Pierre Dubouilh
ebfba686b0
feat: sequential download (#4795) 2023-04-14 11:47:54 -05:00
Charles Kerr
d63165e8a4
perf: fix wishlist cpu load regression, pt. 2 (#5273) 2023-03-22 10:24:10 -05:00
Cœur
c60bb5b834
fix: crash when magnet dn isn't utf-8 (#5244) 2023-03-19 10:36:16 -05:00
Charles Kerr
3aeefec203
chore: remove unused header includes (#5227) 2023-03-14 18:36:15 -05:00
Colin B
59a157ebde
feat: restore support for nonstandard path.utf-8 (#3454) 2023-03-13 13:58:59 -05:00
Mike Gelfand
3039ff1390
Don't discover tests when cross-compiling w/o an emulator (#5197) 2023-03-11 12:42:56 +00:00
Charles Kerr
033d698306
fix: parsing of ipv6 tracker announce URLs (#5174) 2023-03-07 12:19:12 -06:00
Charles Kerr
39e3e1d87b
fix: increase priority of first and last piece of each file (#5167)
The first and last pieces of a file generally include information needed
by preview generators, so prioritizing those pieces makes life easier
for users or tools that look at files while they're being downloaded.

This worked in 3.00 but isn't present in 4.0.0.
2023-03-06 15:50:19 -06:00
Daniel Kamil Kozar
848212eea1
fix: escaped representation of non-BMP characters when generating JSON (#5096) 2023-03-02 00:55:16 -06:00
Charles Kerr
d3273504bd
fix: 5053 old torrent files keep appearing (#5117) 2023-03-01 20:12:19 -06:00
Charles Kerr
211e3fc985
fix: always add announce key even when including announce-list (#5106) 2023-03-01 13:10:20 -06:00
fghzxm
db118e7998
fix: do not test utils if not building utils (#4946)
Setting `-DENABLE_UTILS=0 -DENABLE_TESTS=1` causes CMake errors due to
tests/utils/CMakeLists.txt referencing
`$<TARGET_FILE:transmission-show>` which is undefined.  Fixed by
including the tests/utils/ directory only if `ENABLE_UTILS` is true.
2023-02-20 23:43:05 -06:00
Charles Kerr
4461aa68d9
fix: handle block fragments that arrive from peers out-of-order (#4890) 2023-02-14 13:50:28 -06:00
Cœur
649fd4d0d2
fix: do not lose magnet links when upgrading from tr3 to 4 (#4840) 2023-02-12 18:10:54 -06:00
Thomas Weißschuh
4dc836f330
tests: expose libtransmission gtests to ctest (#4731) 2023-02-11 11:27:36 -06:00
Daniel Kamil Kozar
e0753fedb9
fix: put "private" and "source" inside the metadata "info" key (#4809) 2023-02-10 20:33:24 -06:00
Charles Kerr
42a01068c6
chore: disable flaky unit tests (#4808)
This shouldn't be a long-term fix -- each of these tests should be fixed
instead of disabled -- but they are causing so much noise in CI that I'm
disabling them for now and then they can be re-enabled when fixed.

Fixes #4747.
2023-02-10 17:35:22 -06:00
Charles Kerr
0e5f7f86d7
fix: coverity warnings (#4687)
* fix: minor tr_error leak warning in tests

* fix: socket leak in tr_globalIPv6()
2023-01-29 16:49:59 -06:00
Charles Kerr
948f597d15
refactor: buffer snake case (#4682) 2023-01-27 20:12:09 -06:00
Charles Kerr
862abe909c
fix: bugprone-unchecked-optional-access warnings in tests (#4672) 2023-01-26 10:50:42 -06:00
Charles Kerr
977a190646
fix: msvc warnings (#4651)
* fix: C4189 local variable is initialized but not referenced

* fix: C4706 assignment within conditional expression

* fix: C4018 signed/unsigned mismatch

* fix: warning C4996 High-DPI scaling is always enabled.

* fix: C4996: QApplication::fontMetrics() is deprecated

eed5514eaf
2023-01-23 19:24:52 -06:00
Charles Kerr
43bb4bc1c8
refactor: remove unused declarations from tr-macros.h (#4630) 2023-01-21 17:53:58 -06:00
Charles Kerr
33a7d131b4
feat: add setting to choose between lazy-verify or full verify (#4611) 2023-01-18 02:09:29 -06:00
Dmitry Antipov
acbf483bae
refactor: switch to C++11-compatible tr_wait() from tr_wait_msec() (#4576) 2023-01-12 12:03:14 -06:00
Charles Kerr
8b1290c895
build: remove explicit iconv dependency in libtransmission (#4565) 2023-01-08 22:21:31 -06:00
Charles Kerr
68f6f49c6d
test: fix a couple of recurring CI flakes in TimerTest 2023-01-08 15:28:54 -06:00
Mike Gelfand
57e6b06921
Modernize CMake code (ongoing refactoring) (#4515)
* Use imported CMake target for CURL

* Use imported CMake target for fmtlib

* Use imported CMake target for WideInteger

* Use imported CMake target for FastFloat

* Use imported CMake target for UtfCpp

* Use imported CMake target for Threads

* Use imported CMake target for Iconv

* Use imported CMake target for crypto backend

* Use imported CMake target for GTK

* Use imported CMake target for Qt

* Use imported CMake target for deflate

* Use imported CMake target for libevent

* Use imported CMake target for natpmp

* Use imported CMake target for miniupnpc

* Use imported CMake target for dht

* Use imported CMake target for psl

* Use imported CMake target for libutp

* Use imported CMake target for libb64

* Use include directories from libtransmission target
2023-01-02 16:23:51 +00:00
Mike Gelfand
bc380511db
Modernize CMake code (ongoing refactoring) (#4507)
* Reformat CMake code

* Bump minimum CMake version to 3.12

* Add target sources separately via `target_source()`

* Make `tr_win32_app_info()` add target sources on its own

* Don't use `include_directories()`

* Don't use `add_definitions()`

* Limit use of `add_compile_options()`

* Move VDKQueue target declaration to a subdirectory

* Add `tr_disable_source_files_compile()` helper

* Add `tr_target_glib_resources()` helper

* Add `tr_gettext_msgfmt()` helper

* Enable AUTOUIC for Qt client

* Enable AUTORCC for Qt client

* Remove AUTO{MOC,RCC,UIC} source group overrides

* Add `tr_target_idl_files()` helper

* Move source group setup to `tr_qt_add_translation()`

* Add `tr_target_xib_files()` helper

* Prefer `target_sources()` to intermediate variables

* Use explicit visibility versions of `target_*()` commands

* Prefer genexes to conditions in `target_*()` commands

* Add `tr_allow_compile_if()` helper

* Leave only top-level `project()`, remove the rest

* Minor fixups

* Fixup Mac QL plugin install

* Fixup IDE target folders and source groups
2023-01-01 19:49:48 +00:00
Charles Kerr
2b90a5fd55
refactor: possible FTBFS fix on arm7 (#4492)
* refactor: possible FTBFS fix on arm7

* chore: remove tr_rand_int_weak() from crypto-test-ref

* refactor: move tr_rand_int() to header
2022-12-29 10:30:03 -06:00
Charles Kerr
ab9e971903
refactor: tr_globalIPv6() returns a std::optional<tr_address> (#4464) 2022-12-25 07:55:51 -06:00
Charles Kerr
a3f561bcc0
refactor: add tr_address.is_global_unicast_address() (#4462)
Was previously private to net.cc. Expose here so that we can add tests.

Add tests.
2022-12-24 18:53:50 -06:00