1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 10:07:40 +00:00
Commit graph

335 commits

Author SHA1 Message Date
Cœur
669faf7474
Dropped tr_rand_int_weak where possible. (#4271) 2022-12-14 12:21:56 -06:00
Charles Kerr
6f1153cae4
refactor: tr_handshake (#4362) 2022-12-13 19:58:39 -06:00
Charles Kerr
2f6315b649
refactor: tr_handshake lifecycle (#4358) 2022-12-13 11:59:21 -06:00
Charles Kerr
0a69685a4e
refactor: tr_address cleanup (#4338)
* refactor: move tr_tracker_http_announce() helper funcs into their own namespace

* refactor: move tr_globalIPv6() helper funcs into their own namespace

* refactor: move tr_address_is_valid_for_peers() helper funcs into their own namespace

* refactor: make tr_address_compare() a private method

* refactor: rename tr_address::isIPv4() to is_ipv4()

* refactor: use snake_case for tr_address methods

* refactor: make tr_address_is_valid_for_peers() a member function
2022-12-08 20:27:52 -06:00
Charles Kerr
0061e4f9a9
refactor: tr_address::display_name() (#4335) 2022-12-08 16:44:19 -06:00
Charles Kerr
22a3a5db25
refactor: peer-socket pt 2 (#4326)
* refactor: tr_netOpenPeerSocket() now takes a tr_address reference

* refactor: disable copy assignment, copy constructor

* refactor: move log statements to peer_socket constructor
2022-12-06 10:28:28 -06:00
Charles Kerr
9a5d9a0ba2
refactor: tr_peer_socket (#4325)
* refactor: make tr_peer_socket.type private

* refactor: reimplement tr_peerIo::address() as a wrapper around tr_peer_socket::address()

* refactor: remove tr_address, tr_port from tr_peerIo

* refactor: replace tr_netClosePeerSocket() with tr_peer_socket::close()
2022-12-05 18:53:31 -06:00
Charles Kerr
468310300c
refactor: only need a single handshake mediator (#4322) 2022-12-05 11:47:11 -06:00
Charles Kerr
728e5b8350
refactor: stop tracking peerIo creation time (#4300) 2022-12-02 10:39:46 -06:00
Charles Kerr
595d0ac14a
refactor: add tr_announcer.startShutdown() (#4280) 2022-11-29 21:05:11 -06:00
Charles Kerr
8085ef6acb
fix: flaky subprocess tests (#4266) 2022-11-28 16:45:18 -06:00
Charles Kerr
ec6cb67c5c
fix GTK client message log window does not restore level selection (#4242)
* fix: save log level, encryption mod, preallocation mode as ints

* fix: ensure log level is saved in tr_sessionGetSettings()

* fix: ensure the right verbosity row is selected
2022-11-26 07:32:51 -06:00
Charles Kerr
8a35aa0903
refactor: add tr_rand_obj() (#4238)
* refactor: add tr_rand_obj()

There are a lot of places in the codebase where we need to populate
an integral type or a fixed-size array with random data. To do this,
we instantiate a local on the stack, fill it with tr_rand_buffer(),
and then use it.

This PR creates a helper function to make this a one-liner.
2022-11-25 15:04:37 -06:00
Charles Kerr
554ba06ae2
fix: coverity warnings, sonarcloud code smells (#4232) 2022-11-24 10:17:02 -06:00
Charles Kerr
19bc15523f
fix: new sonarcloud, coverity, gcc warnings (#4229) 2022-11-23 13:47:04 -06:00
Charles Kerr
a8f2b840f7
perf: improve tr_peerMgrGetDesiredAvailable() (#4226) 2022-11-22 23:26:10 -06:00
Herman Semenov
ffd5e6bf50
refactor: remove unused vars, code simplify and minor optimize (#4172) 2022-11-19 09:46:03 -06:00
Charles Kerr
d27c4c59ce
refactor: incremental announcer refactor pt. 2 (#4214) 2022-11-18 23:00:25 -06:00
Charles Kerr
4cc0b77eec
refactor: incremental announcer improvements (#4211) 2022-11-17 20:23:54 -06:00
Charles Kerr
42f26aad0b
fix: ftbfs on Windows (#4204) 2022-11-16 18:03:48 -06:00
Charles Kerr
a45cc2a79d
refactor: try again to use getaddrinfo in announcer_udp (#4201) 2022-11-16 15:13:31 -06:00
Charles Kerr
d2125ee965
perf: revert e065565cd to restore async dns lookups (#4182) 2022-11-15 11:16:49 -06:00
Charles Kerr
d0639b5f0c
perf: tr_sys_path_basename() returns a std::string_view (#4176) 2022-11-15 08:29:00 -06:00
Charles Kerr
5cb9e8c146
test: increase timer interval in TimerTest.repeatingThenSingleShot (#4173)
These 25ms timers are not repeatable enough on the CI boxes
2022-11-14 18:04:15 -06:00
Charles Kerr
8df26dd2fc
refactor: re-enable some clang tidy warnings in tests (#4170) 2022-11-14 14:16:29 -06:00
Mike Gelfand
43acd7e3e4
Remove Xcode project in favor of CMake (#4147)
* Compile images into an assets catalog

* Optionally sign resulting Mac bundle

* Move 3rd-party/utility/test targets to their own folders

* Enable ARC via compile options unconditionally

* Install base and localized resources into correct directory

This seems like a Xcode quirk: if subdirectory containing the resource file
matches the destination directory name (and probably if there's more than one
resource file being installed there), the resulting folder structure then
contains an extra subdirectory, i.e. Resources/dirname/dirname/resname.

* Group source files for better structure in IDEs (Xcode, VS)

* Remove Xcode project

Using Xcode is still possible via "Xcode" CMake generator.

* Use ad-hoc signature if one is not specified

* Always use ad-hoc signature on link, leave proper signing to CPack

* Install localized resources into correct directory (QL plugin)

* Don't include CTest (we don't use additional targets it provides)

* Revert "Remove Xcode project"

This reverts commit dc069f654f.
2022-11-12 20:01:57 +00:00
Charles Kerr
250e055c1d
fix: warnings from clang tidy sonarcloud coverity (#4143) 2022-11-12 09:53:09 -06:00
Charles Kerr
9e06cf8f2e
refactor: make DHT unblocking (#4122) 2022-11-11 10:09:24 -06:00
Charles Kerr
2d2270c7d9
fix: thread-sanitizer warnings in SandboxedTests (#4131) 2022-11-09 23:56:08 -06:00
Charles Kerr
ab78759233
test: add libtransmission::Timer tests (#4121) 2022-11-08 16:20:21 -06:00
Charles Kerr
36edd516aa
refactor: replace tr_boundinfo with tr_session::BoundSocket (#4103) 2022-11-06 10:35:48 -06:00
Charles Kerr
831eb8d40f
refactor: make tr_session_thread a unique_ptr owned by tr_session (#4069) 2022-11-04 16:20:27 -05:00
Charles Kerr
e065565cd4
reafctor: use getaddrinfo() instead of evdns (#4094) 2022-11-04 13:29:56 -05:00
Charles Kerr
ee8a6bd130
refactor: simplify blocklist code (#4086) 2022-11-03 15:46:27 -05:00
Charles Kerr
611d36ac84
refactor: decouple session settings from the session class (#4053) 2022-11-01 19:32:26 -05:00
A Cœur
14f2698cdc
Remove tr_generateAllowedSet declaration (#4029) 2022-10-25 08:50:53 -05:00
Charles Kerr
b32f3e0a24
refactor: add tr_address::toCompact() (#4014)
* refactor: add tr_address::toCompact()

* test: use the theory.org compact ipv4/6 examples in NetTest.compact4, NetTest.compact6

* refactor: add tr_address::toCompact()

* test: add toCompact, fromCompact tests

* refactor: add compact <--> sockaddr_storage conversion
2022-10-24 13:40:12 -05:00
Mike Gelfand
70f623f32b
Add user data parameter for torrent removal callback (#4009) 2022-10-23 11:51:35 -05:00
Charles Kerr
d191a04228
refactor: decouple tr_announcer_udp (#4002) 2022-10-21 13:15:14 -05:00
Charles Kerr
450f1dcadc
refactor: extract tr_buffer class from tr_peerIo (#3986) 2022-10-19 11:42:08 -05:00
Charles Kerr
7ee76a604d
feat: add libtransmission::Dns.cached() (#3984) 2022-10-17 20:17:01 -05:00
Charles Kerr
c8e652c820
refactor: add dns interface class (#3977) 2022-10-17 14:41:42 -05:00
Charles Kerr
79068c512a
refactor: decouple tr-dht from peerMsgs, peerMgr (#3966)
* refactor: decouple peer-mgr from tr-dht

* refactor: remove tr_dhtPort()

* refactor: decouple peer-msgs from tr-dht

* refactor: make tr_udp_core.udp_port_ const

* refactor: rename tr_udp_core::dhtUninit() as startShutdown()
2022-10-15 08:22:43 -05:00
Charles Kerr
572e1bb50f
refactor: add tr_address::fromSockaddr() (#3964)
* refactor: remove TR_DISCARD_ALIGN

* refactor: add tr_address::fromSockaddr()
2022-10-14 01:20:39 -05:00
A Cœur
4ea9c87fea
fix: some typos (#3904) 2022-10-13 09:35:10 -05:00
Dzmitry Neviadomski
ecc7c185a4
tests: Fix SubprocessTest on macOS Monterey and later. (#3812)
On macOS Monterey and later `/var` is symlinked to `/private/var`

Add missing `tr_sys_path_resolve(...)` for parent dir in sandbox
fixture.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2022-10-08 22:18:39 +03:00
Charles Kerr
89d6533cd7
build: support semver versioning (#3867)
* build: semver versioning

Xref: https://github.com/transmission/transmission/issues/1037

* test: add base62 tests for client-id

* build: include PATCH_VERSION in Transmission.rc.in

* build: semver versioning in version.h

* fixup! build: semver versioning in version.h

undo experimental verison changes that were made for testing purposes

* Fixup version in MSI package filename

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-10-05 16:53:10 -05:00
Charles Kerr
257d98545b
refactor: add tr_port_forwarding::Mediator (#3855)
* refactor: add a Mediator class to decouple tr_session and tr_port_forwarding

* refactor: add tr_port_forwarding::Mediator::privatePeerPort()

* refactor: add tr_port_forwarding::Mediator::onPortForwarded()

* chore: avoid unnecessary include of timer.h in other headers

* refactor: use a uniform timerMaker() API in mediators
2022-10-01 09:12:49 -05:00
Harm133
1cd6c0464c
feat: Add IPv6 blocklist support (#3835) 2022-09-30 12:11:52 -05:00
Charles Kerr
d82090658f
refactor: remove TR_PRIsv macros (#3842)
* refactor: remove TR_PRIsv from transmission-show

* refactor: remove TR_PRIsv from transmission-edit

* refactor: remove TR_PRIsv from transmission-remote

* refactor: remove TR_PRIsv from log.cc

* refactor: remove TR_PRIsv macro

* chore: remove FMT_STRING macro in transmission-edit

* refactor: use __android_log_write()
2022-09-23 14:36:37 -05:00