diff options
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 fe47f6ab4..e0d7c9f34 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -377,6 +377,24 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, | |||
377 | 377 | ||
378 | 378 | ||
379 | /** | 379 | /** |
380 | * Function to copy an envelope. The envelope must not yet | ||
381 | * be in any queue or have any options or callbacks set. | ||
382 | * | ||
383 | * @param env envelope to copy | ||
384 | * @return copy of @a env | ||
385 | */ | ||
386 | struct GNUNET_MQ_Envelope * | ||
387 | GNUNET_MQ_env_copy (struct GNUNET_MQ_Envelope *env) | ||
388 | { | ||
389 | GNUNET_assert (NULL == env->next); | ||
390 | GNUNET_assert (NULL == env->parent_queue); | ||
391 | GNUNET_assert (NULL == env->sent_cb); | ||
392 | GNUNET_assert (GNUNET_NO == env->have_custom_options); | ||
393 | return GNUNET_MQ_msg_copy (env->mh); | ||
394 | } | ||
395 | |||
396 | |||
397 | /** | ||
380 | * Send a copy of a message with the given message queue. | 398 | * Send a copy of a message with the given message queue. |
381 | * Can be called repeatedly on the same envelope. | 399 | * Can be called repeatedly on the same envelope. |
382 | * | 400 | * |