From ac950fbe61defd6d451d4e5096a877e4af016590 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 23 Mar 2016 11:34:24 +0100 Subject: switch to wid to comply with spec --- src/bank-lib/test_bank_api.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/bank-lib/test_bank_api.c') diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 232900f20..127c271d5 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -246,10 +246,12 @@ interpreter_run (void *cls, * @param cls closure with the interpreter state * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request * 0 if the bank's reply is bogus (fails to follow the protocol) + * @param json detailed response from the HTTPD, or NULL if reply was not in JSON */ static void add_incoming_cb (void *cls, - unsigned int http_status) + unsigned int http_status, + json_t *json) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; @@ -258,6 +260,14 @@ add_incoming_cb (void *cls, if (cmd->expected_response_code != http_status) { GNUNET_break (0); + if (NULL != json) + { + fprintf (stderr, + "Unexpected response code %u:\n", + http_status); + json_dumpf (json, stderr, 0); + fprintf (stderr, "\n"); + } fail (is); return; } -- cgit v1.2.3