mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 07:09:21 +00:00
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.
This commit is contained in:
+2
-2
@@ -344,8 +344,8 @@ apply_ipv4_filter_dump() {
|
|||||||
torrent::Object raw_result = torrent::Object::create_list();
|
torrent::Object raw_result = torrent::Object::create_list();
|
||||||
torrent::Object::list_type& result = raw_result.as_list();
|
torrent::Object::list_type& result = raw_result.as_list();
|
||||||
|
|
||||||
torrent::ipv4_table::range_map_type range_map = torrent::PeerList::ipv4_filter()->range_map;
|
const 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();
|
torrent::ipv4_table::range_map_type::const_iterator iter = range_map.begin();
|
||||||
|
|
||||||
while(iter != range_map.end()) {
|
while(iter != range_map.end()) {
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
|
|||||||
Reference in New Issue
Block a user