diff options
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_post.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_post.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c index dddd273..30cea88 100644 --- a/src/authorization/anastasis_authorization_plugin_post.c +++ b/src/authorization/anastasis_authorization_plugin_post.c | |||
@@ -24,7 +24,8 @@ | |||
24 | #include <taler/taler_json_lib.h> | 24 | #include <taler/taler_json_lib.h> |
25 | #include <jansson.h> | 25 | #include <jansson.h> |
26 | #include "anastasis_util_lib.h" | 26 | #include "anastasis_util_lib.h" |
27 | 27 | #include <gnunet/gnunet_db_lib.h> | |
28 | #include "anastasis_database_lib.h" | ||
28 | 29 | ||
29 | /** | 30 | /** |
30 | * Saves the State of a authorization plugin. | 31 | * Saves the State of a authorization plugin. |
@@ -277,7 +278,20 @@ post_start (void *cls, | |||
277 | struct PostContext *ctx = cls; | 278 | struct PostContext *ctx = cls; |
278 | struct ANASTASIS_AUTHORIZATION_State *as; | 279 | struct ANASTASIS_AUTHORIZATION_State *as; |
279 | json_error_t error; | 280 | json_error_t error; |
280 | 281 | enum GNUNET_DB_QueryStatus qs; | |
282 | |||
283 | /* If the user can show this challenge code, this | ||
284 | plugin is already happy (no additional | ||
285 | requirements), so mark this challenge as | ||
286 | already satisfied from the start. */ | ||
287 | qs = ctx->ac->db->mark_challenge_code_satisfied (ctx->ac->db->cls, | ||
288 | truth_uuid, | ||
289 | code); | ||
290 | if (qs <= 0) | ||
291 | { | ||
292 | GNUNET_break (0); | ||
293 | return NULL; | ||
294 | } | ||
281 | as = GNUNET_new (struct ANASTASIS_AUTHORIZATION_State); | 295 | as = GNUNET_new (struct ANASTASIS_AUTHORIZATION_State); |
282 | as->trigger = trigger; | 296 | as->trigger = trigger; |
283 | as->trigger_cls = trigger_cls; | 297 | as->trigger_cls = trigger_cls; |