summaryrefslogtreecommitdiff
path: root/src/backend/anastasis-httpd_policy_upload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/anastasis-httpd_policy_upload.c')
-rw-r--r--src/backend/anastasis-httpd_policy_upload.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/backend/anastasis-httpd_policy_upload.c b/src/backend/anastasis-httpd_policy_upload.c
index b8bd5ed..bff6028 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -329,19 +329,18 @@ proposal_cb (void *cls,
por->hr.http_status,
(int) por->hr.ec);
GNUNET_break (0);
- puc->resp = TALER_MHD_make_json_pack (
- "{s:I, s:s, s:I, s:I, s:O?}",
- "code",
- (json_int_t) TALER_EC_SYNC_PAYMENT_CREATE_BACKEND_ERROR,
- "hint",
- "Failed to setup order with merchant backend",
- "backend-ec",
- (json_int_t) por->hr.ec,
- "backend-http-status",
- (json_int_t) por->hr.http_status,
- "backend-reply",
- por->hr.reply);
- GNUNET_assert (NULL != puc->resp);
+ puc->resp = TALER_MHD_MAKE_JSON_PACK (
+ GNUNET_JSON_pack_uint64 ("code",
+ TALER_EC_SYNC_PAYMENT_CREATE_BACKEND_ERROR),
+ GNUNET_JSON_pack_string ("hint",
+ "Failed to setup order with merchant backend"),
+ GNUNET_JSON_pack_uint64 ("backend-ec",
+ por->hr.ec),
+ GNUNET_JSON_pack_uint64 ("backend-http-status",
+ por->hr.http_status),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_object_incref ("backend-reply",
+ (json_t *) por->hr.reply)));
puc->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
return;
}