commit 5c485d9eb1294d74f56fafc58e547ea32115afb2
parent 17d62b32745769195aa9a98223811ceebf149c91
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 29 Jun 2026 19:00:09 +0200
fix NULL handling
Diffstat:
6 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c
@@ -64,8 +64,9 @@ process_reserves (
&dc->history_fee_balance),
TALER_JSON_pack_time_abs_human ("expiration_date",
dc->expiration_date),
- TALER_JSON_pack_full_payto ("origin_account",
- dc->origin_account)
+ GNUNET_JSON_pack_allow_null (
+ TALER_JSON_pack_full_payto ("origin_account",
+ dc->origin_account))
);
GNUNET_break (0 ==
json_array_append_new (list,
diff --git a/src/auditordb/get_reserves.c b/src/auditordb/get_reserves.c
@@ -84,12 +84,15 @@ reserves_cb (void *cls,
&dc.history_fee_balance),
GNUNET_PQ_result_spec_absolute_time ("expiration_date",
&dc.expiration_date),
- GNUNET_PQ_result_spec_string ("origin_account",
- &dc.origin_account.full_payto),
+ GNUNET_PQ_result_spec_allow_null (
+ GNUNET_PQ_result_spec_string ("origin_account",
+ &dc.origin_account.full_payto),
+ NULL),
GNUNET_PQ_result_spec_end
};
enum GNUNET_GenericReturnValue rval;
+ dc.origin_account.full_payto = NULL;
if (GNUNET_OK !=
GNUNET_PQ_extract_result (result,
rs,
diff --git a/src/auditordb/get_row_inconsistency.c b/src/auditordb/get_row_inconsistency.c
@@ -163,7 +163,6 @@ TALER_AUDITORDB_get_row_inconsistency (
&row_inconsistency_cb,
&dcc);
-
if (qs > 0)
return dcc.qs;
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
diff --git a/src/auditordb/insert_reserve_info.c b/src/auditordb/insert_reserve_info.c
@@ -24,17 +24,12 @@
enum GNUNET_DB_QueryStatus
-TALER_AUDITORDB_insert_reserve_info (struct TALER_AUDITORDB_PostgresContext *pg,
- const struct TALER_ReservePublicKeyP *
- reserve_pub
- ,
- const struct
- TALER_AUDITORDB_ReserveFeeBalance *
- rfb,
- struct GNUNET_TIME_Timestamp
- expiration_date,
- const struct TALER_FullPayto origin_account
- )
+TALER_AUDITORDB_insert_reserve_info (
+ struct TALER_AUDITORDB_PostgresContext *pg,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_AUDITORDB_ReserveFeeBalance *rfb,
+ struct GNUNET_TIME_Timestamp expiration_date,
+ const struct TALER_FullPayto origin_account)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (reserve_pub),
diff --git a/src/include/taler/exchange/post-batch-deposit.h b/src/include/taler/exchange/post-batch-deposit.h
@@ -125,12 +125,6 @@ struct TALER_EXCHANGE_DepositContractDetail
struct TALER_FullPayto merchant_payto_uri;
/**
- * Policy extension specific details about the deposit relevant to the exchange.
- * Note: this should become an option in the future API!
- */
- const json_t *policy_details;
-
- /**
* Metadata to additionally include in the wire transfer subject.
* Note: this should become an option in the future API!
*/
diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c
@@ -462,7 +462,6 @@ batch_deposit_run (void *cls,
.merchant_payto_uri = payto_uri,
.wire_salt = wire_salt,
.h_contract_terms = h_contract_terms,
- .policy_details = NULL /* FIXME #7270-OEC */,
.wallet_timestamp = ds->wallet_timestamp,
.merchant_pub = ds->account_pub.merchant_pub,
.refund_deadline = ds->refund_deadline