-only notify AFTER sending is really close to finished, not before
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_local.c
index 9430fbefac211797677618fe17fc581b80f3d92b..eab222481351d5bfb05dbb7ca05d116202c5a35a 100644 (file)
@@ -24,8 +24,8 @@
 
 #include "gnunet_statistics_service.h"
 
-#include "mesh_enc.h"
-#include "mesh_protocol_enc.h" // GNUNET_MESH_Data is shared
+#include "mesh.h"
+#include "mesh_protocol.h" /* GNUNET_MESH_Data is shared */
 
 #include "gnunet-service-mesh_local.h"
 
@@ -813,7 +813,7 @@ GML_channel_add (struct MeshClient *client,
 
 
 /**
- * Remove a channel from a client
+ * Remove a channel from a client.
  *
  * @param client Client.
  * @param chid Channel ID.
@@ -825,9 +825,13 @@ GML_channel_remove (struct MeshClient *client,
                     struct MeshChannel *ch)
 {
   if (GNUNET_MESH_LOCAL_CHANNEL_ID_SERV <= chid)
-    GNUNET_CONTAINER_multihashmap32_remove (client->incoming_channels, chid, ch);
+    GNUNET_break (GNUNET_YES ==
+                  GNUNET_CONTAINER_multihashmap32_remove (client->incoming_channels,
+                                                          chid, ch));
   else if (GNUNET_MESH_LOCAL_CHANNEL_ID_CLI <= chid)
-    GNUNET_CONTAINER_multihashmap32_remove (client->own_channels, chid, ch);
+    GNUNET_break (GNUNET_YES ==
+                  GNUNET_CONTAINER_multihashmap32_remove (client->own_channels,
+                                                          chid, ch));
   else
     GNUNET_break (0);
 }