Commit Graph

16040 Commits

Author SHA1 Message Date
Pooyan Khanjankhani 821a6816ef
doc: fix typo (#6790) 2024-04-21 18:21:17 -05:00
Dzmitry Neviadomski ef18816b7f
Fix code style script path in CONTRIBUTING.md (#6787)
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-04-21 07:36:13 -05:00
Dzmitry Neviadomski 0e25584e78
Make std::hash specialization for tr_socket_address a struct (#6788)
To be in line with std::hash declaration

See https://en.cppreference.com/w/cpp/utility/hash

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-04-20 21:01:47 -05:00
Dzmitry Neviadomski bd0b74fccb
Use std::declval instead of nullptr cast trick (#6785)
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-04-15 15:18:43 -05:00
Yat Ho 92519281b0
refactor: convert `tr_webseed` to C++ interface (#6708)
* chore: housekeeping

* refactor: convert `on_idle()` to class method

* refactor: convert `task_request_next_chunk()` to class method

* refactor: convert `onPartialDataFetched()` to class method

* refactor: convert `onBufferGotData()` to class method

* refactor: convert `useFetchedBlocks()` to class method

* refactor: hide some `tr_webseed_task` fields and methods

* refactor: convert `tr_webseed_task` methods to snake_case

* refactor: remove `write_block_data`

* refactor: store reference to `tr_torrent` directly

* refactor: convert `ConnectionLimiter` methods to snake_case

* refactor: convert `tr_webseed` methods to snake_case

* refactor: hide `tr_webseed` callback member variables

* refactor: convert `tr_webseed` to C++ interface
2024-04-02 09:31:20 -05:00
Will Thompson de11cbdf85
chore: add Add <launchable> tag to GTK client metainfo (#6720) 2024-04-01 17:29:36 -05:00
Cœur c0c00d0d19
Replace mac app default BindPort with a random port (#5102) 2024-04-01 11:53:04 -05:00
Cœur 5e5ec143b4
bump fast-float to 6.1.1 and miniupnpc to 2.2.7 and libdeflate to 1.2.0 (#6721)
* bump fast-float to 6.1.1

* bump miniupnpc to 2.2.7

* bump libdeflate to 1.2.0
2024-04-01 11:19:49 -05:00
Cœur cdbc8574a7
feat(macos): added last known location (#6610)
* feat(macos): added last known location

* fix data file label and reveal data button positions

* code review: code style

---------

Co-authored-by: BogdanArdelean <bogdan.ardelean@ymail.com>
2024-04-01 09:53:48 -05:00
Nick fb79a2d399
qt: add dynamic RPC keys (#6599)
* add dynamic main stat keys

* make dynamic rpc calls more generic
2024-04-01 09:02:17 -05:00
Yat Ho 87862e506d
feat: support different internal and external port for UPnP (#6672)
* feat: support different internal and external port in upnp

* chore: housekeeping

* code review: better log wording
2024-03-31 18:49:19 -05:00
Cœur 7264e2dc90
feat: support "torrent" in Spotlight indexation (#6578)
* feat: support "torrent" in Spotlight indexation

* removing "btih" from spotlight keywords
2024-03-31 17:05:06 -05:00
Cœur e0fdd4e9c5
doc: no need to adopt an alternative to VDKQueue (#6600) 2024-03-31 16:39:18 -05:00
Cœur ded869974c
ci: support macos-14 universal builds (#6626)
* support macos-14 universal builds

* Apply suggestions from code review

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* add the arch to the job's name

* revert support macos-14 universal builds

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-03-31 16:31:30 -05:00
Cœur 764f2ad85a
ci: re-enable ubuntu tests (#6715)
* re-enabling ubuntu tests

* official GitHub workaround
2024-03-31 15:32:58 -05:00
Yat Ho e619718a1e
fix: save sequential download across sessions (#6746) 2024-03-31 15:01:05 -05:00
Cœur 0ee64695ca
test: disable restartWithDifferentInterval for all platforms (#6745) 2024-03-31 14:07:12 -05:00
Yat Ho e1c9fbde60
fix: restore loose data type parsing in RPC and `settings.json` (#6723)
* refactor: incorporate lenient parsing from `tr_variantGet*()` functions into `tr_variant`

* fix: restore loose data types in RPC and settings.json

* fix: workaround GCC defect

* fix: MSVC build
2024-03-31 14:06:36 -05:00
Cœur 460ce7c302
Add start_paused to settings file and daemon (#6728)
* Add daemon-startPaused to settings file

* code review: naming

* "Predefined quarks must be sorted by their string value"

* code review: replacing paused_ with tr_variantDictAddBool/tr_variantDictFindBool

* code review: doc

* Update docs/Editing-Configuration-Files.md

Co-authored-by: Yat Ho <lagoho7@gmail.com>

---------

Co-authored-by: Eugen Beck <beck@cs.rwth-aachen.de>
Co-authored-by: Yat Ho <lagoho7@gmail.com>
2024-03-30 16:39:44 -05:00
Yat Ho 6384abeb2b
fix: invalid socket address in `tr_peerIo::reconnect()` (#6750)
* fix: don't discard socket if reconnect failed

* fix: don't try to reconnect more than once
2024-03-30 15:26:55 -05:00
Charles Kerr d935d364ed
refactor: remove torrent_view virtual class (#6738)
* refactor: remove torrent_view virtual class

* chore: workaround for google-readability-todo warnings

* chore: fix completion tests
2024-03-30 14:45:00 -05:00
Yat Ho 8944e587f9
fix: assert failure when moving torrents to bottom of the queue (#6751) 2024-03-30 13:49:03 -05:00
Cœur bc7d447949
fix shadowed declaration warnings [-Wshadow] (#6759) 2024-03-30 12:56:48 -05:00
Cœur 465b878e8a
Win32 compatibility for get_peer_stats (#6743) 2024-03-28 09:40:08 +00:00
Yat Ho 2ff3ae07d1
fix: more misc `net.cc` fixes (#6735)
* feat: accept ipv6 string in square brackets for `tr_address::from_string()`

* test: add test case for ipv6 string in square brackets

* fix: include square brackets in host component

According to RFC3986:
  host       = IP-literal / IPv4address / reg-name
  IP-literal = "[" ( IPv6address / IPvFuture  ) "]"

* fix: set ipv6-only socket before binding UDP socket

Will return EINVAL on Linux otherwise

* refactor: simplify code using `evutil` when binding TCP socket

* fix: do not set SO_REUSEADDR for listening sockets on Windows systems

Reason: https://stackoverflow.com/a/14388707/11390656

* fix: do not enclose ipv4 address string in square brackets
2024-03-25 21:10:06 -05:00
Cœur 2917374159
add macos-11 to actions.yml (#6617) 2024-03-25 20:46:11 -05:00
Yat Ho 1568659f95
fix: mismatched `class` forward declaration for `struct tr_peer` (#6725) 2024-03-25 12:00:26 -05:00
Yat Ho c223c70644
fix: potential nullptr deference in rpc (#6734) 2024-03-25 09:55:45 -05:00
Charles Kerr b318bf8d9d
refactor: use fstream in subprocess tests (#6733) 2024-03-25 09:13:09 -05:00
Cœur 4ce8a02916
Disable a long-lived and recurrent flaky test (#6722) 2024-03-25 00:32:29 -05:00
Yat Ho 3e958cfbaf
feat: µTP delayed ack (#6586)
* chore: rename tr utp functions to snake_case

* refactor: make udp sockets non-blocking

* feat: rudimentary uTP delayed ACK

* chore: housekeeping

* chore: correct comment about µTP packet format
2024-03-24 20:48:23 -05:00
Yat Ho 20aef2f79d
fix: misc net.cc and blocklist.cc fixes (#6717)
* fix: `tr_address` should be invalid by default

* fix: allow loopback address for LPD and incoming connections

* fix: `parseCidrline()` should set address type

* code review: keep `memcmp`
2024-03-24 17:09:51 -05:00
Cœur 9ddf609d50
KeepEmptyLinesAtTheStartOfBlocks: false (#6726) 2024-03-24 11:25:00 -05:00
Niccolò Maggioni 86498a71e5
feat: add torrent priority to completion script env vars (#6629) 2024-03-17 19:43:08 -05:00
Yat Ho 2548dd478f
feat: periodically refresh dht node id (#6695) 2024-03-17 18:24:36 -05:00
Cœur 1edd9193a3
bumping libdeflate/small/utfcpp to newer versions (#6709)
* bumping small from 0.2.0 to 0.2.1
bumping libdeflate from 1.18 to 1.19
bumping utfcpp from 3.2.1 to 4.0.5

* rolling back `small` to allow building on NetBSD/amd64.

* keeping submodules on Transmission forks

* bumping `small` to allow building on NetBSD/amd64.
2024-03-17 17:28:47 -05:00
Cœur c63c66c737
fix: Sparkle Version Comparator (#5263)
* fix: Sparkle Version Comparator

* Code review: Reducing CFBundleVersion to three components and avoiding versionComparatorForUpdater

* adding +99 when it's a non-beta release

* code review: set CFBUNDLE_VERSION and unset components

* re-adding support for ignoring beta
2024-03-17 16:23:39 -05:00
Cœur 0749300090
bumping googletest from 1.11.0 to 1.14.0 (#6702)
* bumping googletest from 1.11.0 to 1.14.0

* logging ::testing::TempDir()

* sandboxing ::testing::TempDir()
2024-03-17 15:13:56 -05:00
Yat Ho 0c466b4137
ci: trigger CI when changing CI definitions (#6688)
* fix: build tests for `ubuntu-20-04-from-tarball`

* fix: build tests for `macos-12`

* feat: build apps when `actions.yml` changed

* Revert "fix: build tests for `ubuntu-20-04-from-tarball`"

This reverts commit 2925e9fa72.
2024-03-16 13:17:31 -05:00
Charles Kerr 11b794e656
refactor: allow Settings to register custom serializers / deserializers (#6667) 2024-03-15 23:27:55 -05:00
Yat Ho 152f3e91a5
refactor: convert `tr_peerMsgsImpl` helper functions to class methods (#6580)
* 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
Cœur 8709ec60e6
run peerMgrPeerStats in session thread (#5992)
* run peerMgrPeerStats in session thread

* code-review: add a TODO: for refactoring
2024-03-15 19:04:43 -05:00
Cœur a72a93764e
deps: update miniupnp to 2.3.4 (miniupnpc 2.2.6) (#6459)
* refactor: add miniupnp 2.3.0 as a submodule

* refactor: remove miniupnpc submodule

* deps: specify the 2.3.0 branch

* build: point to miniupnp monorepo subdirectory miniupnpc

* Fix building miniupnp from Xcode

* fixed miniupnp updateminiupnpcstrings.sh usage

* updating to miniupnpc 2.2.6

* fix build for Windows

* code review: removing the header move

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-03-15 18:19:51 -05:00
Cœur e9d16387ae
fix multipleRatioLimits (#6698)
* fix multipleRatioLimits

* fix building on macOS 11
2024-03-15 17:45:31 -05:00
Cœur 6a9727efc7
build: run sanitizer-tests on macOS in CI 2024-03-15 17:18:27 -05:00
Cœur edc59ba5d8
fix compatibility with clang-format 18 (#6690)
* fix clang-format

* compatibility with clang-format 17-18
2024-03-15 00:17:10 -05:00
Dzmitry Neviadomski 8e35e526c6
chore: fix warnings when compiling macOS client with either Xcode or CMake (#6676)
* chore: fix CGFloat comparison warnings in macOS code.

There are 2 cases:
 1. Speed comparisons.
    The lowest significant value displayed in UI is 0.1 bytes per sec.
    See [NSString stringForSpeed] and [NSString stringForSpeedCompact].
 2. Ratio limit comparison.
    The lowest significant value displayed in UI is 0.01 (no unit).
    This is based on maximumFractionDigits=2 set in related XIB file.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* chore: fix warning about shadowed variable

CGFloat const difference was used twice in the same scope

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* chore: fix unused block parameter warnings

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* chore: disable GCC_WARN_64_TO_32_BIT_CONVERSION for libtransmission

This warnings are not reported with CMake build.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* chore: disable CLANG_WARN_STRICT_PROTOTYPES for dht

This is third party target, warning is not enabled with CMake build.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* chore: disable '-Wexit-time-destructors' warning with CMake.

There are two cases when this is reported in libtransmission:
1. `log_state` in anonymous namespace in `log.cc`.
2. static inline `dh_pool_mutex` in `tr_handshake` in `handshake.h`.

I don't see how this may be improved or how this affects correctness,
so don't nag about that.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

---------

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-03-15 00:16:26 -05:00
Gary Elshaw 45d3c678bc
feat: webui use monochrome icons for play/pause buttons (#5868) 2024-03-15 00:15:01 -05:00
Gary Elshaw 5ad6b98c7c
docs: update AUTHORS (#6696) 2024-03-14 22:46:54 -05:00
Mike Gelfand 991b0f0d3d
Support WiX toolset versions other than 3.11 (#6689)
Version 3.14 was recently released with security fixes, and GitHub
runners have been updated to use it. Don't hardcode the version in
Program Files directory name to support any 3.x. Since 3.x support will
be dropped within a year, need to plan migration to 5.x when it's
released (4.x isn't suitable because of missing heat replacement).
2024-03-13 16:40:41 +03:00