exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 0c68d975368f25d3fd0a8781f5fefa51de701cdc
parent 00438c8d26e29a9ac09e196eb6633e66ce8a82df
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  1 Nov 2024 06:27:10 +0100

fix taler-exchange-* tools

Diffstat:
Msrc/exchange/taler-exchange-closer.c | 4++--
Msrc/exchange/taler-exchange-drain.c | 8+++++---
Msrc/exchangedb/pg_wad_in_insert.c | 2+-
Msrc/exchangedb/pg_wad_in_insert.h | 2+-
Msrc/include/taler_exchangedb_plugin.h | 2+-
5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c @@ -214,7 +214,7 @@ static enum GNUNET_GenericReturnValue expired_reserve_cb (void *cls, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *left, - const char *account_payto_uri, + const struct TALER_FullPayto account_payto_uri, struct GNUNET_TIME_Timestamp expiration_date, uint64_t close_request_row) { @@ -240,7 +240,7 @@ expired_reserve_cb (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No wire account configured to deal with target URI `%s'\n", - account_payto_uri); + account_payto_uri.full_payto); global_ret = EXIT_FAILURE; GNUNET_SCHEDULER_shutdown (); return GNUNET_SYSERR; diff --git a/src/exchange/taler-exchange-drain.c b/src/exchange/taler-exchange-drain.c @@ -188,7 +188,7 @@ run_drain (void *cls) uint64_t serial; struct TALER_WireTransferIdentifierRawP wtid; char *account_section; - char *payto_uri; + struct TALER_FullPayto payto_uri; struct GNUNET_TIME_Timestamp request_timestamp; struct TALER_Amount amount; struct TALER_MasterSignatureP master_sig; @@ -265,7 +265,7 @@ run_drain (void *cls) fprintf (stdout, "We will wire %s to `%s'\n based on instructions from %s.\n", TALER_amount2s (&amount), - payto_uri, + payto_uri.full_payto, GNUNET_TIME_timestamp2s (request_timestamp)); fprintf (stdout, "Press ENTER to confirm, CTRL-D to abort.\n"); @@ -282,6 +282,7 @@ run_drain (void *cls) "Contact Taler Systems SA to cancel it for good.\n" "Exiting.\n"); db_plugin->rollback (db_plugin->cls); + GNUNET_free (payto_uri.full_payto); GNUNET_assert (NULL == task); GNUNET_SCHEDULER_shutdown (); global_ret = EXIT_FAILURE; @@ -305,7 +306,7 @@ run_drain (void *cls) &wtid, &buf, &buf_size); - method = TALER_payto_get_method (payto_uri); + method = TALER_payto_get_method (payto_uri.full_payto); qs = db_plugin->wire_prepare_data_insert (db_plugin->cls, method, buf, @@ -313,6 +314,7 @@ run_drain (void *cls) GNUNET_free (method); GNUNET_free (buf); } + GNUNET_free (payto_uri.full_payto); qs = db_plugin->profit_drains_set_finished (db_plugin->cls, serial); switch (qs) diff --git a/src/exchangedb/pg_wad_in_insert.c b/src/exchangedb/pg_wad_in_insert.c @@ -32,7 +32,7 @@ TEH_PG_wad_in_insert ( const char *origin_exchange_url, const struct TALER_Amount *amount, struct GNUNET_TIME_Timestamp execution_date, - const char *debit_account_uri, + const struct TALER_FullPayto debit_account_uri, const char *section_name, uint64_t serial_id) { diff --git a/src/exchangedb/pg_wad_in_insert.h b/src/exchangedb/pg_wad_in_insert.h @@ -45,7 +45,7 @@ TEH_PG_wad_in_insert ( const char *origin_exchange_url, const struct TALER_Amount *amount, struct GNUNET_TIME_Timestamp execution_date, - const char *debit_account_uri, + const struct TALER_FullPayto debit_account_uri, const char *section_name, uint64_t serial_id); diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h @@ -4020,7 +4020,7 @@ struct TALER_EXCHANGEDB_Plugin const char *origin_exchange_url, const struct TALER_Amount *amount, struct GNUNET_TIME_Timestamp execution_date, - const char *debit_account_uri, + const struct TALER_FullPayto debit_account_uri, const char *section_name, uint64_t serial_id);