gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r31625 - gnunet/src/dv


From: gnunet
Subject: [GNUnet-SVN] r31625 - gnunet/src/dv
Date: Fri, 20 Dec 2013 17:37:19 +0100

Author: wachs
Date: 2013-12-20 17:37:19 +0100 (Fri, 20 Dec 2013)
New Revision: 31625

Modified:
   gnunet/src/dv/gnunet-service-dv.c
Log:
at least they connect on transport level


Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c   2013-12-20 16:21:35 UTC (rev 31624)
+++ gnunet/src/dv/gnunet-service-dv.c   2013-12-20 16:37:19 UTC (rev 31625)
@@ -1539,6 +1539,7 @@
                         enum GNUNET_SET_Status status)
 {
   struct DirectNeighbor *neighbor = cls;
+  struct DirectNeighbor *dn;
   struct Target *target;
   char *status_str;
 
@@ -1575,9 +1576,7 @@
       GNUNET_break_op (0);
       return;
     }
-    if (GNUNET_YES ==
-        GNUNET_CONTAINER_multipeermap_contains (direct_neighbors,
-                                                &((struct Target *) 
element->data)->peer))
+    if ( (NULL != (dn = GNUNET_CONTAINER_multipeermap_get (direct_neighbors, 
&((struct Target *) element->data)->peer))) && (DIRECT_NEIGHBOR_COST == 
dn->distance) )
     {
       /* this is a direct neighbor of ours, we do not care about routes
          to this peer */
@@ -1775,6 +1774,7 @@
   const struct GNUNET_MessageHeader *payload;
   struct Route *route;
   struct DirectNeighbor *neighbor;
+  struct DirectNeighbor *dn;
   struct Target *target;
   uint32_t distance;
   char me[5];
@@ -1812,8 +1812,9 @@
                   &my_identity,
                   sizeof (struct GNUNET_PeerIdentity)))
   {
-    if (NULL != GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
-                                                   &rm->sender))
+    if ((NULL
+        != (dn = GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
+            &rm->sender))) && (DIRECT_NEIGHBOR_COST == dn->distance))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Discarding DV message, as %s is a direct neighbor\n",




reply via email to

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