room--;
GNUNET_CONTAINER_DLL_remove (t->tq_head, t->tq_tail, tq);
GMCH_send_prebuilt_message ((struct GNUNET_MessageHeader *) &tq[1],
- tq->ch, GMCH_is_origin (tq->ch, GNUNET_YES));
+ tq->ch, GMCH_is_origin (tq->ch, GNUNET_YES),
+ GNUNET_NO);
GNUNET_free (tq);
}
GNUNET_free (qt);
}
+
+/**
+ * Cancel a previously sent message while it's in the queue.
+ *
+ * ONLY can be called before the continuation given to the send function
+ * is called. Once the continuation is called, the message is no longer in the
+ * queue.
+ *
+ * @param q Handle to the queue.
+ */
+void
+GMT_cancel (struct MeshTunnel3Queue *q)
+{
+ GMC_cancel (q->q);
+ /* message_sent() will be called and free q */
+}
+
/**
* Sends an already built message on a tunnel, encrypting it and
* choosing the best connection.