aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-xdht_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-xdht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index 332156d00..dde456037 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -80,7 +80,7 @@
80/** 80/**
81 * How long to wait before sending another verify successor message. 81 * How long to wait before sending another verify successor message.
82 */ 82 */
83#define DHT_SEND_VERIFY_SUCCESSOR_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) 83#define DHT_SEND_VERIFY_SUCCESSOR_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2)
84 84
85/** 85/**
86 * How long to wait before sending another verify successor message. 86 * How long to wait before sending another verify successor message.
@@ -4826,31 +4826,7 @@ handle_dht_p2p_verify_successor(void *cls,
4826 { 4826 {
4827 next_hop = GDS_ROUTING_get_next_hop (trail_id, GDS_ROUTING_SRC_TO_DEST); 4827 next_hop = GDS_ROUTING_get_next_hop (trail_id, GDS_ROUTING_SRC_TO_DEST);
4828 if (NULL == next_hop) 4828 if (NULL == next_hop)
4829 { 4829 {
4830 //SUPUs anyways you are passing the trail, just do the lookup
4831 // and pass the message forward.
4832// int my_index = search_my_index (trail, trail_length);
4833// if(-1 == my_index)
4834// {
4835// DEBUG(" Peer %s not present in trail id %s, line =%d",
4836// GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
4837// GNUNET_break_op (0);
4838// return GNUNET_OK;
4839// }
4840// if((my_index == trail_length + 1))
4841// {
4842// DEBUG(" Peer %s present twice in trail id %s, line =%d",
4843// GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
4844// GNUNET_break_op (0);
4845// return GNUNET_OK;
4846// }
4847// if(my_index == (trail_length - 1))
4848// {
4849// *next_hop = successor;
4850// }
4851// else
4852// *next_hop = trail[my_index + 1];
4853
4854 return GNUNET_OK; 4830 return GNUNET_OK;
4855 } 4831 }
4856 4832
@@ -5033,17 +5009,10 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ,
5033 memcpy (&my_id, &my_identity, sizeof(uint64_t)); 5009 memcpy (&my_id, &my_identity, sizeof(uint64_t));
5034 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity)); 5010 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity));
5035 memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t)); 5011 memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t));
5012 succ = GNUNET_ntohll(succ);
5036 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str); 5013 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str);
5037 GNUNET_free (my_id_str); 5014 GNUNET_free (my_id_str);
5038 FPRINTF (stderr,_("\nSUPU %s, %s, %d,MY_ID = %llu and successor_id = %llu"), 5015
5039 __FILE__, __func__,__LINE__,(unsigned long long)my_id, (unsigned long long)succ);
5040 struct GNUNET_PeerIdentity print_peer;
5041 print_peer = my_identity;
5042 FPRINTF (stderr,_("\nSUPU my_id = %s,my_id64 = %llu, %s, %s, %d"),
5043 GNUNET_i2s(&print_peer),(unsigned long long)my_id,__FILE__, __func__,__LINE__);
5044 print_peer = current_successor->finger_identity;
5045 FPRINTF (stderr,_("\nSUPU current_successor->finger_identity = %s,my_id64 = %llu, %s, %s, %d"),
5046 GNUNET_i2s(&print_peer),(unsigned long long)succ,__FILE__, __func__,__LINE__);
5047 GNUNET_STATISTICS_set (GDS_stats, key, succ, 0); 5016 GNUNET_STATISTICS_set (GDS_stats, key, succ, 0);
5048 GNUNET_free (key); 5017 GNUNET_free (key);
5049 } 5018 }