diff options
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_email.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_email.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_email.c b/src/authorization/anastasis_authorization_plugin_email.c index 33c400b..5448b7d 100644 --- a/src/authorization/anastasis_authorization_plugin_email.c +++ b/src/authorization/anastasis_authorization_plugin_email.c | |||
@@ -436,22 +436,19 @@ email_process (struct ANASTASIS_AUTHORIZATION_State *as, | |||
436 | if (TALER_MHD_xmime_matches (mime, | 436 | if (TALER_MHD_xmime_matches (mime, |
437 | "application/json")) | 437 | "application/json")) |
438 | { | 438 | { |
439 | json_t *body; | ||
440 | char *user; | 439 | char *user; |
441 | 440 | ||
442 | user = GNUNET_strndup (as->email, | 441 | user = GNUNET_strndup (as->email, |
443 | len); | 442 | len); |
444 | body = json_pack ("{s:I, s:s, s:s}", | 443 | resp = TALER_MHD_MAKE_JSON_PACK ( |
445 | "code", | 444 | GNUNET_JSON_pack_uint64 ("code", |
446 | TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED, | 445 | TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED), |
447 | "hint", | 446 | GNUNET_JSON_pack_string ("hint", |
448 | TALER_ErrorCode_get_hint ( | 447 | TALER_ErrorCode_get_hint ( |
449 | TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED), | 448 | TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED)), |
450 | "detail", | 449 | GNUNET_JSON_pack_string ("detail", |
451 | user); | 450 | user)); |
452 | GNUNET_free (user); | 451 | GNUNET_free (user); |
453 | GNUNET_break (NULL != body); | ||
454 | resp = TALER_MHD_make_json (body); | ||
455 | } | 452 | } |
456 | else | 453 | else |
457 | { | 454 | { |