diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-21 14:00:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-21 14:00:29 +0200 |
commit | f93a0592b29b66c6bbacbb38f42e8dfd5a3a6aee (patch) | |
tree | b0bc2b8a6a84919980e6b9a844ac773da26cfc5e /src/exchange/taler-exchange-httpd_transfers_get.c | |
parent | a51f39217ec3b659f938687e2146ceb17078733d (diff) | |
download | exchange-f93a0592b29b66c6bbacbb38f42e8dfd5a3a6aee.tar.gz exchange-f93a0592b29b66c6bbacbb38f42e8dfd5a3a6aee.tar.bz2 exchange-f93a0592b29b66c6bbacbb38f42e8dfd5a3a6aee.zip |
-change handler signatures to prepare for long polling support
Diffstat (limited to 'src/exchange/taler-exchange-httpd_transfers_get.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_transfers_get.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/exchange/taler-exchange-httpd_transfers_get.c b/src/exchange/taler-exchange-httpd_transfers_get.c index c4e276cc3..9fd343a53 100644 --- a/src/exchange/taler-exchange-httpd_transfers_get.c +++ b/src/exchange/taler-exchange-httpd_transfers_get.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2018 Taler Systems SA + Copyright (C) 2014-2018, 2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -499,23 +499,13 @@ get_transfer_deposits (void *cls, } -/** - * Handle a GET "/transfers/$WTID" request. - * - * @param rh context of the handler - * @param connection the MHD connection to handle - * @param args array of additional options (length: 1, just the wtid) - * @return MHD result code - */ MHD_RESULT -TEH_handler_transfers_get (const struct TEH_RequestHandler *rh, - struct MHD_Connection *connection, +TEH_handler_transfers_get (struct TEH_RequestContext *rc, const char *const args[1]) { struct WtidTransactionContext ctx; MHD_RESULT mhd_ret; - (void) rh; memset (&ctx, 0, sizeof (ctx)); @@ -526,13 +516,13 @@ TEH_handler_transfers_get (const struct TEH_RequestHandler *rh, sizeof (ctx.wtid))) { GNUNET_break_op (0); - return TALER_MHD_reply_with_error (connection, + return TALER_MHD_reply_with_error (rc->connection, MHD_HTTP_BAD_REQUEST, TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_MALFORMED, args[0]); } if (GNUNET_OK != - TEH_DB_run_transaction (connection, + TEH_DB_run_transaction (rc->connection, "run transfers GET", &mhd_ret, &get_transfer_deposits, @@ -541,7 +531,7 @@ TEH_handler_transfers_get (const struct TEH_RequestHandler *rh, free_ctx (&ctx); return mhd_ret; } - mhd_ret = reply_transfer_details (connection, + mhd_ret = reply_transfer_details (rc->connection, &ctx.total, &ctx.merchant_pub, &ctx.h_wire, |