summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSupriti Singh <supritisingh08@gmail.com>2014-08-27 19:59:10 +0000
committerSupriti Singh <supritisingh08@gmail.com>2014-08-27 19:59:10 +0000
commit8e6368dda38346e24844828bac51c4f227983a51 (patch)
tree1091510e857db230abb9ca2a2ac840b734095ce3 /src
parent5dccc937983b20b66e20a2c5bf228ca525b8979e (diff)
Reset the successor send time in notify confirmation message
Diffstat (limited to 'src')
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index 472007215..a658141c3 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -5065,10 +5065,11 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ,
if(0 == successor_times)
{
+// successor_times = 3;
verify_successor_next_send_time =
GNUNET_TIME_STD_BACKOFF (verify_successor_next_send_time);
}
- if (0 != successor_times)
+ else
successor_times--;
@@ -5441,10 +5442,16 @@ handle_dht_p2p_notify_succ_confirmation (void *cls,
send_notify_new_successor_retry_task = GNUNET_SCHEDULER_NO_TASK;
}
if (send_verify_successor_task == GNUNET_SCHEDULER_NO_TASK)
+ {
+ verify_successor_next_send_time.rel_value_us =
+ DHT_SEND_VERIFY_SUCCESSOR_INTERVAL.rel_value_us +
+ GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
+ DHT_SEND_VERIFY_SUCCESSOR_INTERVAL.rel_value_us);
send_verify_successor_task =
GNUNET_SCHEDULER_add_delayed(verify_successor_next_send_time,
&send_verify_successor_message,
NULL);
+ }
}
else
{