/**
- * 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
GNUNET_MQ_get_current_envelope (struct GNUNET_MQ_Handle *mq);
+/**
+ * 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
* Did the application call #GNUNET_MQ_env_set_options()?
*/
int have_custom_options;
-
+
};
* #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.
/**
- * 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
}
+/**
+ * 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
uint64_t *flags)
{
struct GNUNET_MQ_Handle *mq = env->parent_queue;
-
+
if (GNUNET_YES == env->have_custom_options)
{
*flags = env->flags;