gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r31331 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r31331 - gnunet/src/mesh
Date: Thu, 12 Dec 2013 19:34:20 +0100

Author: bartpolot
Date: 2013-12-12 19:34:20 +0100 (Thu, 12 Dec 2013)
New Revision: 31331

Modified:
   gnunet/src/mesh/gnunet-service-mesh_connection.c
   gnunet/src/mesh/gnunet-service-mesh_peer.c
Log:
- dont GNUNET_break on non-validable paths, DHT seems to routinely be aware of 
core connections faster than MESH


Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-12 18:32:15 UTC 
(rev 31330)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c    2013-12-12 18:34:20 UTC 
(rev 31331)
@@ -1149,9 +1149,9 @@
       || GNUNET_NO == GMP_is_neighbor (prev_peer))
   {
     if (GMC_is_origin (c, GNUNET_YES))
-      GNUNET_break (0);
-    else
-      GNUNET_break_op (0);
+      GNUNET_STATISTICS_update (stats, "# local bad paths", 1, GNUNET_NO);
+    GNUNET_STATISTICS_update (stats, "# bad paths", 1, GNUNET_NO);
+    
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  register neighbors failed\n");
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  prev: %s, %d\n",
          GMP_2s (prev_peer), GMP_is_neighbor (prev_peer));
@@ -1178,11 +1178,12 @@
   struct MeshPeer *peer;
 
   peer = get_next_hop (c);
-  GMP_remove_connection (peer, c);
+  if (GNUNET_OK != GMP_remove_connection (peer, c))
+    GNUNET_break (MESH_CONNECTION_NEW == c->state);
 
   peer = get_prev_hop (c);
-  GMP_remove_connection (peer, c);
-
+  if (GNUNET_OK != GMP_remove_connection (peer, c))
+    GNUNET_break (MESH_CONNECTION_NEW == c->state);
 }
 
 
@@ -2220,17 +2221,18 @@
   c->own_pos = own_pos;
   c->path = p;
 
+  if (GNUNET_OK != register_neighbors (c))
+  {
+    GMC_destroy (c);
+    return NULL;
+  }
+
   if (0 == own_pos)
   {
     c->fwd_maintenance_task =
       GNUNET_SCHEDULER_add_delayed (create_connection_time,
                                     &connection_fwd_keepalive, c);
   }
-  if (GNUNET_OK != register_neighbors (c))
-  {
-    GMC_destroy (c);
-    return NULL;
-  }
 
   return c;
 }

Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c  2013-12-12 18:32:15 UTC (rev 
31330)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c  2013-12-12 18:34:20 UTC (rev 
31331)
@@ -1608,8 +1608,7 @@
 {
   if (NULL == peer || NULL == peer->connections)
   {
-    GNUNET_break (0);
-    LOG (GNUNET_ERROR_TYPE_WARNING,
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Peer %s is not a neighbor!\n",
          GMP_2s (peer));
     return GNUNET_SYSERR;




reply via email to

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