diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-03-23 11:34:24 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-03-23 11:34:24 +0100 |
commit | ac950fbe61defd6d451d4e5096a877e4af016590 (patch) | |
tree | df38b200534e110e1d935916b34ea4152a56222d /src/bank-lib/test_bank_api.c | |
parent | 7f7ac5d92c6e29b80ec2055f2023657d330ffd1c (diff) | |
download | exchange-ac950fbe61defd6d451d4e5096a877e4af016590.tar.xz |
switch to wid to comply with spec
Diffstat (limited to 'src/bank-lib/test_bank_api.c')
-rw-r--r-- | src/bank-lib/test_bank_api.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; } |