diff options
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_post.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_post.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c index 1f20ff3..1240316 100644 --- a/src/authorization/anastasis_authorization_plugin_post.c +++ b/src/authorization/anastasis_authorization_plugin_post.c @@ -500,18 +500,14 @@ post_process (struct ANASTASIS_AUTHORIZATION_State *as, if (TALER_MHD_xmime_matches (mime, "application/json")) { - json_t *body; - - body = json_pack ("{s:I, s:s, s:s}", - "code", - TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED, - "hint", - TALER_ErrorCode_get_hint ( - TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED), - "detail", - zip); - GNUNET_break (NULL != body); - resp = TALER_MHD_make_json (body); + resp = TALER_MHD_MAKE_JSON_PACK ( + GNUNET_JSON_pack_uint64 ("code", + TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED), + GNUNET_JSON_pack_string ("hint", + TALER_ErrorCode_get_hint ( + TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED)), + GNUNET_JSON_pack_string ("detail", + zip)); } else { |