- logging
authorFlorian Dold <florian.dold@gmail.com>
Wed, 24 Jul 2013 13:52:21 +0000 (13:52 +0000)
committerFlorian Dold <florian.dold@gmail.com>
Wed, 24 Jul 2013 13:52:21 +0000 (13:52 +0000)
src/mesh/mesh_api.c
src/util/mq.c

index fc91801efe6370bce1aa0b599612308cfd1aac28..230d5bbbf4414f386146c69afded9efe9a94e518 100644 (file)
@@ -1722,6 +1722,10 @@ mesh_mq_ntr (void *cls, size_t size,
   const struct GNUNET_MessageHeader *msg = GNUNET_MQ_impl_current (mq);
   uint16_t msize;
 
+  GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "mesh-mq",
+                   "writing message (t: %s, s: %s) to buffer\n",
+                   ntohs (msg->type), ntohs (msg->size));
+
   state->th = NULL;
   if (NULL == buf)
   {
@@ -1752,6 +1756,9 @@ mesh_mq_send_impl (struct GNUNET_MQ_Handle *mq,
 
   GNUNET_assert (NULL == state->th);
   GNUNET_MQ_impl_send_commit (mq);
+  GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "mesh-mq",
+                   "calling ntr for message (t: %s, s: %s)\n",
+                   ntohs (msg->type), ntohs (msg->size));
   state->th =
       GNUNET_MESH_notify_transmit_ready (state->tunnel,
                                          /* FIXME: add option for corking */
index 68134881eb8d8522a929430141ce7841424ddfdd..9a3092f65be9ac76ec095e87fa1fc26c3d38eb94 100644 (file)
@@ -690,9 +690,7 @@ GNUNET_MQ_assoc_remove (struct GNUNET_MQ_Handle *mq, uint32_t request_id)
   if (NULL == mq->assoc_map)
     return NULL;
   val = GNUNET_CONTAINER_multihashmap32_get (mq->assoc_map, request_id);
-  GNUNET_assert (NULL != val);
-  GNUNET_assert (GNUNET_YES ==
-                GNUNET_CONTAINER_multihashmap32_remove (mq->assoc_map, request_id, val));
+  GNUNET_CONTAINER_multihashmap32_remove_all (mq->assoc_map, request_id);
   return val;
 }