* 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.
mqm = GNUNET_MQ_msg_ (mhp, size, type);
GNUNET_memcpy ((char *) mqm->mh + base_size,
- nested_mh,
- ntohs (nested_mh->size));
+ nested_mh,
+ ntohs (nested_mh->size));
return mqm;
}
/**
- * 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)
+{
+ if (NULL != mq->envelope_tail)
+ return mq->envelope_tail;
+
+ return mq->current_envelope;
+}
+
+
/**
* 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;