From c59da0848e166f58ac29794f3fa8ccf39804dcd2 Mon Sep 17 00:00:00 2001 From: xirvik Date: Sat, 19 Sep 2026 20:01:44 +0000 Subject: [PATCH] Dump the ipv4 filter by reference instead of copying the whole map A static table owns the map; the loop only reads it on the main thread. No test needed. --- src/command_ip.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command_ip.cc b/src/command_ip.cc index 1089589c..589a56e2 100644 --- a/src/command_ip.cc +++ b/src/command_ip.cc @@ -344,8 +344,8 @@ apply_ipv4_filter_dump() { torrent::Object raw_result = torrent::Object::create_list(); torrent::Object::list_type& result = raw_result.as_list(); - torrent::ipv4_table::range_map_type range_map = torrent::PeerList::ipv4_filter()->range_map; - torrent::ipv4_table::range_map_type::iterator iter = range_map.begin(); + const torrent::ipv4_table::range_map_type& range_map = torrent::PeerList::ipv4_filter()->range_map; + torrent::ipv4_table::range_map_type::const_iterator iter = range_map.begin(); while(iter != range_map.end()) { char buffer[64];