From f764227012e35d140fabe038d84729a10677d979 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 30 Aug 2009 06:25:17 +0000 Subject: [PATCH] build fix for when DHT is disabled --- examples/client_test.cpp | 2 ++ src/session_impl.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index ed2c2023d..cdb5a4a1b 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1381,6 +1381,7 @@ int main(int argc, char* argv[]) , sess_stat.optimistic_unchoke_counter, sess_stat.unchoke_counter); out += str; +#ifndef TORRENT_DISABLE_DHT if (show_dht_status) { snprintf(str, sizeof(str), "DHT nodes: %d DHT cached nodes: %d total DHT size: %"PRId64"\n" @@ -1395,6 +1396,7 @@ int main(int argc, char* argv[]) out += str; } } +#endif if (active_handle.is_valid()) { diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 30e900746..39ce50c04 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1439,6 +1439,7 @@ namespace aux { } } +#ifndef TORRENT_DISABLE_DHT if (m_dht) { int dht_down; @@ -1447,6 +1448,7 @@ namespace aux { m_stat.sent_dht_bytes(dht_up); m_stat.received_dht_bytes(dht_down); } +#endif if (m_settings.rate_limit_ip_overhead) {