transmission/libtransmission
Yat Ho 10d047005a
refactor: convert `tr_incomplete_metadata` to c++ class (#6383)
* 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
2024-01-02 21:04:17 -06:00
..
.clang-tidy refactor: add tr_socket_address typedef (#5730) 2023-07-05 11:33:50 -05:00
CMakeLists.txt build: fix libtransmission build on very old cmake versions (#6418) 2024-01-01 21:58:22 -06:00
announce-list.cc refactor: in tr_announce_list, replace port_and_str with aggregated parsed url (#6323) 2023-12-01 15:48:04 -06:00
announce-list.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
announcer-common.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
announcer-http.cc refactor: RPC `port-test` improvements (#6274) 2023-11-22 23:02:21 -06:00
announcer-udp.cc refactor: in tr_announce_list, replace port_and_str with aggregated parsed url (#6323) 2023-12-01 15:48:04 -06:00
announcer.cc refactor: remove tr_strlcpy() (#6433) 2023-12-24 13:33:33 -06:00
announcer.h refactor: directly check if announcers are idle instead of using a stop counter (#6237) 2023-11-12 21:43:43 -06:00
bandwidth.cc fix: always use location of selected torrents in WebUI set location dialogue (#6337) 2023-12-06 10:10:28 -06:00
bandwidth.h chore: minor bandwidth code housekeeping (#6306) 2023-11-28 10:18:38 -06:00
benc.h refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
bitfield.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
bitfield.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
block-info.cc fix: implicit conversion loses integer precision (#6466) 2023-12-31 14:04:26 -06:00
block-info.h fix: implicit conversion loses integer precision (#6466) 2023-12-31 14:04:26 -06:00
blocklist.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
blocklist.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
cache.cc refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
cache.h refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
clients.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
clients.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
completion.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
completion.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
crypto-utils-ccrypto.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
crypto-utils-fallback.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
crypto-utils-mbedtls.cc fix: fill random buffer in chunks with mbedtls crypto backend (#6379) 2023-12-16 19:21:24 -06:00
crypto-utils-openssl.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
crypto-utils-wolfssl.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
crypto-utils.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
crypto-utils.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
error-types.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
error.cc refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
error.h perf: fewer temporary strings (#6325) 2023-12-01 16:48:16 -06:00
favicon-cache.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
file-capacity.cc refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
file-piece-map.cc refactor: tr_block_info cleanup (#6342) 2023-12-05 22:06:27 -06:00
file-piece-map.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
file-posix.cc refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
file-win32.cc refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
file.cc refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
file.h refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
global-ip-cache.cc fix: remove unnecessary locking in global ip cache (#6370) 2023-12-16 08:03:33 -06:00
global-ip-cache.h fix: remove unnecessary locking in global ip cache (#6370) 2023-12-16 08:03:33 -06:00
handshake.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
handshake.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
history.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
inout.cc fix: create file even if not wanted (#6344) 2023-12-06 09:23:16 -06:00
inout.h refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
interned-string.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
libt.dox
log.cc refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
log.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
lru-cache.h feat: support creating 0 byte files (#6232) 2023-11-28 10:51:13 -06:00
magnet-metainfo.cc refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
magnet-metainfo.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
makelog refactor: misc-use-anonymous-namespace pt. 4 (#4550) 2023-01-07 12:58:16 -06:00
makemeta.cc refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
makemeta.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
mime-types.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
mime-types.js chore: update mime types (#5712) 2023-07-02 08:32:21 -05:00
net.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
net.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
observable.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
open-files.cc refactor: constify the inout module (#6328) 2023-12-02 14:16:36 -06:00
open-files.h refactor: constify the inout module (#6328) 2023-12-02 14:16:36 -06:00
peer-common.h refactor: Values pt. 4 - use Speed in peer_mgr, peer_msgs (#6241) 2023-11-12 14:38:27 -06:00
peer-io.cc fix: implement proper download limit for uTP (#6416) 2024-01-02 00:33:53 -06:00
peer-io.h fix: implement proper download limit for uTP (#6416) 2024-01-02 00:33:53 -06:00
peer-mgr-active-requests.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-mgr-active-requests.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-mgr-wishlist.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-mgr-wishlist.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-mgr.cc refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
peer-mgr.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-mse.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
peer-mse.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-msgs.cc refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
peer-msgs.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
peer-socket.cc fix: implement proper download limit for uTP (#6416) 2024-01-02 00:33:53 -06:00
peer-socket.h refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
platform.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
platform.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
port-forwarding-natpmp.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
port-forwarding-natpmp.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
port-forwarding-upnp.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
port-forwarding-upnp.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
port-forwarding.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
port-forwarding.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
quark.cc refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
quark.h refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
resume.cc fix: gcc-13 warnings pt. 2 (#6404) 2023-12-23 10:32:04 -06:00
resume.h refactor: c++ify libtransmission's tr_ctor struct (#6295) 2023-11-26 15:43:37 -06:00
rpc-server.cc fix: a couple of logging format issues (#6463) 2023-12-30 08:56:34 -06:00
rpc-server.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
rpcimpl.cc fix: support sequentialDownload in list of RPC torrent-get response keys (#6450) 2023-12-29 09:05:37 -06:00
rpcimpl.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
session-alt-speeds.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
session-alt-speeds.h refactor: Values pt. 3 - use Speed in tr_session (#6235) 2023-11-12 12:30:37 -06:00
session-id.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
session-id.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
session-settings.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
session-settings.h refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
session-thread.cc refactor: allow explicitly queuing functions in session thread (#6406) 2023-12-24 08:32:14 -06:00
session-thread.h refactor: allow explicitly queuing functions in session thread (#6406) 2023-12-24 08:32:14 -06:00
session.cc refactor: allow explicitly queuing functions in session thread (#6406) 2023-12-24 08:32:14 -06:00
session.h refactor: allow explicitly queuing functions in session thread (#6406) 2023-12-24 08:32:14 -06:00
stats.cc chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
stats.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
subprocess-posix.cc fix: gcc-13 warnings pt. 2 (#6404) 2023-12-23 10:32:04 -06:00
subprocess-win32.cc refactor: remove tr_str_is_empty() (#6432) 2023-12-24 12:01:49 -06:00
subprocess.h refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
timer-ev.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
timer-ev.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
timer.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
torrent-ctor.cc refactor: c++ify libtransmission's tr_ctor struct (#6295) 2023-11-26 15:43:37 -06:00
torrent-ctor.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
torrent-files.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
torrent-files.h refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
torrent-magnet.cc refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
torrent-magnet.h refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
torrent-metainfo.cc refactor: tr_block_info cleanup (#6342) 2023-12-05 22:06:27 -06:00
torrent-metainfo.h refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
torrent.cc refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
torrent.h refactor: convert `tr_incomplete_metadata` to c++ class (#6383) 2024-01-02 21:04:17 -06:00
torrents.cc feat: support creating 0 byte files (#6232) 2023-11-28 10:51:13 -06:00
torrents.h feat: support creating 0 byte files (#6232) 2023-11-28 10:51:13 -06:00
tr-arc4.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-assert.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-assert.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-assert.mm chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
tr-buffer.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
tr-dht.cc fix: Local variable 'pex' will be copied despite being returned by name (#6300) 2023-11-26 11:27:40 -06:00
tr-dht.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-getopt.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
tr-getopt.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-lpd.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
tr-lpd.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-macros.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
tr-popcount.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-strbuf.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
tr-udp.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
tr-utp.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
tr-utp.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
transmission.h refactor: remove tr_parse_result enum (#6435) 2023-12-24 18:05:18 -06:00
utils-ev.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
utils-ev.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
utils.cc refactor: remove tr_strlcpy() (#6433) 2023-12-24 13:33:33 -06:00
utils.h refactor: remove tr_strlcpy() (#6433) 2023-12-24 13:33:33 -06:00
utils.mm chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
values.h refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
variant-benc.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
variant-converters.cc refactor: constify the inout module (#6328) 2023-12-02 14:16:36 -06:00
variant-json.cc fix: disable RapidJSON SIMD optimisations (#6395) 2023-12-17 09:38:17 -06:00
variant.cc fix: implicit conversion loses integer precision (#6466) 2023-12-31 14:04:26 -06:00
variant.h fix: implicit conversion loses integer precision (#6466) 2023-12-31 14:04:26 -06:00
verify.cc refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
verify.h fix: allow stopping torrent during verify again (#6398) 2023-12-17 11:16:48 -06:00
version.h.in build: support semver versioning (#3867) 2022-10-05 16:53:10 -05:00
watchdir-base.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
watchdir-generic.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
watchdir-inotify.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
watchdir-kqueue.cc chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
watchdir-win32.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
watchdir.cc refactor: remove the tr_error** idiom (#6198) 2023-11-04 11:39:41 -05:00
watchdir.h chore: iwyu (#6201) 2023-11-03 12:03:26 -05:00
web-utils.cc chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
web-utils.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
web.cc refactor: RPC `port-test` improvements (#6274) 2023-11-22 23:02:21 -06:00
web.h refactor: RPC `port-test` improvements (#6274) 2023-11-22 23:02:21 -06:00
webseed.cc refactor: allow explicitly queuing functions in session thread (#6406) 2023-12-24 08:32:14 -06:00
webseed.h chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00