From 1069b85ec490e19f32b20124a52297a921f16ed6 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sun, 31 Aug 2014 19:12:47 -0400 Subject: [PATCH] Tweaked some values in DHT to decrease the discovery time mainly for the auto tests. --- toxcore/ping.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toxcore/ping.c b/toxcore/ping.c index e00036af..4f715ea2 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c @@ -39,10 +39,10 @@ #define PING_NUM_MAX 512 /* Maximum newly announced nodes to ping per TIME_TO_PING seconds. */ -#define MAX_TO_PING 8 +#define MAX_TO_PING 16 /* Ping newly announced nodes to ping per TIME_TO_PING seconds*/ -#define TIME_TO_PING 8 +#define TIME_TO_PING 4 struct PING { @@ -301,6 +301,9 @@ void do_to_ping(PING *ping) if (!is_timeout(ping->last_to_ping, TIME_TO_PING)) return; + if (!ip_isset(&ping->to_ping[0].ip_port.ip)) + return; + ping->last_to_ping = unix_time(); uint32_t i;