From b9a5525ab27e6e3804912d95fd8c2774efcab379 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Sat, 2 Jan 2016 11:43:09 -0500 Subject: [PATCH] Store dht_settings::max_peers in session state --- src/session_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 18656e1f3..a27ca1309 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -690,6 +690,7 @@ namespace aux { dht_sett["max_fail_count"] = m_dht_settings.max_fail_count; dht_sett["max_torrents"] = m_dht_settings.max_torrents; dht_sett["max_dht_items"] = m_dht_settings.max_dht_items; + dht_sett["max_peers"] = m_dht_settings.max_peers; dht_sett["max_torrent_search_reply"] = m_dht_settings.max_torrent_search_reply; dht_sett["restrict_routing_ips"] = m_dht_settings.restrict_routing_ips; dht_sett["restrict_search_ips"] = m_dht_settings.restrict_search_ips; @@ -763,6 +764,8 @@ namespace aux { if (val) m_dht_settings.max_torrents = val.int_value(); val = settings.dict_find_int("max_dht_items"); if (val) m_dht_settings.max_dht_items = val.int_value(); + val = settings.dict_find_int("max_peers"); + if (val) m_dht_settings.max_peers = val.int_value(); val = settings.dict_find_int("max_torrent_search_reply"); if (val) m_dht_settings.max_torrent_search_reply = val.int_value(); val = settings.dict_find_int("restrict_routing_ips");