This is related to #4850 since libtransmission/mime-types.js generates
libtransmission/mime-types.h and puts it there.
Also add a note that the file is automatically generated for good measure.
* chore: do not include <set> unless we use it
* chore: do not include <map> unless we use it
* chore: do not include <string> unless we use it
* chore: do not include <list> unless we use it
* chore: do not include <memory> unless we use it
* chore: do not include <optional> unless we use it
* chore: do not include <functional> unless we use it
* chore: housekeeping
* refactor: reduce copying when building payloads
* feat: dual-stack udp tracker support
* refactor: convert function names to snake_case
* fix: `readability-identifier-naming` warning
* fix: account for dual-stack in tests
* code review: add prefix to global names
* fix: don't resolve to IPv4-mapped address
* refactor: use `tr_address` method to check ip protocol
* fix: workaround MSVC x86 build failure
* fix: handle host components that has square brackets
* Partial Revert: "fix: account for dual-stack in tests"
Not needed anymore
* fix: store ipv6 peers in pex6
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* fix: don't save blocks bitfield to resume when we are seed
* chore: housekeeping
* code review: replace `auto` with `tr_resume::fields_t`
* code review: remove the `have` key in resume
* fix: `blocks` error message
* chore: housekeeping
* refactor: store peer info objects in shared_ptr
* refactor: minimise insert/erase operations to the peer info pool
* refactor: unify `on_got_port()` exit point to simplify cleanup
* fix: use `std::unordered_map` as a stand-in for `small::map`
* refactor: use small maps but with `std::vector` as base
* fix: suppress goto warning
* refactor: use `small::map`
* fix: remove constexpr
* feat: allow upnp to recover from errors
* feat: allow natpmp to recover from errors
* chore: housekeeping
* code review: explicitly list all states to start discovering from
* fix: recover from failed UPnP discovery
* refactor: remove `UpnpState::Failed`
std::chrono::duration is just a wrapper, underlying numerical value member will be default initialized to zero as expected.
See https://en.cppreference.com/w/cpp/chrono/duration
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
* fix: queue torrent verification as soon as metadata complete
* fix: avoid heap-use-after-free in `tr_peerMsgsImpl::process_peer_message()`
Details: https://github.com/transmission/transmission/pull/6383#discussion_r1429202253
* code review: move `tr_torrent::do_magnet_idle_work()` to private
* code review: `std::deque::empty()` is not `constexpr`
* fix: test
* chore: housekeeping
* refactor: convert `on_idle()` to class method
* refactor: convert `task_request_next_chunk()` to class method
* refactor: convert `onPartialDataFetched()` to class method
* refactor: convert `onBufferGotData()` to class method
* refactor: convert `useFetchedBlocks()` to class method
* refactor: hide some `tr_webseed_task` fields and methods
* refactor: convert `tr_webseed_task` methods to snake_case
* refactor: remove `write_block_data`
* refactor: store reference to `tr_torrent` directly
* refactor: convert `ConnectionLimiter` methods to snake_case
* refactor: convert `tr_webseed` methods to snake_case
* refactor: hide `tr_webseed` callback member variables
* refactor: convert `tr_webseed` to C++ interface
* feat: accept ipv6 string in square brackets for `tr_address::from_string()`
* test: add test case for ipv6 string in square brackets
* fix: include square brackets in host component
According to RFC3986:
host = IP-literal / IPv4address / reg-name
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
* fix: set ipv6-only socket before binding UDP socket
Will return EINVAL on Linux otherwise
* refactor: simplify code using `evutil` when binding TCP socket
* fix: do not set SO_REUSEADDR for listening sockets on Windows systems
Reason: https://stackoverflow.com/a/14388707/11390656
* fix: do not enclose ipv4 address string in square brackets
* fix: `tr_address` should be invalid by default
* fix: allow loopback address for LPD and incoming connections
* fix: `parseCidrline()` should set address type
* code review: keep `memcmp`
* 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
* refactor: update bep links
* chore: use more appropriate data types
* chore: checkpoint
* refactor: split `can_request()` into each of their own different signature
* chore: checkpoint
* refactor: convert tr_peerMsgsImpl functions to methods
* chore: checkpoint
* refactor: store peer info as reference
* refactor: convert all member variables to private
* chore: re-arrange methods
* refactor: optimise tmp vector default size in `send_ut_pex()`
* chore: housekeeping
* chore: housekeeping
* refactor: avoid `dynamic_cast` when sending cancel
* fix: restore `blocks_sent_to_peer` stat
regression e91af26923
* fix: choke first then reject
* refactor: convert `tr_peerMsgsNew()` to static factory function
* refactor: store `tr_torrent` reference instead of pointer
* Revert "refactor: store peer info as reference"
This reverts commit bb419bf2
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: use fmt::print in log.cc
https://github.com/fmtlib/fmt/issues/428#issuecomment-395442159
> You can use fmt::print("...\n") on Windows as well.
Use this mechanism instead of tr_sys_file_write_line()
* refactor: use FILE* in daemon
* refactor: remove unused tr_sys_file_flush_possible()
* refactor: remove unused tr_sys_file_write_line()
* refactor: remove unused tr_sys_file_get_std()
* refactor: remove unused tr_std_sys_file_t
* perf: make pref_is_savable() constexpr
* refactor: use std::vector in tr_torrents::removedSince()
* chore: remove unused typedef in OptionsDialog
* perf: use std::vector in tr_num_parse_range()
* perf: use small::max_size_set in FileTreeItem::update()
* perf: use small:set in Wishlist::next()
* perf: use small:map in FilterBar
* perf: use small::map for counts in tr_logAddMessage()
* perf: use small::max_size_map in FileTreeModel::twiddleWanted()
perf: use small::max_size_map in FileTreeModel::twiddlePriority()
* perf: use a std::array instead of std::map in TorrentFilter::update()
* perf: use a std::array instead of std::map in TorrentSorter::set_mode()
* perf: use a std::array instead of std::map in TorrentSorter::update()
* perf: use small::set in Application::Impl::on_rpc_changed_idle()
* perf: use std::array for MessageLogColumnsModel::level_names_
* fixup! perf: use std::array for MessageLogColumnsModel::level_names_
* fixup! perf: use small::map for counts in tr_logAddMessage()
* fix: specify `port-test` ip protocol in response when possible
* feat: IPv4 and IPv6 port test in Qt Client
* feat: shorten timeout of `port-test`
* feat: IPv4 and IPv6 port test in Gtk Client
* chore: housekeeping
* refactor: remove IP protocol error message
* code review: mikedld gtk
* feat: return tag in qt rpc response
* code review: mikedld qt
* feat: move port test button up alongside spin button
* fixup! code review: mikedld gtk
* fixup! code review: mikedld qt
* code review: port status initial text
* feat: decouple ipv4 and ipv6 status updates (GTK)
* feat: decouple ipv4 and ipv6 status updates (Qt)
* code review: unknown protocols are non-pending
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* code review: simplify status text when the statuses are the same
* Revert "feat: return tag in qt rpc response"
This reverts commit 2a022c2bb0ee7ddad81f8176839cf0d043422368.
* code review: add translation context for status text (GTK)
* code review: move `port_test_pending_` to `Impl` (GTK)
* fixup! code review: move `port_test_pending_` to `Impl` (GTK)
---------
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* chore: drop redundant if branch
* chore: housekeeping
* refactor: always keep error message as the second
* fix: restore `files-wanted` argument of `torrent-set`
* android patches for ndk
* Update libtransmission/file-capacity.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* TrMacros: Move common & android vars
* Build android in CI
* Use vcpkg packages for curl & openssl
* Update CI for android
* Fix ndkVersion used with gradle
* Restore actions triggers events
* CMakeLists: Remove cond where curl is not found
* Use vcpkg tag instead of commit hash
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* TrMacros.cmake: clean unused variables & add vcpkg cond
* Remove quotes around VcpkgAndroid inclusion
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* actions: split steps to install vcpkg packages
* Build for android arm64
* actions: add make-android condition
* Revert "Use vcpkg tag instead of commit hash"
This reverts commit 65819026b1.
* build.gradle: use cmake version 3.22.1
* actions: use vcpkg 2024.01.12
* actions: Add ninja-build dependency
---------
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* refactor: tr_rpc_request_exec_json takes a std::function callback
* refactor: tr_rpc_request_exec_json callback takes a tr_variant&&
* refactor: use new tr_variant API in rpcimpl.cc
* refactor: tr_rpc_request_exec_json() now takes a const& to the request
* fixup! refactor: use new tr_variant API in rpcimpl.cc
* chore: rename function to tr_rpc_request_exec()
* chore: remove unused DetailsDialog::Impl::build_torrent_ids_variant_list()
* refactor: minor copyediting in rpcimpl.cc getTorrents()
* refactor: split handler methods between sync, async
* refactor: remove unused args_out param from AsyncHandlers
* chore: fix new readability-inconsistent-declaration-parameter-name warning
* refactor: unset peer BEP-9 support if size hint is invalid
* fix: open torrent file in binary mode
* refactor: move metadata size check to method
* refactor: remove duplicate checks
* refactor: reduce temp variable scope in `parseLtepHandshake()`
* refactor: convert `get_piece_length()` to method
* refactor: convert `tr_torrentSetMetadataSizeHint()` to method
* refactor: convert `tr_torrentGetMetadataPiece()` to method
* refactor: convert `tr_torrentUseMetainfoFromFile()` to method
* refactor: convert `tr_torrentSetMetadataPiece()` to method
* refactor: convert `tr_torrentGetNextMetadataRequest()` to method
* refactor: convert `tr_torrentGetMetadataPercent()` to method
* refactor: add basic framework for MagnetMediator
* refactor: initialise `tr_incomplete_metadata` fields in constructor
* refactor: check metadata transfer completion in `set_metadata_piece()`
* refactor: convert `use_new_metainfo()` and `on_have_all_metainfo()` to methods
* refactor: move parts of `tr_torrent::set_metadata_piece()` into `tr_incomplete_metadata`
* refactor: move parts of `tr_torrent::get_next_metadata_request()` into `tr_incomplete_metadata`
* refactor: move parts of `tr_torrent::get_metadata_percent()` into `tr_incomplete_metadata`
* refactor: hide all `tr_incomplete_metadata` fields
* refactor: move `incomplete_metadata` to private
* feat: add test for `set_metadata_piece()`
* refactor: unify integer types
* refactor: rename `tr_incomplete_metadata` to `tr_metadata_download`
* chore: make clang-tidy happy
libtransmission/torrent-magnet.cc:117:68: warning: comparison of integers of different signs: 'long' and 'const uint64_t' (aka 'const unsigned long') [clang-diagnostic-sign-compare]
* refactor: pass log name to `tr_metadata_download` constructor
* chore: iwyu
* fix: thread-safe `TorrentMagnetTest.setMetadataPiece`
* chore: housekeeping
* Revert "fix: thread-safe `TorrentMagnetTest.setMetadataPiece`"
This reverts commit 2a7fcd93a262888f9f55d542b1a9a2da9ca72cea.
* fix: stop soon instead of stop now in `on_metainfo_completed()`
This is unreachable code now, but if it is ever reached, Transmission
will very likely crash.
* fix: maybe fix OpenBSD test failure
* fix: return read buffer size in libutp read buffer size callback
* refactor: clamp amount of data processed in `can_read_wrapper()`
* chore: housekeeping
* refactor: call `utp_read_drained()` in on-read callback
so that uTP acks can be sent out in a more timely fashion
* 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
* refactor: do not u se tr_str_is_empty() in tr_torrentSetLocation()
* refactor: do not use tr_str_is_empty() in remote.cc
* refactor: do not use tr_str_is_empty() in subprocess-win32
* refactor: remove tr_str_is_empty()