aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index 08ed33ce7..f0a1cb8b9 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -4684,10 +4684,29 @@ handle_dht_p2p_verify_successor(void *cls,
4684 next_hop = GDS_ROUTING_get_next_hop (trail_id, GDS_ROUTING_SRC_TO_DEST); 4684 next_hop = GDS_ROUTING_get_next_hop (trail_id, GDS_ROUTING_SRC_TO_DEST);
4685 if (NULL == next_hop) 4685 if (NULL == next_hop)
4686 { 4686 {
4687 DEBUG(" NO ENTRY FOUND IN %s ROUTING TABLE for trail id %s, line", 4687 //SUPUs anyways you are passing the trail, just do the lookup
4688 GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__); 4688 // and pass the message forward.
4689 GNUNET_break_op (0); 4689 int my_index = search_my_index (trail, trail_length);
4690 return GNUNET_OK; 4690 if(-1 == my_index)
4691 {
4692 DEBUG(" Peer %s not present in trail id %s, line =%d",
4693 GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
4694 GNUNET_break_op (0);
4695 return GNUNET_OK;
4696 }
4697 if((my_index == trail_length + 1))
4698 {
4699 DEBUG(" Peer %s present twice in trail id %s, line =%d",
4700 GNUNET_i2s(&my_identity), GNUNET_h2s(&trail_id), __LINE__);
4701 GNUNET_break_op (0);
4702 return GNUNET_OK;
4703 }
4704 if(my_index == (trail_length - 1))
4705 {
4706 *next_hop = successor;
4707 }
4708 else
4709 *next_hop = trail[my_index + 1];
4691 } 4710 }
4692 4711
4693 target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, next_hop); 4712 target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, next_hop);