diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-04 14:29:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-04 14:29:15 +0200 |
commit | 9e7d3f90657dc2ac9905c8800bff79cd1c97ebd9 (patch) | |
tree | 0a300d457949440336ecc4230e5e8ee73e2d1b3f /src/exchange | |
parent | 0ad3de938e37cd4f34dd791283350ccfc09df2db (diff) |
address FIXMEs in bank service API
Diffstat (limited to 'src/exchange')
-rw-r--r-- | src/exchange/taler-exchange-transfer.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/exchange/taler-exchange-transfer.c b/src/exchange/taler-exchange-transfer.c index 255fe76a..ae2b4fe7 100644 --- a/src/exchange/taler-exchange-transfer.c +++ b/src/exchange/taler-exchange-transfer.c @@ -406,25 +406,17 @@ batch_done (void) * except for irrecoverable errors. * * @param cls `struct WirePrepareData` we are working on - * @param http_status_code #MHD_HTTP_OK on success - * @param ec taler error code - * @param row_id unique ID of the wire transfer in the bank's records - * @param wire_timestamp when did the transfer happen + * @param tr transfer response */ static void wire_confirm_cb (void *cls, - unsigned int http_status_code, - enum TALER_ErrorCode ec, - uint64_t row_id, - struct GNUNET_TIME_Timestamp wire_timestamp) + const struct TALER_BANK_TransferResponse *tr) { struct WirePrepareData *wpd = cls; enum GNUNET_DB_QueryStatus qs; - (void) row_id; - (void) wire_timestamp; wpd->eh = NULL; - switch (http_status_code) + switch (tr->http_status) { case MHD_HTTP_OK: GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -438,8 +430,8 @@ wire_confirm_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Wire transaction %llu failed: %u/%d\n", (unsigned long long) wpd->row_id, - http_status_code, - ec); + tr->http_status, + tr->ec); qs = db_plugin->wire_prepare_data_mark_failed (db_plugin->cls, wpd->row_id); /* continued below */ @@ -456,7 +448,7 @@ wire_confirm_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Wire transfer %llu failed (%u), trying again\n", (unsigned long long) wpd->row_id, - http_status_code); + tr->http_status); wpd->eh = TALER_BANK_transfer (ctx, wpd->wa->auth, &wpd[1], @@ -468,8 +460,8 @@ wire_confirm_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Wire transaction %llu failed: %u/%d\n", (unsigned long long) wpd->row_id, - http_status_code, - ec); + tr->http_status, + tr->ec); cleanup_wpd (); db_plugin->rollback (db_plugin->cls); global_ret = EXIT_FAILURE; @@ -479,8 +471,8 @@ wire_confirm_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Wire transfer %llu failed: %u/%d\n", (unsigned long long) wpd->row_id, - http_status_code, - ec); + tr->http_status, + tr->ec); db_plugin->rollback (db_plugin->cls); cleanup_wpd (); global_ret = EXIT_FAILURE; |