diff options
author | Supriti Singh <supritisingh08@gmail.com> | 2014-08-19 19:14:28 +0000 |
---|---|---|
committer | Supriti Singh <supritisingh08@gmail.com> | 2014-08-19 19:14:28 +0000 |
commit | d12dbffd9053a339bcc8d5ec8eb2c921614668b6 (patch) | |
tree | b2f8046c393b66cc3069bf1a43a478b5f00b3e56 /src | |
parent | 26542dad2ef4741edd18e7a2fb1f0745d8189738 (diff) | |
download | gnunet-d12dbffd9053a339bcc8d5ec8eb2c921614668b6.tar.gz gnunet-d12dbffd9053a339bcc8d5ec8eb2c921614668b6.zip |
Xvine: Fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-xdht_neighbours.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c index 924328a6f..7f136b7d1 100644 --- a/src/dht/gnunet-service-xdht_neighbours.c +++ b/src/dht/gnunet-service-xdht_neighbours.c | |||
@@ -75,7 +75,7 @@ | |||
75 | /** | 75 | /** |
76 | * How long to wait before sending another find finger trail request | 76 | * How long to wait before sending another find finger trail request |
77 | */ | 77 | */ |
78 | #define DHT_FIND_FINGER_TRAIL_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) | 78 | #define DHT_FIND_FINGER_TRAIL_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 50) |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * How long to wait before sending another verify successor message. | 81 | * How long to wait before sending another verify successor message. |
@@ -2524,8 +2524,6 @@ send_find_finger_trail_message (void *cls, | |||
2524 | uint64_t finger_id_value; | 2524 | uint64_t finger_id_value; |
2525 | 2525 | ||
2526 | /* Schedule another send_find_finger_trail_message task. */ | 2526 | /* Schedule another send_find_finger_trail_message task. */ |
2527 | find_finger_trail_task_next_send_time = | ||
2528 | GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | ||
2529 | find_finger_trail_task_next_send_time.rel_value_us = | 2527 | find_finger_trail_task_next_send_time.rel_value_us = |
2530 | find_finger_trail_task_next_send_time.rel_value_us + | 2528 | find_finger_trail_task_next_send_time.rel_value_us + |
2531 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, | 2529 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, |
@@ -2540,7 +2538,6 @@ send_find_finger_trail_message (void *cls, | |||
2540 | if (GNUNET_YES == GDS_ROUTING_threshold_reached()) | 2538 | if (GNUNET_YES == GDS_ROUTING_threshold_reached()) |
2541 | return; | 2539 | return; |
2542 | 2540 | ||
2543 | |||
2544 | target_friend = select_random_friend (); | 2541 | target_friend = select_random_friend (); |
2545 | if (NULL == target_friend) | 2542 | if (NULL == target_friend) |
2546 | { | 2543 | { |
@@ -3025,9 +3022,6 @@ send_verify_successor_message (void *cls, | |||
3025 | unsigned int j = 0; | 3022 | unsigned int j = 0; |
3026 | struct FingerInfo *successor; | 3023 | struct FingerInfo *successor; |
3027 | 3024 | ||
3028 | verify_successor_next_send_time = | ||
3029 | GNUNET_TIME_STD_BACKOFF(verify_successor_next_send_time); | ||
3030 | |||
3031 | /* Schedule another send_find_finger_trail_message task. | 3025 | /* Schedule another send_find_finger_trail_message task. |
3032 | verify_successor_next_send_time.rel_value_us = | 3026 | verify_successor_next_send_time.rel_value_us = |
3033 | verify_successor_next_send_time.rel_value_us + | 3027 | verify_successor_next_send_time.rel_value_us + |
@@ -3301,6 +3295,8 @@ finger_table_add (struct GNUNET_PeerIdentity finger_identity, | |||
3301 | if (0 == GNUNET_CRYPTO_cmp_peer_identity (&finger_identity, | 3295 | if (0 == GNUNET_CRYPTO_cmp_peer_identity (&finger_identity, |
3302 | &successor->finger_identity)) | 3296 | &successor->finger_identity)) |
3303 | { | 3297 | { |
3298 | find_finger_trail_task_next_send_time = | ||
3299 | GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | ||
3304 | current_search_finger_index = 0; | 3300 | current_search_finger_index = 0; |
3305 | return; | 3301 | return; |
3306 | } | 3302 | } |
@@ -4935,6 +4931,8 @@ handle_dht_p2p_verify_successor_result(void *cls, | |||
4935 | probable_successor = vsrm->probable_successor; | 4931 | probable_successor = vsrm->probable_successor; |
4936 | current_successor = vsrm->current_successor; | 4932 | current_successor = vsrm->current_successor; |
4937 | 4933 | ||
4934 | verify_successor_next_send_time = | ||
4935 | GNUNET_TIME_STD_BACKOFF(verify_successor_next_send_time); | ||
4938 | /* I am the querying_peer. */ | 4936 | /* I am the querying_peer. */ |
4939 | if(0 == (GNUNET_CRYPTO_cmp_peer_identity (&querying_peer, &my_identity))) | 4937 | if(0 == (GNUNET_CRYPTO_cmp_peer_identity (&querying_peer, &my_identity))) |
4940 | { | 4938 | { |
@@ -5617,7 +5615,7 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer_identity) | |||
5617 | 5615 | ||
5618 | friend = GNUNET_new (struct FriendInfo); | 5616 | friend = GNUNET_new (struct FriendInfo); |
5619 | friend->id = *peer_identity; | 5617 | friend->id = *peer_identity; |
5620 | friend->congestion_timestamp = GNUNET_TIME_relative_to_absolute(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 1)); | 5618 | friend->congestion_timestamp = GNUNET_TIME_relative_to_absolute(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 50)); |
5621 | GNUNET_assert (GNUNET_OK == | 5619 | GNUNET_assert (GNUNET_OK == |
5622 | GNUNET_CONTAINER_multipeermap_put (friend_peermap, | 5620 | GNUNET_CONTAINER_multipeermap_put (friend_peermap, |
5623 | peer_identity, friend, | 5621 | peer_identity, friend, |
@@ -5626,7 +5624,9 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer_identity) | |||
5626 | /* got a first connection, good time to start with FIND FINGER TRAIL requests...*/ | 5624 | /* got a first connection, good time to start with FIND FINGER TRAIL requests...*/ |
5627 | if (GNUNET_SCHEDULER_NO_TASK == find_finger_trail_task) | 5625 | if (GNUNET_SCHEDULER_NO_TASK == find_finger_trail_task) |
5628 | { | 5626 | { |
5629 | find_finger_trail_task = GNUNET_SCHEDULER_add_now (&send_find_finger_trail_message, NULL); | 5627 | // find_finger_trail_task = GNUNET_SCHEDULER_add_now (&send_find_finger_trail_message, NULL); |
5628 | find_finger_trail_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 60), | ||
5629 | &send_find_finger_trail_message, NULL); | ||
5630 | } | 5630 | } |
5631 | } | 5631 | } |
5632 | 5632 | ||