diff options
author | Supriti Singh <supritisingh08@gmail.com> | 2014-08-18 10:52:40 +0000 |
---|---|---|
committer | Supriti Singh <supritisingh08@gmail.com> | 2014-08-18 10:52:40 +0000 |
commit | d30455e79ea8c89dd460470c03aaeb8d43cbf997 (patch) | |
tree | 0f329a9d8f53809eccf8cabf2c1715d758ba6272 /src | |
parent | d063099eef60dcebfeedb188a4d8c59ce36c8ed9 (diff) | |
download | gnunet-d30455e79ea8c89dd460470c03aaeb8d43cbf997.tar.gz gnunet-d30455e79ea8c89dd460470c03aaeb8d43cbf997.zip |
xvine fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-xdht_neighbours.c | 141 |
1 files changed, 77 insertions, 64 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c index 2212093e1..bb72eaf81 100644 --- a/src/dht/gnunet-service-xdht_neighbours.c +++ b/src/dht/gnunet-service-xdht_neighbours.c | |||
@@ -52,6 +52,13 @@ | |||
52 | * hashing. | 52 | * hashing. |
53 | */ | 53 | */ |
54 | 54 | ||
55 | |||
56 | /** | ||
57 | * FIXME: URGENT | ||
58 | * We should have a message type like notify successor result. only when | ||
59 | * this message is being recvied by the new successor. we should schedule | ||
60 | * another round of verify successor. | ||
61 | */ | ||
55 | #define DEBUG(...) \ | 62 | #define DEBUG(...) \ |
56 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__) |
57 | 64 | ||
@@ -2568,6 +2575,8 @@ send_find_finger_trail_message (void *cls, | |||
2568 | uint64_t finger_id_value; | 2575 | uint64_t finger_id_value; |
2569 | 2576 | ||
2570 | /* Schedule another send_find_finger_trail_message task. */ | 2577 | /* Schedule another send_find_finger_trail_message task. */ |
2578 | find_finger_trail_task_next_send_time = | ||
2579 | GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | ||
2571 | find_finger_trail_task = | 2580 | find_finger_trail_task = |
2572 | GNUNET_SCHEDULER_add_delayed (find_finger_trail_task_next_send_time, | 2581 | GNUNET_SCHEDULER_add_delayed (find_finger_trail_task_next_send_time, |
2573 | &send_find_finger_trail_message, | 2582 | &send_find_finger_trail_message, |
@@ -2616,18 +2625,19 @@ send_find_finger_trail_message (void *cls, | |||
2616 | * 2. if the new trail is completely disjoint than the | 2625 | * 2. if the new trail is completely disjoint than the |
2617 | * other trails, then may be choosing it is better. | 2626 | * other trails, then may be choosing it is better. |
2618 | * | 2627 | * |
2619 | * @param existing_finger | 2628 | * @param finger Finger |
2620 | * @param new_finger_trail | 2629 | * @param new_finger_trail List of peers to reach from me to @a finger, NOT |
2621 | * @param new_finger_trail_length | 2630 | * including the endpoints. |
2622 | * @param new_finger_trail_id | 2631 | * @param new_finger_trail_length Total number of peers in @a new_finger_trail |
2632 | * @param new_finger_trail_id Unique identifier of @a new_finger_trail. | ||
2623 | */ | 2633 | */ |
2624 | static void | 2634 | static void |
2625 | select_and_replace_trail (struct FingerInfo *existing_finger, | 2635 | select_and_replace_trail (struct FingerInfo *finger, |
2626 | const struct GNUNET_PeerIdentity *new_trail, | 2636 | const struct GNUNET_PeerIdentity *new_trail, |
2627 | unsigned int new_trail_length, | 2637 | unsigned int new_trail_length, |
2628 | struct GNUNET_HashCode new_trail_id) | 2638 | struct GNUNET_HashCode new_trail_id) |
2629 | { | 2639 | { |
2630 | struct Trail *trail_list_iterator; | 2640 | struct Trail *trail; |
2631 | unsigned int largest_trail_length; | 2641 | unsigned int largest_trail_length; |
2632 | unsigned int largest_trail_index; | 2642 | unsigned int largest_trail_index; |
2633 | struct Trail_Element *trail_element; | 2643 | struct Trail_Element *trail_element; |
@@ -2636,14 +2646,14 @@ select_and_replace_trail (struct FingerInfo *existing_finger, | |||
2636 | largest_trail_length = new_trail_length; | 2646 | largest_trail_length = new_trail_length; |
2637 | largest_trail_index = MAXIMUM_TRAILS_PER_FINGER + 1; | 2647 | largest_trail_index = MAXIMUM_TRAILS_PER_FINGER + 1; |
2638 | 2648 | ||
2639 | GNUNET_assert (MAXIMUM_TRAILS_PER_FINGER == existing_finger->trails_count); | 2649 | GNUNET_assert (MAXIMUM_TRAILS_PER_FINGER == finger->trails_count); |
2640 | 2650 | ||
2641 | for (i = 0; i < existing_finger->trails_count; i++) | 2651 | for (i = 0; i < finger->trails_count; i++) |
2642 | { | 2652 | { |
2643 | trail_list_iterator = &existing_finger->trail_list[i]; | 2653 | trail = &finger->trail_list[i]; |
2644 | if (trail_list_iterator->trail_length > largest_trail_length) | 2654 | if (trail->trail_length > largest_trail_length) |
2645 | { | 2655 | { |
2646 | largest_trail_length = trail_list_iterator->trail_length; | 2656 | largest_trail_length = trail->trail_length; |
2647 | largest_trail_index = i; | 2657 | largest_trail_index = i; |
2648 | } | 2658 | } |
2649 | } | 2659 | } |
@@ -2662,8 +2672,8 @@ select_and_replace_trail (struct FingerInfo *existing_finger, | |||
2662 | } | 2672 | } |
2663 | 2673 | ||
2664 | /* Send trail teardown message across the replaced trail. */ | 2674 | /* Send trail teardown message across the replaced trail. */ |
2665 | struct Trail *replace_trail = &existing_finger->trail_list[largest_trail_index]; | 2675 | struct Trail *replace_trail = &finger->trail_list[largest_trail_index]; |
2666 | existing_finger->trail_list[largest_trail_index].is_present = GNUNET_NO; | 2676 | |
2667 | GNUNET_assert (GNUNET_YES == GDS_ROUTING_remove_trail (replace_trail->trail_id)); | 2677 | GNUNET_assert (GNUNET_YES == GDS_ROUTING_remove_trail (replace_trail->trail_id)); |
2668 | GDS_NEIGHBOURS_send_trail_teardown (replace_trail->trail_id, | 2678 | GDS_NEIGHBOURS_send_trail_teardown (replace_trail->trail_id, |
2669 | GDS_ROUTING_SRC_TO_DEST, | 2679 | GDS_ROUTING_SRC_TO_DEST, |
@@ -2680,9 +2690,8 @@ select_and_replace_trail (struct FingerInfo *existing_finger, | |||
2680 | replace_trail->is_present = GNUNET_YES; | 2690 | replace_trail->is_present = GNUNET_YES; |
2681 | replace_trail->trail_length = new_trail_length; | 2691 | replace_trail->trail_length = new_trail_length; |
2682 | replace_trail->trail_id = new_trail_id; | 2692 | replace_trail->trail_id = new_trail_id; |
2683 | //FIXME: Do we need to add pointers for head and tail. | 2693 | |
2684 | i = 0; | 2694 | for (i = 0; i < new_trail_length; i++) |
2685 | while (i < new_trail_length) | ||
2686 | { | 2695 | { |
2687 | struct Trail_Element *element = GNUNET_new (struct Trail_Element); | 2696 | struct Trail_Element *element = GNUNET_new (struct Trail_Element); |
2688 | element->peer = new_trail[i]; | 2697 | element->peer = new_trail[i]; |
@@ -2691,6 +2700,7 @@ select_and_replace_trail (struct FingerInfo *existing_finger, | |||
2691 | replace_trail->trail_tail, | 2700 | replace_trail->trail_tail, |
2692 | element); | 2701 | element); |
2693 | } | 2702 | } |
2703 | /* FIXME: Are we adding the trail back to the list. */ | ||
2694 | } | 2704 | } |
2695 | 2705 | ||
2696 | 2706 | ||
@@ -2708,46 +2718,45 @@ is_new_trail_unique (struct FingerInfo *existing_finger, | |||
2708 | const struct GNUNET_PeerIdentity *new_trail, | 2718 | const struct GNUNET_PeerIdentity *new_trail, |
2709 | unsigned int trail_length) | 2719 | unsigned int trail_length) |
2710 | { | 2720 | { |
2711 | struct Trail *trail_list_iterator; | 2721 | struct Trail *trail; |
2712 | struct Trail_Element *trail_element; | 2722 | struct Trail_Element *trail_element; |
2713 | int i; | 2723 | int i; |
2714 | int j; | 2724 | int j; |
2715 | int trail_unique = GNUNET_NO; | 2725 | |
2716 | |||
2717 | GNUNET_assert (existing_finger->trails_count > 0); | 2726 | GNUNET_assert (existing_finger->trails_count > 0); |
2718 | 2727 | ||
2719 | /* Iterate over list of trails. */ | 2728 | /* Iterate over list of trails. */ |
2720 | for (i = 0; i < existing_finger->trails_count; i++) | 2729 | for (i = 0; i < existing_finger->trails_count; i++) |
2721 | { | 2730 | { |
2722 | trail_list_iterator = &(existing_finger->trail_list[i]); | 2731 | trail = &(existing_finger->trail_list[i]); |
2723 | GNUNET_assert (GNUNET_YES == trail_list_iterator->is_present); | 2732 | GNUNET_assert (GNUNET_YES == trail->is_present); |
2724 | 2733 | ||
2725 | /* New trail and existing trail length are not same. */ | 2734 | /* New trail and existing trail length are not same. */ |
2726 | if (trail_list_iterator->trail_length != trail_length) | 2735 | if (trail->trail_length != trail_length) |
2727 | { | 2736 | { |
2728 | trail_unique = GNUNET_YES; | 2737 | return GNUNET_YES; |
2729 | break; | ||
2730 | } | 2738 | } |
2731 | 2739 | ||
2732 | trail_element = trail_list_iterator->trail_head; | 2740 | trail_element = trail->trail_head; |
2733 | GNUNET_assert (trail_element != NULL); | 2741 | GNUNET_assert (trail_element != NULL); |
2734 | for (j = 0; j < trail_list_iterator->trail_length; j++) | 2742 | for (j = 0; j < trail->trail_length; j++) |
2735 | { | 2743 | { |
2736 | if (0 != GNUNET_CRYPTO_cmp_peer_identity (&new_trail[j], | 2744 | if (0 != GNUNET_CRYPTO_cmp_peer_identity (&new_trail[j], |
2737 | &trail_element->peer)) | 2745 | &trail_element->peer)) |
2738 | { | 2746 | { |
2739 | trail_unique = GNUNET_YES; | 2747 | return GNUNET_YES; |
2740 | break; | ||
2741 | } | 2748 | } |
2742 | trail_element = trail_element->next; | 2749 | trail_element = trail_element->next; |
2743 | } | 2750 | } |
2744 | } | 2751 | } |
2745 | 2752 | return GNUNET_NO; | |
2746 | return trail_unique; | ||
2747 | } | 2753 | } |
2748 | 2754 | ||
2749 | 2755 | ||
2750 | /** | 2756 | /** |
2757 | * FIXME; In case of multiple trails, we may have a case where a trail from in | ||
2758 | * between has been removed, then we should try to find a free slot , not simply | ||
2759 | * add a trail at then end of the list. | ||
2751 | * Add a new trail to existing finger. This function is called only when finger | 2760 | * Add a new trail to existing finger. This function is called only when finger |
2752 | * is not my own identity or a friend. | 2761 | * is not my own identity or a friend. |
2753 | * @param existing_finger Finger | 2762 | * @param existing_finger Finger |
@@ -2761,22 +2770,24 @@ add_new_trail (struct FingerInfo *existing_finger, | |||
2761 | unsigned int new_trail_length, | 2770 | unsigned int new_trail_length, |
2762 | struct GNUNET_HashCode new_trail_id) | 2771 | struct GNUNET_HashCode new_trail_id) |
2763 | { | 2772 | { |
2764 | struct Trail *trail_list_iterator; | 2773 | struct Trail *trail; |
2765 | struct FriendInfo *first_friend; | 2774 | struct FriendInfo *first_friend; |
2766 | int i; | 2775 | int i; |
2767 | 2776 | int index; | |
2777 | |||
2768 | if (GNUNET_NO == is_new_trail_unique (existing_finger, new_trail, | 2778 | if (GNUNET_NO == is_new_trail_unique (existing_finger, new_trail, |
2769 | new_trail_length)) | 2779 | new_trail_length)) |
2770 | { | 2780 | { |
2771 | return; | 2781 | return; |
2772 | } | 2782 | } |
2773 | 2783 | ||
2774 | trail_list_iterator = &existing_finger->trail_list[existing_finger->trails_count]; | 2784 | index = existing_finger->trails_count; |
2775 | GNUNET_assert (GNUNET_NO == trail_list_iterator->is_present); | 2785 | trail = &existing_finger->trail_list[index]; |
2776 | trail_list_iterator->trail_id = new_trail_id; | 2786 | GNUNET_assert (GNUNET_NO == trail->is_present); |
2777 | trail_list_iterator->trail_length = new_trail_length; | 2787 | trail->trail_id = new_trail_id; |
2788 | trail->trail_length = new_trail_length; | ||
2778 | existing_finger->trails_count++; | 2789 | existing_finger->trails_count++; |
2779 | trail_list_iterator->is_present = GNUNET_YES; | 2790 | trail->is_present = GNUNET_YES; |
2780 | 2791 | ||
2781 | GNUNET_assert (NULL == (GNUNET_CONTAINER_multipeermap_get (friend_peermap, | 2792 | GNUNET_assert (NULL == (GNUNET_CONTAINER_multipeermap_get (friend_peermap, |
2782 | &existing_finger->finger_identity))); | 2793 | &existing_finger->finger_identity))); |
@@ -2793,12 +2804,16 @@ add_new_trail (struct FingerInfo *existing_finger, | |||
2793 | 2804 | ||
2794 | element = GNUNET_new (struct Trail_Element); | 2805 | element = GNUNET_new (struct Trail_Element); |
2795 | element->peer = new_trail[i]; | 2806 | element->peer = new_trail[i]; |
2796 | GNUNET_CONTAINER_DLL_insert_tail (trail_list_iterator->trail_head, | 2807 | GNUNET_CONTAINER_DLL_insert_tail (trail->trail_head, |
2797 | trail_list_iterator->trail_tail, | 2808 | trail->trail_tail, |
2798 | element); | 2809 | element); |
2799 | } | 2810 | } |
2800 | /* Do we need to add trail head and trail tail in the trail list itearator.*/ | 2811 | /* Do we need to add trail head and trail tail in the trail list itearator.*/ |
2801 | 2812 | existing_finger->trail_list[index].trail_head = trail->trail_head; | |
2813 | existing_finger->trail_list[index].trail_tail = trail->trail_tail; | ||
2814 | existing_finger->trail_list[index].trail_length = new_trail_length; | ||
2815 | existing_finger->trail_list[index].trail_id = new_trail_id; | ||
2816 | existing_finger->trail_list[index].is_present = GNUNET_YES; | ||
2802 | } | 2817 | } |
2803 | 2818 | ||
2804 | 2819 | ||
@@ -2829,10 +2844,19 @@ send_trail_teardown (struct FingerInfo *finger, | |||
2829 | GNUNET_break(0); | 2844 | GNUNET_break(0); |
2830 | return; | 2845 | return; |
2831 | } | 2846 | } |
2847 | |||
2832 | GNUNET_assert (0 != GNUNET_CRYPTO_cmp_peer_identity (&finger->finger_identity, | 2848 | GNUNET_assert (0 != GNUNET_CRYPTO_cmp_peer_identity (&finger->finger_identity, |
2833 | &my_identity)); | 2849 | &my_identity)); |
2834 | 2850 | ||
2835 | GNUNET_assert (trail->is_present == GNUNET_YES); | 2851 | /*FIXME: here was an assertion that trail->is_present = GNUNET_YES. But it |
2852 | used to fail. We have removed assertion with a condition, just for now. | ||
2853 | Find out the reason why assertion failed. */ | ||
2854 | if (trail->is_present == GNUNET_NO) | ||
2855 | { | ||
2856 | DEBUG(" trail id %s of peer %s is not present to send a trail teardown message., line", | ||
2857 | GNUNET_i2s(&my_identity), GNUNET_h2s(&trail->trail_id), __LINE__); | ||
2858 | return; | ||
2859 | } | ||
2836 | 2860 | ||
2837 | /* Finger is not a friend. */ | 2861 | /* Finger is not a friend. */ |
2838 | if (trail->trail_length > 0) | 2862 | if (trail->trail_length > 0) |
@@ -2848,7 +2872,7 @@ send_trail_teardown (struct FingerInfo *finger, | |||
2848 | &finger->finger_identity))); | 2872 | &finger->finger_identity))); |
2849 | } | 2873 | } |
2850 | 2874 | ||
2851 | GNUNET_assert (0 == GNUNET_CRYPTO_cmp_peer_identity (next_hop, &friend->id)); //Fixme: assertion fails. | 2875 | GNUNET_assert (0 == GNUNET_CRYPTO_cmp_peer_identity (next_hop, &friend->id)); |
2852 | GNUNET_assert (GNUNET_YES == GDS_ROUTING_remove_trail (trail->trail_id)); | 2876 | GNUNET_assert (GNUNET_YES == GDS_ROUTING_remove_trail (trail->trail_id)); |
2853 | friend->trails_count--; | 2877 | friend->trails_count--; |
2854 | GDS_NEIGHBOURS_send_trail_teardown (trail->trail_id, | 2878 | GDS_NEIGHBOURS_send_trail_teardown (trail->trail_id, |
@@ -2865,7 +2889,6 @@ static void | |||
2865 | send_all_finger_trails_teardown (struct FingerInfo *finger) | 2889 | send_all_finger_trails_teardown (struct FingerInfo *finger) |
2866 | { | 2890 | { |
2867 | unsigned int i; | 2891 | unsigned int i; |
2868 | |||
2869 | for (i = 0; i < finger->trails_count; i++) | 2892 | for (i = 0; i < finger->trails_count; i++) |
2870 | { | 2893 | { |
2871 | struct Trail *trail; | 2894 | struct Trail *trail; |
@@ -2902,26 +2925,21 @@ free_trail (struct Trail *trail) | |||
2902 | /** | 2925 | /** |
2903 | * Free finger and its trail. | 2926 | * Free finger and its trail. |
2904 | * @param finger Finger to be freed. | 2927 | * @param finger Finger to be freed. |
2928 | * @param finger_table_index Index at which finger is stored. | ||
2905 | */ | 2929 | */ |
2906 | static void | 2930 | static void |
2907 | free_finger (struct FingerInfo *finger, unsigned int finger_table_index) | 2931 | free_finger (struct FingerInfo *finger, unsigned int finger_table_index) |
2908 | { | 2932 | { |
2909 | struct Trail *trail; | 2933 | struct Trail *trail; |
2910 | unsigned int i; | 2934 | unsigned int i; |
2911 | |||
2912 | /* Free all the trails to reach to finger */ | ||
2913 | for (i = 0; i < finger->trails_count; i++) | 2935 | for (i = 0; i < finger->trails_count; i++) |
2914 | { | 2936 | { |
2915 | trail = &finger->trail_list[i]; | 2937 | trail = &finger->trail_list[i]; |
2916 | //FIXME: Check if there are any missing entry in this list because of | ||
2917 | // how we insert. If not then no need of this check. | ||
2918 | if (GNUNET_NO == trail->is_present) | 2938 | if (GNUNET_NO == trail->is_present) |
2919 | continue; | 2939 | continue; |
2920 | 2940 | ||
2921 | if (trail->trail_length > 0) | 2941 | if (trail->trail_length > 0) |
2922 | { | ||
2923 | free_trail (trail); | 2942 | free_trail (trail); |
2924 | } | ||
2925 | trail->is_present = GNUNET_NO; | 2943 | trail->is_present = GNUNET_NO; |
2926 | } | 2944 | } |
2927 | 2945 | ||
@@ -3044,6 +3062,8 @@ send_verify_successor_message (void *cls, | |||
3044 | unsigned int j = 0; | 3062 | unsigned int j = 0; |
3045 | struct FingerInfo *successor; | 3063 | struct FingerInfo *successor; |
3046 | 3064 | ||
3065 | verify_successor_next_send_time = | ||
3066 | GNUNET_TIME_STD_BACKOFF(verify_successor_next_send_time); | ||
3047 | /* Schedule another send_find_finger_trail_message task. */ | 3067 | /* Schedule another send_find_finger_trail_message task. */ |
3048 | verify_successor_next_send_time.rel_value_us = | 3068 | verify_successor_next_send_time.rel_value_us = |
3049 | DHT_SEND_VERIFY_SUCCESSOR_INTERVAL.rel_value_us + | 3069 | DHT_SEND_VERIFY_SUCCESSOR_INTERVAL.rel_value_us + |
@@ -3146,14 +3166,10 @@ update_current_search_finger_index (struct GNUNET_PeerIdentity finger_identity, | |||
3146 | if (0 != GNUNET_CRYPTO_cmp_peer_identity (&my_identity, &finger_identity)) | 3166 | if (0 != GNUNET_CRYPTO_cmp_peer_identity (&my_identity, &finger_identity)) |
3147 | { | 3167 | { |
3148 | if (GNUNET_SCHEDULER_NO_TASK == send_verify_successor_task) | 3168 | if (GNUNET_SCHEDULER_NO_TASK == send_verify_successor_task) |
3169 | { | ||
3170 | DEBUG (" schedule"); | ||
3149 | send_verify_successor_task = | 3171 | send_verify_successor_task = |
3150 | GNUNET_SCHEDULER_add_now (&send_verify_successor_message, NULL); | 3172 | GNUNET_SCHEDULER_add_now (&send_verify_successor_message, NULL); |
3151 | else | ||
3152 | { | ||
3153 | /* we already have scheduled a send_verify_sucessor_task, we should slow | ||
3154 | it down now. */ | ||
3155 | verify_successor_next_send_time = | ||
3156 | GNUNET_TIME_STD_BACKOFF(verify_successor_next_send_time); | ||
3157 | } | 3173 | } |
3158 | } | 3174 | } |
3159 | return; | 3175 | return; |
@@ -3238,15 +3254,14 @@ get_finger_table_index (uint64_t ultimate_destination_finger_value, | |||
3238 | 3254 | ||
3239 | /** | 3255 | /** |
3240 | * Remove finger and its associated data structures from finger table. | 3256 | * Remove finger and its associated data structures from finger table. |
3241 | * @param finger Finger to be removed. | 3257 | * @param existing_finger Finger to be removed which is in finger table. |
3258 | * @param finger_table_index Index in finger table where @a existing_finger | ||
3259 | * is stored. | ||
3242 | */ | 3260 | */ |
3243 | static void | 3261 | static void |
3244 | remove_existing_finger (struct FingerInfo *existing_finger, | 3262 | remove_existing_finger (struct FingerInfo *existing_finger, |
3245 | unsigned int finger_table_index) | 3263 | unsigned int finger_table_index) |
3246 | { | 3264 | { |
3247 | if(0 == GNUNET_CRYPTO_cmp_peer_identity (&existing_finger->finger_identity, | ||
3248 | &my_identity)); | ||
3249 | return; | ||
3250 | GNUNET_assert (GNUNET_YES == existing_finger->is_present); | 3265 | GNUNET_assert (GNUNET_YES == existing_finger->is_present); |
3251 | 3266 | ||
3252 | /* If I am my own finger, then we have no trails. */ | 3267 | /* If I am my own finger, then we have no trails. */ |
@@ -3325,9 +3340,6 @@ finger_table_add (struct GNUNET_PeerIdentity finger_identity, | |||
3325 | &successor->finger_identity)) | 3340 | &successor->finger_identity)) |
3326 | { | 3341 | { |
3327 | current_search_finger_index = 0; | 3342 | current_search_finger_index = 0; |
3328 | /* We slow down the find_finger_trail_task as we have completed the circle. */ | ||
3329 | find_finger_trail_task_next_send_time = | ||
3330 | GNUNET_TIME_STD_BACKOFF(find_finger_trail_task_next_send_time); | ||
3331 | return; | 3343 | return; |
3332 | } | 3344 | } |
3333 | 3345 | ||
@@ -5687,6 +5699,7 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer_identity) | |||
5687 | /* got a first connection, good time to start with FIND FINGER TRAIL requests...*/ | 5699 | /* got a first connection, good time to start with FIND FINGER TRAIL requests...*/ |
5688 | if (GNUNET_SCHEDULER_NO_TASK == find_finger_trail_task) | 5700 | if (GNUNET_SCHEDULER_NO_TASK == find_finger_trail_task) |
5689 | { | 5701 | { |
5702 | DEBUG ("sCHEDULING FINGER TASK"); | ||
5690 | find_finger_trail_task_next_send_time.rel_value_us = | 5703 | find_finger_trail_task_next_send_time.rel_value_us = |
5691 | DHT_FIND_FINGER_TRAIL_INTERVAL.rel_value_us + | 5704 | DHT_FIND_FINGER_TRAIL_INTERVAL.rel_value_us + |
5692 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, | 5705 | GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, |