aboutsummaryrefslogtreecommitdiff
path: root/src/util/mq.c
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-08-19 19:58:24 +0000
committerGabor X Toth <*@tg-x.net>2016-08-19 19:58:24 +0000
commit5cfa6bf5a9960c0deb302582037dadcaa8996575 (patch)
tree3b3cb67783021a20ad7ffdc761250ba556483d9b /src/util/mq.c
parent794a0b40accc0e21a8f6d1c61ee9aebe7450375f (diff)
downloadgnunet-5cfa6bf5a9960c0deb302582037dadcaa8996575.tar.gz
gnunet-5cfa6bf5a9960c0deb302582037dadcaa8996575.zip
GNUNET_MQ_get_last_envelope: return tail or current
Diffstat (limited to 'src/util/mq.c')
-rw-r--r--src/util/mq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index b971fdefd..b22d97f59 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -1096,7 +1096,10 @@ GNUNET_MQ_get_current_envelope (struct GNUNET_MQ_Handle *mq)
1096struct GNUNET_MQ_Envelope * 1096struct GNUNET_MQ_Envelope *
1097GNUNET_MQ_get_last_envelope (struct GNUNET_MQ_Handle *mq) 1097GNUNET_MQ_get_last_envelope (struct GNUNET_MQ_Handle *mq)
1098{ 1098{
1099 return mq->envelope_tail; 1099 if (NULL != mq->envelope_tail)
1100 return mq->envelope_tail;
1101
1102 return mq->current_envelope;
1100} 1103}
1101 1104
1102 1105