diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-xdht_neighbours.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c index a658141c3..91e96d8a8 100644 --- a/src/dht/gnunet-service-xdht_neighbours.c +++ b/src/dht/gnunet-service-xdht_neighbours.c | |||
@@ -963,6 +963,10 @@ static unsigned int total_fingers_found; | |||
963 | static unsigned int successor_times; | 963 | static unsigned int successor_times; |
964 | 964 | ||
965 | /** | 965 | /** |
966 | * Number of rounds for which we should search for finger. | ||
967 | */ | ||
968 | static unsigned int fingers_round_count; | ||
969 | /** | ||
966 | * Called when core is ready to send a message we asked for | 970 | * Called when core is ready to send a message we asked for |
967 | * out to the destination. | 971 | * out to the destination. |
968 | * | 972 | * |
@@ -3507,6 +3511,13 @@ finger_table_add (struct GNUNET_PeerIdentity finger_identity, | |||
3507 | { | 3511 | { |
3508 | // find_finger_trail_task_next_send_time = | 3512 | // find_finger_trail_task_next_send_time = |
3509 | // GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | 3513 | // GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); |
3514 | if (0 == fingers_round_count) | ||
3515 | { | ||
3516 | find_finger_trail_task_next_send_time = | ||
3517 | GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | ||
3518 | } | ||
3519 | else | ||
3520 | fingers_round_count--; | ||
3510 | current_search_finger_index = 0; | 3521 | current_search_finger_index = 0; |
3511 | GNUNET_STATISTICS_update (GDS_stats, | 3522 | GNUNET_STATISTICS_update (GDS_stats, |
3512 | gettext_noop | 3523 | gettext_noop |
@@ -6081,6 +6092,7 @@ GDS_NEIGHBOURS_init (void) | |||
6081 | friend_peermap = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO); | 6092 | friend_peermap = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO); |
6082 | finger_table_init (); | 6093 | finger_table_init (); |
6083 | successor_times = 10; | 6094 | successor_times = 10; |
6095 | fingers_round_count = 5; | ||
6084 | find_finger_trail_task_next_send_time.rel_value_us = | 6096 | find_finger_trail_task_next_send_time.rel_value_us = |
6085 | DHT_FIND_FINGER_TRAIL_INTERVAL.rel_value_us + | 6097 | DHT_FIND_FINGER_TRAIL_INTERVAL.rel_value_us + |
6086 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, | 6098 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, |