From a7ccf828ae4f7e306ffe3e7efebc0e678615f6c5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 17 Jul 2019 10:50:45 +0200 Subject: remove duplication MQ options, make conversation build --- src/util/mq.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/util') diff --git a/src/util/mq.c b/src/util/mq.c index c9cfad2bd..03b0f3a2a 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -1137,6 +1137,28 @@ GNUNET_MQ_destroy_notify_cancel ( } +/** + * Insert @a env into the envelope DLL starting at @a env_head + * Note that @a env must not be in any MQ while this function + * is used with DLLs defined outside of the MQ module. This + * is just in case some application needs to also manage a + * FIFO of envelopes independent of MQ itself and wants to + * re-use the pointers internal to @a env. Use with caution. + * + * @param[in|out] env_head of envelope DLL + * @param[in|out] env_tail tail of envelope DLL + * @param[in|out] env element to insert at the tail + */ +void +GNUNET_MQ_dll_insert_head (struct GNUNET_MQ_Envelope **env_head, + struct GNUNET_MQ_Envelope **env_tail, + struct GNUNET_MQ_Envelope *env) +{ + + GNUNET_CONTAINER_DLL_insert (*env_head, *env_tail, env); +} + + /** * Insert @a env into the envelope DLL starting at @a env_head * Note that @a env must not be in any MQ while this function -- cgit v1.2.3