diff options
author | Gabor X Toth <*@tg-x.net> | 2016-08-17 22:28:47 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-08-17 22:28:47 +0000 |
commit | 4f51ef196f6dff91fd83085462fd9c4624f7296b (patch) | |
tree | d746490910d6653bb25fc90a5432d982418af096 /src/util/mq.c | |
parent | 667cc67f8224ccf4ff391b125a614cf90cf5917e (diff) | |
download | gnunet-4f51ef196f6dff91fd83085462fd9c4624f7296b.tar.gz gnunet-4f51ef196f6dff91fd83085462fd9c4624f7296b.zip |
GNUNET_MQ_get_last_envelope()
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index bea5eb304..b971fdefd 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -82,7 +82,7 @@ struct GNUNET_MQ_Envelope | |||
82 | * Did the application call #GNUNET_MQ_env_set_options()? | 82 | * Did the application call #GNUNET_MQ_env_set_options()? |
83 | */ | 83 | */ |
84 | int have_custom_options; | 84 | int have_custom_options; |
85 | 85 | ||
86 | }; | 86 | }; |
87 | 87 | ||
88 | 88 | ||
@@ -159,7 +159,7 @@ struct GNUNET_MQ_Handle | |||
159 | * #GNUNET_MQ_set_options(). Default is 0. | 159 | * #GNUNET_MQ_set_options(). Default is 0. |
160 | */ | 160 | */ |
161 | const void *default_extra; | 161 | const void *default_extra; |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Flags that were set for this queue by | 164 | * Flags that were set for this queue by |
165 | * #GNUNET_MQ_set_options(). Default is 0. | 165 | * #GNUNET_MQ_set_options(). Default is 0. |
@@ -1074,8 +1074,8 @@ GNUNET_MQ_send_cancel (struct GNUNET_MQ_Envelope *ev) | |||
1074 | 1074 | ||
1075 | 1075 | ||
1076 | /** | 1076 | /** |
1077 | * Function to obtain the current envelope from | 1077 | * Function to obtain the current envelope |
1078 | * within #GNUNET_MQ_SendImpl implementations. | 1078 | * from within #GNUNET_MQ_SendImpl implementations. |
1079 | * | 1079 | * |
1080 | * @param mq message queue to interrogate | 1080 | * @param mq message queue to interrogate |
1081 | * @return the current envelope | 1081 | * @return the current envelope |
@@ -1088,6 +1088,19 @@ GNUNET_MQ_get_current_envelope (struct GNUNET_MQ_Handle *mq) | |||
1088 | 1088 | ||
1089 | 1089 | ||
1090 | /** | 1090 | /** |
1091 | * Function to obtain the last envelope in the queue. | ||
1092 | * | ||
1093 | * @param mq message queue to interrogate | ||
1094 | * @return the last envelope in the queue | ||
1095 | */ | ||
1096 | struct GNUNET_MQ_Envelope * | ||
1097 | GNUNET_MQ_get_last_envelope (struct GNUNET_MQ_Handle *mq) | ||
1098 | { | ||
1099 | return mq->envelope_tail; | ||
1100 | } | ||
1101 | |||
1102 | |||
1103 | /** | ||
1091 | * Set application-specific options for this envelope. | 1104 | * Set application-specific options for this envelope. |
1092 | * Overrides the options set for the queue with | 1105 | * Overrides the options set for the queue with |
1093 | * #GNUNET_MQ_set_options() for this message only. | 1106 | * #GNUNET_MQ_set_options() for this message only. |
@@ -1119,7 +1132,7 @@ GNUNET_MQ_env_get_options (struct GNUNET_MQ_Envelope *env, | |||
1119 | uint64_t *flags) | 1132 | uint64_t *flags) |
1120 | { | 1133 | { |
1121 | struct GNUNET_MQ_Handle *mq = env->parent_queue; | 1134 | struct GNUNET_MQ_Handle *mq = env->parent_queue; |
1122 | 1135 | ||
1123 | if (GNUNET_YES == env->have_custom_options) | 1136 | if (GNUNET_YES == env->have_custom_options) |
1124 | { | 1137 | { |
1125 | *flags = env->flags; | 1138 | *flags = env->flags; |