aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-11-01 06:27:10 +0100
committerChristian Grothoff <christian@grothoff.org>2024-11-05 10:37:37 +0100
commit0c68d975368f25d3fd0a8781f5fefa51de701cdc (patch)
tree0324ebff4352947d62e2e3ccf45b352e205f0cdc
parent00438c8d26e29a9ac09e196eb6633e66ce8a82df (diff)
fix taler-exchange-* tools
-rw-r--r--src/exchange/taler-exchange-closer.c4
-rw-r--r--src/exchange/taler-exchange-drain.c8
-rw-r--r--src/exchangedb/pg_wad_in_insert.c2
-rw-r--r--src/exchangedb/pg_wad_in_insert.h2
-rw-r--r--src/include/taler_exchangedb_plugin.h2
5 files changed, 10 insertions, 8 deletions
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c
index 95d0b7083..70c86658e 100644
--- 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
index b8d655a93..cb6ccd516 100644
--- 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
index 95d792b14..805784904 100644
--- 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
index d6c2b25c4..0b5a229ef 100644
--- 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
index 8f35dba1a..cb27c4f71 100644
--- 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);