gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37730 - in gnunet/src: include util


From: gnunet
Subject: [GNUnet-SVN] r37730 - in gnunet/src: include util
Date: Thu, 18 Aug 2016 00:28:47 +0200

Author: tg
Date: 2016-08-18 00:28:47 +0200 (Thu, 18 Aug 2016)
New Revision: 37730

Modified:
   gnunet/src/include/gnunet_mq_lib.h
   gnunet/src/util/mq.c
Log:
GNUNET_MQ_get_last_envelope()

Modified: gnunet/src/include/gnunet_mq_lib.h
===================================================================
--- gnunet/src/include/gnunet_mq_lib.h  2016-08-17 21:26:41 UTC (rev 37729)
+++ gnunet/src/include/gnunet_mq_lib.h  2016-08-17 22:28:47 UTC (rev 37730)
@@ -434,8 +434,8 @@
 
 
 /**
- * Function to obtain the current envelope from
- * within #GNUNET_MQ_SendImpl implementations.
+ * Function to obtain the current envelope
+ * from within #GNUNET_MQ_SendImpl implementations.
  *
  * @param mq message queue to interrogate
  * @return the current envelope
@@ -445,6 +445,16 @@
 
 
 /**
+ * Function to obtain the last envelope in the queue.
+ *
+ * @param mq message queue to interrogate
+ * @return the last envelope in the queue
+ */
+struct GNUNET_MQ_Envelope *
+GNUNET_MQ_get_last_envelope (struct GNUNET_MQ_Handle *mq);
+
+
+/**
  * Set application-specific options for this envelope.
  * Overrides the options set for the queue with
  * #GNUNET_MQ_set_options() for this message only.

Modified: gnunet/src/util/mq.c
===================================================================
--- gnunet/src/util/mq.c        2016-08-17 21:26:41 UTC (rev 37729)
+++ gnunet/src/util/mq.c        2016-08-17 22:28:47 UTC (rev 37730)
@@ -82,7 +82,7 @@
    * Did the application call #GNUNET_MQ_env_set_options()?
    */
   int have_custom_options;
-  
+
 };
 
 
@@ -159,7 +159,7 @@
    * #GNUNET_MQ_set_options().  Default is 0.
    */
   const void *default_extra;
-  
+
   /**
    * Flags that were set for this queue by
    * #GNUNET_MQ_set_options().   Default is 0.
@@ -1074,8 +1074,8 @@
 
 
 /**
- * Function to obtain the current envelope from
- * within #GNUNET_MQ_SendImpl implementations.
+ * Function to obtain the current envelope
+ * from within #GNUNET_MQ_SendImpl implementations.
  *
  * @param mq message queue to interrogate
  * @return the current envelope
@@ -1088,6 +1088,19 @@
 
 
 /**
+ * Function to obtain the last envelope in the queue.
+ *
+ * @param mq message queue to interrogate
+ * @return the last envelope in the queue
+ */
+struct GNUNET_MQ_Envelope *
+GNUNET_MQ_get_last_envelope (struct GNUNET_MQ_Handle *mq)
+{
+  return mq->envelope_tail;
+}
+
+
+/**
  * Set application-specific options for this envelope.
  * Overrides the options set for the queue with
  * #GNUNET_MQ_set_options() for this message only.
@@ -1119,7 +1132,7 @@
                           uint64_t *flags)
 {
   struct GNUNET_MQ_Handle *mq = env->parent_queue;
-  
+
   if (GNUNET_YES == env->have_custom_options)
   {
     *flags = env->flags;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]