diff options
Diffstat (limited to 'src/bank-lib/bank_api_reject.c')
-rw-r--r-- | src/bank-lib/bank_api_reject.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/bank-lib/bank_api_reject.c b/src/bank-lib/bank_api_reject.c index 00a49bd16..5e7a1ac29 100644 --- a/src/bank-lib/bank_api_reject.c +++ b/src/bank-lib/bank_api_reject.c @@ -70,15 +70,16 @@ struct TALER_BANK_RejectHandle * * @param cls the `struct TALER_BANK_RejectHandle` * @param response_code HTTP response code, 0 on error - * @param json parsed JSON result, NULL on error + * @param response parsed JSON result, NULL on error */ static void handle_reject_finished (void *cls, long response_code, - const json_t *json) + const void *response) { struct TALER_BANK_RejectHandle *rh = cls; enum TALER_ErrorCode ec; + const json_t *j = response; rh->job = NULL; switch (response_code) @@ -97,27 +98,27 @@ handle_reject_finished (void *cls, case MHD_HTTP_BAD_REQUEST: /* This should never happen, either us or the bank is buggy (or API version conflict); just pass JSON reply to the application */ - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); break; case MHD_HTTP_FORBIDDEN: /* Access denied */ - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); break; case MHD_HTTP_UNAUTHORIZED: /* Nothing really to verify, bank says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON reply to the application */ - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); break; case MHD_HTTP_NOT_FOUND: /* Nothing really to verify, this should never happen, we should pass the JSON reply to the application */ - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); break; case MHD_HTTP_INTERNAL_SERVER_ERROR: /* Server had an internal issue; we should retry, but this API leaves this to the application */ - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); break; default: /* unexpected response code */ @@ -125,7 +126,7 @@ handle_reject_finished (void *cls, "Unexpected response code %u\n", (unsigned int) response_code); GNUNET_break (0); - ec = TALER_BANK_parse_ec_ (json); + ec = TALER_BANK_parse_ec_ (j); response_code = 0; break; } @@ -215,7 +216,7 @@ TALER_BANK_reject (struct GNUNET_CURL_Context *ctx, rh->job = GNUNET_CURL_job_add (ctx, eh, GNUNET_NO, - (GC_JCC) &handle_reject_finished, + &handle_reject_finished, rh); return rh; } |