1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-21 23:32:35 +00:00
Commit graph

822 commits

Author SHA1 Message Date
Yat Ho
7e4b4f10a1
refactor: faster wishlist (#7027)
* chore: housekeeping

* perf: short circuit peer has block check

* refactor: track active requests in each respective peer

* refactor: swap `ActiveRequests` with new request tracking method

* refactor: use bitfield to store active requests per peer

* perf: check active request numbers first

* refactor: initialise candidate values in constructor

* refactor: better naming

* refactor: use `find_by_block()` more

* refactor: store wishlist mediator in swarm object

* test: make it compile

* test: update endgame test

* test: new test for choke event

* test: remove redundant lines

* test: new test for request event

* test: new test for reject event

* refactor: cache block have state in wishlist

* test: fix `gotBlockResortsPiece`

* fixup! refactor: track active requests in each respective peer

* fixup! test: fix `gotBlockResortsPiece`

* fix: count webseeds when calculating active requests

* build: update xcode project

* fix: add missing `candidates_dirty_` checks

* chore: remove old `depends-on` comments

* fixup! refactor: use bitfield to store active requests per peer

* refactor: extract block peer event to separate function

* perf: reorder conditions by overhead

* perf: check for completed block instead of completed piece

* chore: remove duplicated "unrequested piece" check

* refactor: merge similar block size sanity check

* refactor: use map to store number of requests in wishlist

* refactor: add asserts

* refactor: flush write buffer as soon as there is new data

* refactor: more accurate function naming

* fix: account for corrupt pieces in wishlist

* fix: account for unaligned blocks in wishlist

* Revert "fix: account for unaligned blocks in wishlist"

This reverts commit c3fce93cbae49c11d62e26caccedf55c1987aa95.

* fixup! refactor: use map to store number of requests in wishlist

* fix: account for unaligned blocks in wishlist v2

* chore: add `[[nodiscard]]`

* fixup! fix: account for unaligned blocks in wishlist v2

* fix: crash when handshake finishes in the middle of function
2024-11-11 19:30:00 -06:00
Cœur
d9d87eddd8
Bumping MACOSX_DEPLOYMENT_TARGET to 11.0 (#6911)
* Bumping MACOSX_DEPLOYMENT_TARGET to 11.0

* removing obsolete code and resources

* Add a build action for Transmission.xcodeproj

* removing obsolete code
2024-08-22 15:07:17 -05:00
Yat Ho
a76a07ae99
chore: misc code cleanups (#6927)
* refactor: avoid repeated subscripting in `announcer-udp.cc`

* chore: remove redundant locking in global ip cache

* chore: misc code cleanup in global ip cache

* fixup! chore: misc code cleanup in global ip cache

* refactor: remove `tr_global_ip_cache::create()`

* refactor: rename `tr_global_ip_cache` to `tr_ip_cache`

* build: sync changes to xcode
2024-07-14 01:37:55 +01:00
Cœur
febfe49ca3
bump miniupnpc to 2.2.8 (#6907)
* bump miniupnpc to 2.2.8

* Avoid build error "ln: include/miniupnpc/.: Operation not permitted"
2024-06-15 00:24:06 +01:00
Yat Ho
78027a8e5b
refactor: cleanup build for miniupnp (#6665)
* fix: remove redundant/outdated miniupnp cmake definitions

* refactor: simplify miniupnpc includes

* fix path to miniupnp

* fix: Xcode project

* fixup! fix: Xcode project

* code review: Xcode changes from mikedld

* refactor: drop miniupnpc support below `1.7`
2024-06-01 20:10:52 +01:00
Cœur
bf0119dd3f
Recommended Project Settings (#6591)
* Recommended Project Settings

* adding script inputs and outputs

* fix path to evconfig-private.h

* disabling sandboxing for retrieving the git commit hash

* Also Enable Parallelization in Command Line Builds Using '-target'.

* remove superfluous "per-target" settings

* fix settings.h explicit file type.

* fix path to miniupnp

* ensuring objectVersion = 51 in code_style.
2024-05-25 17:42:15 -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
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
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
Charles Kerr
50dca24f50
refactor: aggregate crypto handles when computing digests (#6662)
* refactor: aggregate per-crypto-pkg fields instead of using inheritance
2024-03-04 16:59:51 -06:00
Charles Kerr
c14d445cf5
refactor: libtransmission Settings (#6592)
* refactor: make tr_session_settings a libtransmission::Settings

* refactor: make VariantConverter private in settings.cc
2024-02-15 11:31:09 -06:00
Cœur
ee1e762394
chore: crash report messages are now unsupported (#6583) 2024-02-10 21:15:31 -06:00
Charles Kerr
340d0d4966
refactor: add libtransmission::Settings (#6575)
* refactor: add libtransmission::Settings

* refactor: move RPC server's settings into tr_rpc_server::Settings

* build: update project.pbxproj

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-02-07 10:14:47 -06:00
Cœur
ae96a2d4b1
fix missing quotes for language codes with a dash (#6489) 2024-01-06 14:13:55 -06:00
Mike Gelfand
f544399183
Sync translations (#6453)
* Sync translations with code

* Move Qt client's it_IT to it

"it_IT" was merged into pre-existing "it", so no (huge) loss of translations
should occur; "it" was chosen as a base since it contains more up-to-date
translations while "it_IT" hasn't changed much in years (I think, because most
phrases were marked as reviewed and so impossible to change by most translators
based on their assigned role).

* Sync translations with Transifex

* Add new languages (90+% complete)

Mac client:
* Basque (eu)
* Hebrew (he)
* Hungarian (hu)
* Japanese (ja)
* Polish (pl)
* Portuguese (Brazil) (pt_BR)
* Swedish (sv)
* Ukrainian (uk)
* Chinese (China) (zh_CN)
* Chinese (Taiwan) (zh_TW)

Qt client:
* Icelandic (is)

Also, fix Qt client languages list to include those already in
translations/ subdirectory and 90+% complete:
* Hebrew (he)
* Chinese (Taiwan) (zh_TW)

* Fix Xcode language mapping for pt_PT/pt-PT

* Fix Xcode language mapping for pt_BR/pt-BR

* Fix Xcode language mapping for zh_CN/zh-CN

* Fix Xcode language mapping for zh_TW/zh-TW

* Sync translations with Transifex (again)

Primarily to fixup "Port: $@" translation, but there were other updates in the
meantime.

* Update list of QuickLookPlugin languages

* Fixup local pt-BR language name in tx config
2023-12-29 15:16:07 +00:00
Charles Kerr
5e51fda92e
refactor: remove tr_strlcpy() (#6433)
* refactor: do not use tr_strlcpy() in tr_strratio()

* refactor: do not use tr_strlcpy() in bindUnixSocket()

* refactor: do not use tr_strlcpy() in trackerView()

* chore: remove tr_strlcpy() unit tests

* chore: remove tr_strlcpy()

* chore: remove -DHAVE_STRLCPY from Xcode build

* fixup! refactor: do not use tr_strlcpy() in trackerView()

chore: fix copypaste bug
2023-12-24 13:33:33 -06:00
Cœur
7fa5ab04aa
fix warning: ignoring duplicate libraries: '-lc++' (#6298) 2023-11-26 14:54:10 -06:00
Cœur
0f3d146853
build: bump pbxproj to C11/C++17 for all targets (#6242) 2023-11-12 10:56:22 -06:00
Cœur
86f3483a01
pbxproj refactor (#6184)
* pbxproj refactor:
- Renamed "Copy Files" build phase more explicitly
- Factored "Cocoa.framework" references and removed unused frameworks

* - Made timer.h "Project" only instead of Public

* - Declared libtransmission headers as C++ headers
2023-11-03 17:38:09 -05:00
Dzmitry Neviadomski
1c18737e67
refactor: move macOS default app logic to dedicated class (#6120) 2023-10-30 20:44:32 -04:00
Cœur
b72d211d41
Fix building on macOS Mojave (#6180) 2023-10-29 23:32:58 -04:00
Yat Ho
2130eb941a
refactor: drop jsonsl in favour of RapidJSON (#6138) 2023-10-21 14:00:12 -05:00
Charles Kerr
a4d205612a
refactor: add tr_variant_serde (#5903) 2023-08-17 11:02:45 -05:00
Cœur
212bf69bb3
build: Xcode cleanup of leftover reference (#5844) 2023-07-30 20:12:14 -05:00
Charles Kerr
22bb9e5757
refactor: rename tr_dirSpace() to tr_sys_path_capacity() (#5689) 2023-06-29 10:23:00 -05:00
SweetPPro
635268854b
refactor: view-based TorrentTableView in macOS client (#5147)
Converted TorrentTableView from older style cell based table to more modern view based
* floating group rows are now used for an improved groups experience
* individual group indicators are hidden when _Use Groups_ is selected to minimize visual clutter (see #3328 )
* removed negated `usesAlternatingRowBackgroundColors` flag for minimal view in Controller.mm (personal preference - easy to restore)
2023-06-27 14:40:44 -05:00
Charles Kerr
432fc9bafc
refactor: add libsmall dependency (#5649)
* refactor: add small dependency

* refactor: use small in variant.cc

* refactor: use small in cache.h
2023-06-20 22:50:36 -05:00
Cœur
87472672a6
build: fix xcode build (#5521) 2023-05-19 23:17:24 -05:00
tearfur
474a30ab2d
feat: add global IP cache, fix UDP connection failure warnings 2023-05-05 12:17:40 -05:00
Cœur
6156d90917
build: use RECOMMENDED_MACOSX_DEPLOYMENT_TARGET (#5282) 2023-04-14 15:02:52 -05:00
Charles Kerr
d72cb67cfb
chore: include directory name in libtransmission #includes (#5308) 2023-04-14 14:33:23 -05:00
Cœur
91717fe91d
fix: potential NSString leak in tr_strv_convert_utf8() 2023-04-11 17:36:22 -05:00
Cœur
c60bb5b834
fix: crash when magnet dn isn't utf-8 (#5244) 2023-03-19 10:36:16 -05:00
Cœur
61fa6f6088
Fix WebUtilsTest.urlParse and psl_builtin for Xcode (#4642) 2023-01-31 23:51:04 -06:00
Charles Kerr
8b1290c895
build: remove explicit iconv dependency in libtransmission (#4565) 2023-01-08 22:21:31 -06:00
Charles Kerr
1e521b9030
fix: -Wredundant-decls warning when building with g++ (#4526) 2023-01-03 15:26:04 -06:00
Cœur
8a5260f24c
Fixed DragOverlayWindow file icon and name (#4428)
* Fixed DragOverlayWindow file icon and name

* Fixed dragging for BitComet torrents
2022-12-22 20:07:45 -06:00
Cœur
65719b5206
Removing WebSeedTableView.mm and InfoViewController.h from libtransmission (#4444) 2022-12-22 12:24:42 -06:00
Cœur
db802afc4f
Addressed various warnings (#4414) 2022-12-21 14:21:16 -06:00
Cœur
cc9bc748b0
Removed ToolbarSegmentedCell (#4418) 2022-12-21 11:13:12 -06:00
Mike Gelfand
128cf34123
Move jsonsl and wildmat to third-party (#4402)
* Move jsonsl to third-party

This treats it as proper 3rd-party code to which our warning and style
settings don't extend.

* Move wildmat to third-party

This treats it as proper 3rd-party code to which our warning and style
settings don't extend.

* Fixup Xcode project to match new project structure
2022-12-18 19:19:07 +00:00
SweetPPro
9f2a981c8c
fix: empty tableview rows on macOS (#4333) 2022-12-09 13:06:00 -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
A Cœur
ead71e8fd3
Fix building on macOS Mojave (#4231) 2022-11-24 01:14:20 -06:00
A Cœur
b612020576
Support UserNotifications framework (#3040) 2022-11-23 13:47:56 -06:00
A Cœur
a152d0f6d8
Appropriate and improve VDKQueue (#4202) 2022-11-18 13:53:36 -06:00
A Cœur
6fcdb526c7
Fix crash on torrent filenames in non-UTF-8 encoding (#4144) 2022-11-18 10:03:25 -06:00
A Cœur
9035f2297a
Fix incorrect build hash when building with Xcode (#4195) 2022-11-17 09:17:16 -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