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
Charles Kerr
1402cb2949
refactor: add TR_CONSTEXPR20 to make future C++20 migration easier ( #4457 )
2022-12-23 15:21:40 -06:00
Cœur
559b759ea0
Fix tr_torrent_view incorrectly returning is_folder false for single files in a single folder ( #4454 )
2022-12-23 13:52:16 -06:00
Cœur
3cee8bae36
Fixed crash on exit while downloading from webseed ( #4451 )
2022-12-23 11:34:08 -06:00
Charles Kerr
14a3d01e45
fix: sonarcloud ( #4453 )
2022-12-23 10:56:27 -06:00
Charles Kerr
a1892f2c7c
fix: 4.0.0-beta.2 regression transmission-show --scrape did not exit cleanly ( #4447 )
2022-12-23 08:03:26 -06:00
Charles Kerr
07a5e560b7
fixup: peer counts ( #4445 )
2022-12-22 17:43:36 -06:00
Charles Kerr
4549cc74a0
refactor: add tr_torrent::do_idle_work() ( #4434 )
2022-12-21 17:21:28 -06:00
Charles Kerr
c74ac4f4ed
perf: cache the peer, atom count instead of always recomputing it ( #4431 )
2022-12-21 12:07:40 -06:00
Charles Kerr
092d411663
refactor: tr_rand_buffer(), tr_rand_int() again ( #4415 )
2022-12-21 09:58:32 -06:00
Charles Kerr
e17da3e19e
refactor: xunused ( #4416 )
...
* chore: remove unused function gtr_combo_box_new_enum()
* chore: remove unused function gtr_priority_combo_new()
* chore: remove unused function tr_logLevelToKey()
* refactor: remove unused tr_sessionGetDeleteSource()
* refactor: remove unused peer_atom::isValid()
2022-12-20 18:48:36 -06:00
Charles Kerr
1e734f36b1
perf: cache the result of thread_current_id() ( #4425 )
2022-12-20 14:59:02 -06:00
Charles Kerr
ebc93788ce
perf: make bandwidth.allocate() bidirectional ( #4424 )
...
Previously `bandwidth.allocate()` was called twice in a row, once for
upload bandwidth and once for download bandwidth.
It has some semi-expensive housekeeping though, so avoid doing that work
twice by having a single call to `bandwidth.allocate()` operate on both
up and down bandwidth.
2022-12-20 13:49:37 -06:00
Charles Kerr
5493ed644e
refactor: use tr_rand_buf() in tr_bandwidth::phaseOne() ( #4404 ) ( #4411 )
2022-12-19 17:31:24 -06:00
Charles Kerr
d290ece0c8
perf: recycle DH MSE keys iff peer was unreachable ( #4412 )
2022-12-19 16:49:26 -06:00
Reed Morrison
edfce44d35
refactor: remove unused UTP Socket code. ( #4409 )
2022-12-19 15:16:46 -06:00
Charles Kerr
5743758edd
Revert "perf: recycle Diffie-Hellman keys iff peer was unreachable ( #4408 )"
...
This reverts commit 35a0211118
.
2022-12-19 15:12:33 -06:00
Charles Kerr
35a0211118
perf: recycle Diffie-Hellman keys iff peer was unreachable ( #4408 )
2022-12-19 14:45:01 -06:00
Charles Kerr
76db72bc4b
perf: lazy-calculate torrent seconds-seeding stat ( #4393 )
2022-12-18 22:59:58 -06:00
Charles Kerr
9e6ffa351c
perf: reduce excess rand() calls in tr_bandwidth::phaseOne() ( #4404 )
2022-12-18 13:24:46 -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
Charles Kerr
28b12f091f
perf: remove libtransmission::Buffer.vecs() ( #4401 )
...
Its two calls to evbuffer_peek() used 3.5% of CPU use (measured with perf
when built with RelWithDebInfo). I added vecs() so that libtransmsision
could send noncontiguous buffers via utp_writev(); but in my testing, all
the buffers being sent are contiguous and so this is unnecessary work.
2022-12-18 12:09:02 -06:00
Charles Kerr
cc4141c619
fixup: 3899255
( #4394 )
2022-12-18 11:18:25 -06:00
Cœur
4ff59b715d
Fixed implicit conversion warning: __LINE__ is a long ( #4397 )
2022-12-18 10:23:44 -06:00
Mike Gelfand
e694c3e3a0
Use C++ (not C) warning flags for GTK client ( #4395 )
...
Use the opportunity to reduce duplication.
2022-12-18 01:02:03 +00:00
Charles Kerr
3899255f1c
fix: tear down utp _after_ peer-mgr ( #4383 )
2022-12-17 14:10:10 -06:00
Charles Kerr
616e79c0a8
refactor: group related tr_peerIo methods together ( #4380 )
...
* refactor: group related functions together in the source
* refactor: make tr_peerIo::decrypt() private
* refactor: make tr_peerIo::is_seed() private
* refactor: remove unused tr_isPeerIo()
2022-12-16 17:21:01 -06:00
Charles Kerr
e6d75a4b77
refactor: tr_peerIo ( #4372 )
2022-12-16 01:23:12 -06:00
Cœur
669faf7474
Dropped tr_rand_int_weak where possible. ( #4271 )
2022-12-14 12:21:56 -06:00
Ștefan Talpalaru
b0eaec47cd
fix: re-enable port forwarding ( #4343 )
2022-12-14 01:31:48 -06:00
Charles Kerr
6f1153cae4
refactor: tr_handshake ( #4362 )
2022-12-13 19:58:39 -06:00
Cœur
4a80f800a6
Fixed crash on exit in tr_utpPacket ( #4348 )
2022-12-13 16:51:54 -06:00
Charles Kerr
2f6315b649
refactor: tr_handshake lifecycle ( #4358 )
2022-12-13 11:59:21 -06:00
Cœur
9e0b42a61d
Fixed logic in tr_wildmat ( #4353 )
2022-12-12 16:35:40 -06:00
Cœur
7814e0736e
Fixed tr_bitfield::operator|= range ( #4351 )
2022-12-12 02:23:59 +00:00
Charles Kerr
5bd4f007ac
fix: remove invalid assertion from bitfield code ( #4346 )
2022-12-10 14:54:22 -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
f176bb299a
fix: broken detection of peer udp port ( #4334 )
2022-12-08 14:44:39 -06:00
Charles Kerr
e06e304cc8
refactor: fix shutdown order of utp ( #4331 )
2022-12-06 14:28:48 -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
Dmitry Antipov
bf6c80ae35
refactor, ci: switch clang-format to LLVM 15 ( #4297 )
...
Bump required clang-format version to 15
2022-12-02 09:57:50 -06:00
A Cœur
a656b3b8c9
fix: tr_rand_int modulo bias and fixed tr_rand_int for values larger than INT_MAX. ( #4235 )
2022-11-30 22:58:14 -06:00
Charles Kerr
a7261526ac
fix: shut down utp sooner during session shutdown ( #4287 )
2022-11-30 16:35:10 -06:00
A Cœur
e038121857
refactor: second log of UTP errors as 'trace' messages ( #4283 )
2022-11-30 14:06:08 -06:00
Charles Kerr
f03fc9270b
Fix/long shutdown crash on shutdown ( #4285 )
2022-11-30 13:00:34 -06:00
Charles Kerr
595d0ac14a
refactor: add tr_announcer.startShutdown() ( #4280 )
2022-11-29 21:05:11 -06:00