- add warning if check fails
authorBart Polot <bart@net.in.tum.de>
Fri, 17 Jan 2014 11:57:20 +0000 (11:57 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 17 Jan 2014 11:57:20 +0000 (11:57 +0000)
src/mesh/gnunet-service-mesh_tunnel.c

index afb739ee519e73d50442aee7fc162b29907d2898..b51fc7f29eb238218e3ad6ee7805aae9ffd6d506 100644 (file)
@@ -2020,8 +2020,14 @@ GMT_destroy_empty (struct MeshTunnel3 *t)
 {
   if (GNUNET_SCHEDULER_NO_TASK != t->destroy_task)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s is already scheduled for destruction\n",
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Tunnel %s is already scheduled for destruction\n",
          GMT_2s (t));
+    GNUNET_break (0);
+    /* should never happen, tunnel can only become empty once, and the
+     * task identifier should be NO_TASK (cleaned when the tunnel was created
+     * or became un-empty)
+     */
     return;
   }