From 1001a44a24f4dea4ea619a054dc24c1658b81cfa Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Tue, 23 Apr 2024 22:17:15 +0100 Subject: [PATCH 1/3] Disable trackers propagate --- crates/librqbit/src/session.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index d0788189..8c491c73 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -828,7 +828,11 @@ impl Session { let peer_rx = self.make_peer_rx( info_hash, - magnet.trackers.clone(), + if opts.disable_trackers { + Default::default() + } else { + magnet.trackers.clone() + }, announce_port, opts.force_tracker_interval, )?; @@ -897,7 +901,11 @@ impl Session { } else { self.make_peer_rx( torrent.info_hash, - trackers.clone(), + if opts.disable_trackers { + Default::default() + } else { + trackers.clone() + }, announce_port, opts.force_tracker_interval, )? From 2982d4f3fc85958e2ec08eb738678ca3b6bbd7ba Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Tue, 23 Apr 2024 22:17:24 +0100 Subject: [PATCH 2/3] armv7 musl --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c06ddaa4..c22b97e5 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ release-linux-current-target: cargo build --profile release-github --target=$(TARGET) --features=openssl-vendored @PHONY: release-linux -release-linux: release-linux-x86_64 release-linux-aarch64 release-linux-armv6 release-linux-armv7 +release-linux: release-linux-x86_64 release-linux-aarch64 release-linux-armv6 release-linux-armv7 release-linux-armv7-musl @PHONY: release-linux-x86_64 release-linux-x86_64: @@ -105,6 +105,14 @@ release-linux-armv7: CROSS_COMPILE_PREFIX=armv7-linux-gnueabihf \ $(MAKE) release-linux-current-target +@PHONY: release-linux-armv7-musl +release-linux-armv7-musl: + TARGET=armv7-unknown-linux-musleabihf \ + TARGET_SNAKE_CASE=armv7_unknown_linux_musleabihf \ + TARGET_SNAKE_UPPER_CASE=ARMV7_UNKNOWN_LINUX_MUSLEABIHF \ + CROSS_COMPILE_PREFIX=armv7-linux-musleabihf \ + $(MAKE) release-linux-current-target + @PHONY: release-all release-all: release-windows release-linux release-macos-universal From 136e8fb953d7851c779f5c9cd57f55081ca59121 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Tue, 23 Apr 2024 22:48:29 +0100 Subject: [PATCH 3/3] Bufix: on 32 bit systems bugged narrowing leading to bad checksums --- crates/librqbit/src/file_ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/librqbit/src/file_ops.rs b/crates/librqbit/src/file_ops.rs index 15ab97e2..b0f8dafe 100644 --- a/crates/librqbit/src/file_ops.rs +++ b/crates/librqbit/src/file_ops.rs @@ -385,7 +385,7 @@ impl<'a> FileOps<'a> { } let remaining_len = file_len - absolute_offset; - let to_write = std::cmp::min(buf.len(), remaining_len as usize); + let to_write = std::cmp::min(buf.len() as u64, remaining_len) as usize; let mut file_g = self.files[file_idx].file.lock(); trace!(