aboutsummaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-22 17:32:15 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-22 17:32:15 +0100
commit88a0df3dcc38c6e82f483bff386c87d8e1ec4459 (patch)
treec086b6c30a6fc54e0d72aabe7857f3b659915caa /src/util/mq.c
parent85088f7eedd1146890a5ce9af05fff934a5b1b8d (diff)
downloadgnunet-88a0df3dcc38c6e82f483bff386c87d8e1ec4459.tar.gz
gnunet-88a0df3dcc38c6e82f483bff386c87d8e1ec4459.zip
converting 'vpn' to new CADET API, not tested/testable, as exit is not converted yet
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index e0d7c9f34..95bcd71cb 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -377,6 +377,28 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
377 377
378 378
379/** 379/**
380 * Remove the first envelope that has not yet been sent from the message
381 * queue and return it.
382 *
383 * @param mq queue to remove envelope from
384 * @return NULL if queue is empty (or has no envelope that is not under transmission)
385 */
386struct GNUNET_MQ_Envelope *
387GNUNET_MQ_unsent_head (struct GNUNET_MQ_Handle *mq)
388{
389 struct GNUNET_MQ_Envelope *env;
390
391 env = mq->envelope_head;
392 GNUNET_CONTAINER_DLL_remove (mq->envelope_head,
393 mq->envelope_tail,
394 env);
395 mq->queue_length--;
396 env->parent_queue = NULL;
397 return env;
398}
399
400
401/**
380 * Function to copy an envelope. The envelope must not yet 402 * Function to copy an envelope. The envelope must not yet
381 * be in any queue or have any options or callbacks set. 403 * be in any queue or have any options or callbacks set.
382 * 404 *