diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-22 16:49:08 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-22 16:49:08 +0100 |
commit | 85088f7eedd1146890a5ce9af05fff934a5b1b8d (patch) | |
tree | d344906e3022c6c80aa373b989f4bb26f18dc00e /src/util/mq.c | |
parent | 633bed1b616820d351b4ed3216273138a28587f2 (diff) |
converting 'pt' to new CADET API, not tested/testable, as exit/vpn are not converted yet
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index fe47f6ab42..e0d7c9f345 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -377,6 +377,24 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, /** + * Function to copy an envelope. The envelope must not yet + * be in any queue or have any options or callbacks set. + * + * @param env envelope to copy + * @return copy of @a env + */ +struct GNUNET_MQ_Envelope * +GNUNET_MQ_env_copy (struct GNUNET_MQ_Envelope *env) +{ + GNUNET_assert (NULL == env->next); + GNUNET_assert (NULL == env->parent_queue); + GNUNET_assert (NULL == env->sent_cb); + GNUNET_assert (GNUNET_NO == env->have_custom_options); + return GNUNET_MQ_msg_copy (env->mh); +} + + +/** * Send a copy of a message with the given message queue. * Can be called repeatedly on the same envelope. * |