gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r34139 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r34139 - gnunet/src/dht
Date: Mon, 11 Aug 2014 01:29:04 +0200

Author: supriti
Date: 2014-08-11 01:29:04 +0200 (Mon, 11 Aug 2014)
New Revision: 34139

Modified:
   gnunet/src/dht/gnunet-service-xdht_neighbours.c
Log:
xvine:fixes


Modified: gnunet/src/dht/gnunet-service-xdht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-xdht_neighbours.c     2014-08-10 22:27:48 UTC 
(rev 34138)
+++ gnunet/src/dht/gnunet-service-xdht_neighbours.c     2014-08-10 23:29:04 UTC 
(rev 34139)
@@ -4010,9 +4010,7 @@
   {
     if(0 == GNUNET_CRYPTO_cmp_peer_identity(&trail_peer_list[i],&my_identity))
     {
-        //Here if you already were present in the trail. then you
-        // should trail length to i + 1
-      trail_length = i+1;
+      trail_length = i;
       break;
     }
   }
@@ -4059,7 +4057,7 @@
     }
 
     if (trail_length > 0)
-      target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, peer);
+      target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, 
&trail_peer_list[trail_length-1]);
     else
       target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, 
&source);
     if (NULL == target_friend)
@@ -4084,16 +4082,6 @@
 
     if (0 != GNUNET_CRYPTO_cmp_peer_identity(&my_identity, &source))
     {
-      if(0 == GNUNET_CRYPTO_cmp_peer_identity(&my_identity, 
&trail_peer_list[trail_length -1 ]))
-      {
-        GDS_NEIGHBOURS_send_trail_setup (source,
-                                        final_dest_finger_val,
-                                        next_peer.best_known_destination,
-                                        target_friend, trail_length, 
trail_peer_list,
-                                        is_predecessor, trail_id,
-                                        next_peer.trail_id);
-      } 
-      else{
       /* Add yourself to list of peers. */
       struct GNUNET_PeerIdentity peer_list[trail_length + 1];
 
@@ -4107,7 +4095,6 @@
                                        target_friend, trail_length + 1, 
peer_list,
                                        is_predecessor, trail_id,
                                        next_peer.trail_id);
-      }
     }
     else
         GDS_NEIGHBOURS_send_trail_setup (source,
@@ -4764,8 +4751,11 @@
     next_hop = GDS_ROUTING_get_next_hop (trail_id, GDS_ROUTING_SRC_TO_DEST);   
 
     if (NULL == next_hop)
     {
-      GNUNET_break_op (0);
-      return GNUNET_SYSERR;
+//      GNUNET_break_op (0);
+//      return GNUNET_SYSERR;
+      //FIXME: Here it may happen that trail has not yet been added 
+      //in notify successor.
+      return GNUNET_OK;
     }
 
     target_friend = GNUNET_CONTAINER_multipeermap_get (friend_peermap, 
next_hop);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]