Commit Graph

5151 Commits

Author SHA1 Message Date
Charles Kerr 749bb591fb
feat: stop logging repetitive warnings (#2756)
Fixes #295
2022-03-11 16:06:58 -06:00
Charles Kerr d2f8e1d4e0
refactor: set logging levels (#2755) 2022-03-11 15:09:22 -06:00
Charles Kerr af339a15ed
refactor: remove deep logging (#2749)
* refactor: remove "deep logging"
2022-03-09 23:51:14 -06:00
Charles Kerr 1bafbd18ac
chore: add more descriptive assertion in bitfield (#2748)
Related to #2727
2022-03-09 17:43:42 -06:00
Charles Kerr 7a227917ff
fix: rpc-server shutdown assertion failure (#2747)
Fixes #2742.
2022-03-09 11:13:51 -06:00
Charles Kerr 0ac8c6079a
refactor: remove redundant MAX_BLOCK_SIZE constant (#2740) 2022-03-04 23:35:22 -08:00
Charles Kerr cdd819772d
feat: tr_runInEventThread() now takes std::function, typesafe args (#2739) 2022-03-04 20:26:03 -08:00
Charles Kerr 8d8ea2f4df
perf: use condition variables during tr thread startup (#2737)
* perf: use condition variables during tr thread startup
2022-03-04 14:43:56 -08:00
Charles Kerr 0cd3eb26ff
fix: webseed assertion failures (#2735) 2022-03-04 12:00:42 -08:00
LaserEyess 377c335d0f
fix broken ip address string size on windows (#2733)
Make sure the buffer is at least as big as an ipv6 address

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2022-03-03 21:17:28 -08:00
Charles Kerr 60ef1abadf
refactor: tr_torrents (#2722)
* refactor: add tr_torrents container
2022-03-01 15:06:29 -08:00
Charles Kerr d115ee6dfb
refactor: remove utils dep from peer-io (#2719) 2022-02-28 14:26:26 -08:00
LaserEyess 3bc21fe8a6
fixup: unix socket implementation changes (#2707)
* Use std::unique_ptr for bindAddress

* fixup: unix socket implementation changes

Assortment of changes and comments from #2574

- actually assign variables in the tr_rpc_address union for ipv4 and
  ipv6
- use std::size() instead of std::string.length()
- add [[maybe_unused]] to bindUnixSocket() args for Windows
- fix error log for windows to to actually print a string instead of
  an enum int
- use C++ style cast for ecvonnlistener_new_bind()
- refactor rpc URL log line to only substitute a single string
- remove redundant tr_rpc+address_is_valid() check

* change TrUnixSocketPrefix to std::string_view

This allows for removing runtime overhead of strlen() in a few places.

Co-authored-by: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com>
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2022-02-27 14:05:08 -08:00
Charles Kerr 2c7e167436
chore: exploratory change for #2571 (#2717)
This _may_ solve the problem by calling tier.useNextTracker(); but if not, it also adds new assertions to try and fail sooner if the announcer gets into a bad state.
2022-02-26 11:53:34 -06:00
Charles Kerr 1598774b8d
refactor: use std::map for handshake tracking (#2715) 2022-02-26 00:03:32 -06:00
Charles Kerr 70cce3abeb
perf: do not block on upnpDiscover() call during startup (#2714)
* perf: upnpDiscover() is a blocking call that can run for *seconds* on
some routers. Move it to a worker thread where it won't block startup.
2022-02-25 19:26:31 -06:00
Charles Kerr 412ebc63c6
fixup: webseed (#2712)
* fixup! refactor: tr_webseed simplification (#2613)

call connection_limiter.taskStarted in the right place

* perf: put web thread to sleep when inactive
2022-02-25 14:45:00 -06:00
Charles Kerr 4450973d94
feat: stop announcing on not-registered tracker error (#2708)
Fixes #2051.
2022-02-25 00:26:19 -06:00
Charles Kerr e94ddc82fc
refactor: use std::string in tr_net_strerror() (#2706) 2022-02-24 18:53:01 -06:00
SweetPPro 943b57979f
support for resuming magnet links (#2702)
* support for resuming magnet links

magnet links are now saved as a text file the `Torrents` folder as `.magnet` files.
2022-02-24 15:52:29 -06:00
Charles Kerr abfd47a4a8
refactor: remove unused tr_block_info.n_blocks_in_piece (#2704) 2022-02-24 12:14:46 -06:00
Charles Kerr 9c3acc7e8a
fixup: handle unhandled scrape/announce responses (#2701)
followup to the #2531 benc refactor
2022-02-24 07:59:58 -06:00
Charles Kerr c1c1f7ac00
fix: allow 0-byte files when creating torrents (#2698)
Fixes #1453.
2022-02-23 21:16:51 -06:00
Charles Kerr cfb92c47f0
feat: warn when creating torrents with nonportable filenames (#2695)
* feat: check new torrents for nonportable filenames

* fix: parse torrents even if they have nonportable filenames in the info dict's 'file' string
2022-02-23 17:38:07 -06:00
LaserEyess 706735ca88
Support binding the RPC to a Unix socket on *nix platforms (#2574)
* Support binding the RPC to a Unix socket on *nix

This commit adds unix socket support for a RPC. Some refactoring was
required in order to split out the RPC server's address struct from the
normal network address struct used for peers. It would cause
unacceptable overhead to add the unix socket length to the union.

Co-authored-by: Malte Voos <malte@malvo.org>

* add RPC socket mode to control unix socket perms

Unix socket permissions are important to control for security reasons,
and libevent defaults to 0755, which may not be what users want.

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
Co-authored-by: Malte Voos <malte@malvo.org>
2022-02-23 15:09:54 -06:00
Charles Kerr 13ad2b58dc
refactor: always use a blocksize of 16 KB (#2694)
Fixes #99.
2022-02-23 14:25:06 -06:00
Charles Kerr a0c25b21af
fixup! refactor: tr_web (#2633) (#2693)
race condition in TR_ASSERT
2022-02-23 11:00:40 -06:00
Charles Kerr 7238724318
refactor: webseed (#2689)
* refactor: reduce nested conditional webseed logic

* refactor: use tr_block_info::Location in webseed

* request larger chunks at a time from webseeds

* fix: CURLOPT_MAXREDIRS to safeguard against loops

Discussion at https://trac.transmissionbt.com/ticket/6110 .
Reported by @x190 and @cfpp2p a few years back.
2022-02-23 07:38:18 -06:00
Charles Kerr 46c7a7c47c
fix: unsupported peer socket type 0 assertion failure (#2687)
* refactor: downgrade unsupported socket type from assertion to log warning

Fixes #833.
2022-02-22 16:10:49 -06:00
Charles Kerr e6e1e1d220
fix: ensure all bytes read / written to file (#2682) 2022-02-22 11:21:24 -06:00
Charles Kerr 95e30768c4
refactor: rename mediator classes (#2681) 2022-02-22 09:09:24 -06:00
Charles Kerr 5842e8bc74 Merge branch 'main' into fix/bd68d3a-final-info-hash-in-makemeta 2022-02-21 18:02:02 -06:00
Charles Kerr cbe5a204a8 fixup! refactor: use tr_sha1_digest_t everywhere (#2330)
fix: unreleased regression in makemeta hashes
2022-02-21 18:01:36 -06:00
Charles Kerr 81441706c1 fixup! fix: bitfield assertion failure on zero-byte file
chore: code style
2022-02-21 14:39:00 -06:00
Charles Kerr 4bf613804c fix: bitfield assertion failure on zero-byte file
Fixes #2667.
2022-02-21 14:20:35 -06:00
Charles Kerr 105ac7f104
Merge pull request #2673 from transmission/docs/absorb-the-wiki
docs: move the wiki into `transmission/transmission`
2022-02-21 14:17:42 -06:00
Charles Kerr aa657bb0ca Merge branch 'main' into docs/absorb-the-wiki 2022-02-21 11:43:28 -06:00
Charles Kerr d27a6afc29 fixup! refactor: trevent use std:: tools intead of pipes (#2520)
fix event leaked in trevent thread
2022-02-21 11:41:04 -06:00
Charles Kerr 4a20fff2ec fixup! feat: support webseeds in transmission-create (#2611)
fix: small makemeta leak introduced from webseed support
2022-02-21 11:36:55 -06:00
Charles Kerr e7d3e205d2 chore: update links to rpc-spec.md 2022-02-21 10:39:58 -06:00
Charles Kerr 3780f90ef5 perf: skip some excess announce list rebuilds 2022-02-21 08:34:59 -06:00
Charles Kerr 8d5c900ee0 refactor: Qt, GTK, web client UI consistency 2022-02-21 08:34:59 -06:00
Charles Kerr 581c3f9854 refactor: do not mix torrent, default trackers 2022-02-21 08:34:59 -06:00
Stefan Talpalaru 7b377511a9 feat: default public trackers 2022-02-21 08:34:57 -06:00
LaserEyess a660485c4a
fix implicit conversion (#2661)
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2022-02-19 20:03:57 -06:00
Charles Kerr 06065af5eb
refactor: move tr_netClosePeerSocket() impl to net.cc (#2659) 2022-02-19 12:10:43 -06:00
Charles Kerr 78ad90a4c5
refactor: use tr_block_info::Location in inout.cc (#2658) 2022-02-19 10:07:08 -06:00
SweetPPro 023fbd69f6
magnet links always pause after they get metainfo (#2654)
fix for https://github.com/transmission/transmission/issues/2239

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2022-02-19 09:26:59 -06:00
Charles Kerr 87d9f9b00a
refactor: use tr_block_info::Location in cache.cc (#2652) 2022-02-19 07:45:19 -06:00
Charles Kerr 9688e3ca1e
refactor/remove-unused-utp-includes (#2650) 2022-02-18 18:56:53 -06:00