Don't die on unknown peer
authorBart Polot <bart@net.in.tum.de>
Mon, 24 Oct 2011 14:33:30 +0000 (14:33 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 24 Oct 2011 14:33:30 +0000 (14:33 +0000)
src/mesh/test_mesh_small.c

index e77ddcf15c7d1ee8764b2b737458bdd1fedeefea..9f075638ae160d920a805d69fb4f6494f4fa60c1 100644 (file)
@@ -524,7 +524,6 @@ topo_cb (void *cls,
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   "***************** test: %s is UNKNOWN!?\n",
                   GNUNET_i2s(second));
-      GNUNET_break (0);
       return;
     }
     mesh_peers[p2]++;
@@ -538,7 +537,13 @@ topo_cb (void *cls,
   {
     p2 = GNUNET_PEER_search(first);
     GNUNET_assert(p2 < num_peers);
-    GNUNET_assert(p2 > 0);
+    if (p2 == 0)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  "***************** test: %s is UNKNOWN!?\n",
+                  GNUNET_i2s(second));
+      return;
+    }
     mesh_peers[p2]++;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "***************** test: %s IS a neighbor\n",