Charles Kerr
002b45a95c
fixup! refactor: remove tr_piece struct ( #2059 ) ( #2086 )
...
perf: discard piece priorities when done downloading
2021-11-02 21:55:33 -05:00
Charles Kerr
9dca5f2086
perf: intern the announcer module's URL strings ( #2085 )
...
* perf: intern the announcer module's internal URLs
2021-11-02 18:00:01 -05:00
Charles Kerr
790b0bb2b5
feat: add tr_quark_get_string_view() ( #2083 )
2021-11-01 20:01:27 -05:00
Charles Kerr
e5225ba8a2
refactor: tr_torrentFindFromHashString() takes a std::string_view ( #2082 )
...
* refactor: tr_torrentFindFromHashString() takes a string_view
2021-11-01 19:18:09 -05:00
Charles Kerr
5594b16358
refactor: tr_quark_lookup() takes a std::string_view ( #2081 )
...
* refactor: tr_quark_lookup takes a std::string_view
2021-11-01 18:29:13 -05:00
Charles Kerr
3a4dd6de95
refactor: add TR_PRIsv and TR_PRIsv_ARG ( #2080 )
...
* refactor: add TR_PRIsv, TR_PRIsv_ARG macros
Like PRId64 and similar macros, these new macros are printf() helpers.
They are for passing std::string_views to printf()-like functions.
2021-11-01 17:14:17 -05:00
Charles Kerr
ba59060737
feat: new function tr_variantGetStrView() ( #2079 )
...
* feat: new method tr_variantGetStrView()
* test: add new variant tests
2021-11-01 16:30:18 -05:00
Charles Kerr
feaf12a205
refactor: tr_urlIsValid*() now takes a std::string_view ( #2078 )
...
* refactor: tr_urlIsValid*() now take a string_view arg
2021-11-01 15:36:14 -05:00
Charles Kerr
da51a17c30
refactor: add util tr_strvstrip() to strip string_views ( #2077 )
2021-11-01 13:50:53 -05:00
Charles Kerr
3318430455
fix: crash in capitalizing trackername when no trackername ( #2076 )
2021-11-01 11:31:55 -05:00
Mike Gelfand
eaeed301fa
Rename GTK client files to match the classes they contain ( #2073 )
...
This also brings naming closer to Qt client which simplifies things a
bit.
2021-11-01 03:11:23 +03:00
Mike Gelfand
63ad19fb5a
Move Application class to a separate file ( #2072 )
2021-11-01 00:04:31 +03:00
Charles Kerr
484e9ee64e
refactor: add a tr_urlParse() with no heap allocs ( #2070 )
2021-10-31 13:48:32 -05:00
Charles Kerr
cedec74d26
perf: add tr_buildBuf() ( #2068 )
...
* refactor: add tr_buildBuf() utility
2021-10-31 11:38:10 -05:00
Dzmitry Neviadomski
b8c01a581e
[macos] Replace Deprecated constants. ( #2038 )
...
* Replace Deprecated constants pt.1
- `NSOnState` -> `NSControlStateValueOn`
- `NSOffState` -> `NSControlStateValueOff`
- `MSMixedState` -> `NSControlStateValueMixed`
* Replace Deprecated constants pt.2
- `NS(\w+)AlertStyle` -> `NSAlertStyle$1`
* Replace Deprecated constants pt.3
- `NSFileHandlingPanel(\w+)Button` -> `NSModalResponse$1`
* Replace Deprecated constants pt.4
- `NSMouse(Entered|Exited)Mask` -> `NSEventMaskMouse$1`
- `NS(Left|Right)Mouse(Down|Up|Dragged)Mask` -> `NSEventMask$1Mouse$2`
- `NSMouse(Entered|Exited)` -> `NSEventTypeMouse$1`
- `NS(Left|Right)Mouse(Up|Down)` -> `NSEventType$1Mouse$2`
* Replace Deprecated constants pt.5
- `NSComposite(\w+)` -> `NSCompositingOperation$1`
* Replace Deprecated constants pt.6
- `NSAlternateKeyMask` -> `NSEventModifierFlagOption`
- `NSCommandKeyMask` -> `NSEventModifierFlagCommand`
* Replace Deprecated constants pt.7
- `NS(\w+)TextAlignment` -> `NSTextAlignment$1`
- `NSBackgroundStyleDark` -> `NSBackgroundStyleEmphasized`
* Replace Deprecated constants pt.8
- `NSTexturedRoundedBezelStyle` -> `NSBezelStyleTexturedRounded`
- `NSBorderlessWindowMask` -> `NSWindowStyleMaskBorderless`
- `NS(OK|Cancel)Button` -> `NSModalResponse$1`
2021-10-31 10:18:27 -05:00
depler
8cac7d6f94
Update file-win32.cc ( #2066 )
...
Fix pointer `return false` after refactoring
2021-10-31 02:15:07 -05:00
Mitch Livingston
bbf543a43f
Merge pull request #2060 from nevack/nevack/vdkqueue-objc-warning
...
Fix clang warning in VDKQueue.m
2021-10-30 13:32:03 -04:00
Mitch Livingston
7ed412e011
Merge branch 'master' into nevack/vdkqueue-objc-warning
2021-10-30 13:31:27 -04:00
Charles Kerr
7c07f4acbb
perf: omit extra std::map in tr_torrentPrimaryMimeType() ( #2064 )
2021-10-30 11:49:47 -05:00
Dzmitry Neviadomski
85c4a323bb
Add VSCode configs to .gitignore ( #2061 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-29 23:32:41 -05:00
Charles Kerr
9200d972c3
refactor: use a std::vector for tr_session.removed_torrents ( #2062 )
2021-10-29 18:49:15 -05:00
Charles Kerr
f270d6081c
refactor: cppcoreguidelines-init-variables pt. 15 ( #2055 )
...
* refactor: uninit vars in subprocess-posix
* refactor: uninit vars in handshake
* refactor: uninit vars in file-posix
* refactor: uninit vars in platform-quota
2021-10-29 17:43:25 -05:00
Dzmitry Neviadomski
cdec576fc9
Fix clang warning in VDKQueue.m
...
Fix warning `Method override for the designated
initializer of the superclass '-init' not found`
with `NS_UNAVAILABLE` marker.
2021-10-30 01:05:13 +03:00
Charles Kerr
d6032f829b
refactor: remove tr_piece struct ( #2059 )
...
* refactor: remove tr_piece struct
2021-10-29 13:24:30 -05:00
Frank Aurich
82d9232084
Fix RPC 'table' mode not being properly activated ( #2058 )
...
* Fix RPC 'table' mode not being properly activated.
2021-10-29 01:54:46 -05:00
Mike Gelfand
5da0a5d59b
Fix off-by-one mistake in gtr_str_strip()
( #2057 )
...
Was always trimming last non-whitespace char from the input text.
Fixes : #2027
2021-10-28 23:52:25 +03:00
Charles Kerr
1d0993c3a5
fix: fmr warning in removeAllPeers()
2021-10-27 21:43:12 -05:00
Charles Kerr
9be93a489e
refactor: simplify sorting peers by liveliness ( #2050 )
2021-10-27 21:05:00 -05:00
Charles Kerr
6bd229fcfd
fix: clang 13 nullptr warnings in libtransmission ( #2054 )
...
* fix: nullptr dereference warning in tr_peerMgrPeerStats
* fix: nullptr dereference warning in refillUpkeep()
* fix: nullptr dereference warning in tr_peerIsSeed()
* fix: nullptr dereference warning in rechokeUploads()
* fix: nullptr dereference warning in tr_variantDictAdd
* fix: nullptr dereference warning in tr_ioFindFileLocation()
* fix: nullptr dereference warning in tr_spawn_async_in_child()
* fix: nullptr dereference warning in calculatePiecePriority()
2021-10-27 20:16:24 -05:00
razaq
c3f1aafb96
add TR_TORRENT_TRACKERS env variable to script call ( #2053 )
...
* add TR_TORRENT_TRACKERS env variable to script call
2021-10-27 13:25:09 -05:00
Charles Kerr
ed801eab8f
feat: less prolix announce error logging ( #2052 )
2021-10-27 08:34:16 -05:00
Dan Walters
8234d064a8
fix: apply optional peer socket TOS to UDP sockets ( #1043 )
...
This effectively makes the TOS setting apply to uTP and DHT traffic.
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-26 20:59:31 -05:00
Charles Kerr
2b65b985cf
refactor: cppcoreguidelines-init-variables pt. 14 ( #2049 )
...
* refactor: fix uninit var warnings in ptrarray
* refactor: fix uninit var warnings in bitfield
* refactor: fix uninit var warnings in handshake
* refactor: fix uninit var warnings in tr-dht
* refactor: fix uninit var warnings in natpmp
* refactor: fix uninit var warnings in tr-dht
* refactor: fix uninit var warnings in crypto-utils-openssl
* refactor: fix uninit var warnings in handshake
* refactor: fix uninit var warnings in crypto-utils
* refactor: fix uninit var warnings in crypto
* Revert "refactor: fix uninit var warnings in handshake"
This reverts commit 5aaa9cc30a
.
* refactor: fix uninit var warnings in crypto-utils-ccrypto
* refactor: fix uninit var warnings in crypto-utils-polarssl
* refactor: fix uninit var warnings in crypto-utils-cyassl
* fixup! refactor: fix uninit var warnings in crypto-utils-cyassl
* fixup! refactor: cppcoreguidelines-init-variables pt. 13 (#2043 )
2021-10-26 19:16:56 -05:00
Frank Aurich
d9277d4b93
transmission-remote: Fix size display for torrents > 4GB ( #2029 )
...
* As size_t is not 64-bit on all platforms, explicitly use uin64_t when dealing with byte sizes to support torrents > 4GB
2021-10-26 16:06:47 -05:00
Frank Aurich
c369f23686
Make sure LargeFileSupport flags are set correctly after repeated calls to cmake/ccmake/cmake-gui ( #2039 )
...
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-26 14:14:35 -05:00
Charles Kerr
b797b4c94f
refactor: cppcoreguidelines-init-variables pt. 13 ( #2043 )
...
* refactor: fix uninit var warnings in ptrarray
* refactor: fix uninit var warnings in bitfield
* refactor: fix uninit var warnings in handshake
* refactor: fix uninit var warnings in tr-dht
* refactor: fix uninit var warnings in natpmp
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-10-26 13:02:07 -05:00
Frank Aurich
c42e05b42f
Fix: When removing one or more selected torrents without deleting their data, make sure to only send torrentIds, not full torrent objects, via RPC ( #2040 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-10-25 17:24:20 -05:00
Charles Kerr
a1c5a215bf
refactor: remove peer-mgr replication info ( #2021 )
...
* refactor: remove peer-mgr replication info
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-10-25 10:29:19 -05:00
Mike Gelfand
81147a8fbb
CMake fixes for universal builds on Mac ( #2044 )
...
* Use CMake to build libevent on all platforms
* Pass Mac-specific flags down to 3rd-party projects
2021-10-25 11:14:04 +03:00
Charles Kerr
775e30eefd
refactor: getPeerCandidates returns a std::vector ( #2042 )
...
Previously was a manually-malloced and freed array.
2021-10-25 00:15:04 -05:00
Charles Kerr
93d8a03d55
refactor: remove outvar args from tr_torGetFooBlockRange() functions ( #2041 )
2021-10-24 22:39:19 -05:00
Charles Kerr
4a1ce7d645
fixup! Add a "Start Now" action to the notification window in the Qt client ( #848 ) ( #2026 )
...
refactor: avoid "declaration requires an exit-time destructor" warnings
2021-10-24 18:52:50 -05:00
Dzmitry Neviadomski
3a966a77d1
Remove C-style STD headers in watchdir-kqueue.cc ( #2037 )
...
`string.h` is unused, `cerrno` is needed for `errno` macro.
2021-10-24 17:30:31 -05:00
Dzmitry Neviadomski
9bb3de406b
Fix CMake and Ninja rebuilds on macOS. ( #2036 )
...
The problem could occur with Makefiles also.
Use `-r` option on `rm` as `*.iconset` is a directory.
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-24 16:48:20 -05:00
Charles Kerr
3008a992ca
fix: Bitfield.getRaw() regression ( #2023 )
...
* fix: Bitfield.getRaw() regression
2021-10-24 15:43:36 -05:00
C.W. Betts
62c92227e3
macOS: use SDK's libCurl. ( #1542 )
...
* Use the SDK's provided libcurl instead of relying on an outdated stub library.
* Quiet a linker warning.
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-10-24 22:27:23 +03:00
Mike Gelfand
5edbcb3740
Add CommonCrypto-based crypto utils implementation ( #2032 )
...
* Add CommonCrypto-based crypto utils implementation
Ported and adapted from an old (circa 2014-2015) branch of mine.
DH helpers are based on CCBigNum since CCDH doesn't provide acceptable error
reporting, and SecDH interface is a bit weird and limiting. Given that all
mentioned APIs are private, it doesn't seem to matter which one we're using as
any of them could be changed/removed by Apple at any point.
* Switch Xcode project to CommonCrypto backend
2021-10-24 21:19:57 +03:00
Charles Kerr
3ec312dee8
refactor: cppcoreguidelines-init-variables pt. 12 ( #2022 )
...
* refactor: cppcoreguidelines-init-variables pt. 12 (#2022 )
2021-10-24 12:40:15 -05:00
Charles Kerr
c472cbd88d
refactor: only use [[maybe_unused]] if arg might be used ( #2033 )
...
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
2021-10-24 11:41:54 -05:00
Charles Kerr
16acdf5934
chore: silence minor GTK warnings ( #2034 )
...
* chore: fix clang-diagnostic-suggest-destructor-override in makemeta-ui
* chore: fix Wunused-private-field in tr-prefs
* chore: fix clang-diagnostic-c++98-compat-extra-semi in tr-core.cc
* chore: fix clang-analyzer-deadcode.DeadStores in tr-core.cc
* chore: fix clang-diagnostic-exit-time-destructors for Glib::Quarks in details.cc
2021-10-24 10:55:51 -05:00