at least NULL the task handle in the unimplemented task
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet-new_tunnels.c
index 73bbaf042e50e9e0bbaccd909af5d80b7e8dbad5..fee58fd174b890f08d43b376d6c9b16b48dd3700 100644 (file)
@@ -1558,6 +1558,21 @@ GCT_remove_channel (struct CadetTunnel *t,
 }
 
 
+/**
+ * Destroys the tunnel @a t now, without delay. Used during shutdown.
+ *
+ * @param t tunnel to destroy
+ */
+void
+GCT_destroy_tunnel_now (struct CadetTunnel *t)
+{
+  GNUNET_assert (0 ==
+                 GNUNET_CONTAINER_multihashmap32_size (t->channels));
+  GNUNET_SCHEDULER_cancel (t->destroy_task);
+  destroy_tunnel (t);
+}
+
+
 /**
  * It's been a while, we should try to redo the KX, if we can.
  *
@@ -1722,6 +1737,7 @@ maintain_connections_cb (void *cls)
 {
   struct CadetTunnel *t = cls;
 
+  t->maintain_connections_task = NULL;
   GNUNET_break (0); // FIXME: implement!
 }