diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-07-31 22:50:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-07-31 22:50:21 +0200 |
commit | 1db139a7f3b74b2dc4135ab8b42d625415705d63 (patch) | |
tree | dbbd66f083001bdefc9b029c1f45a5c2cf93697e /src/authorization/anastasis_authorization_plugin_sms.c | |
parent | 812423c3872dce704ce9161127c7ebfbb7034fbe (diff) | |
download | anastasis-1db139a7f3b74b2dc4135ab8b42d625415705d63.tar.gz anastasis-1db139a7f3b74b2dc4135ab8b42d625415705d63.tar.bz2 anastasis-1db139a7f3b74b2dc4135ab8b42d625415705d63.zip |
-eliminating some legacy json_pack calls from Anastasis
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_sms.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_sms.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_sms.c b/src/authorization/anastasis_authorization_plugin_sms.c index 01b5f73..0cd36c5 100644 --- a/src/authorization/anastasis_authorization_plugin_sms.c +++ b/src/authorization/anastasis_authorization_plugin_sms.c @@ -433,18 +433,14 @@ sms_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", - end); - 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", + end)); } else { |