commit 08f5ac735b83e8d947adea0d583512a0b46b61ab
parent 9b95a3f31988beb70cdf9cb85ef3a00520927fe9
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 27 Nov 2025 15:32:34 +0100
NULL is allowed
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/backenddb/pg_lookup_expected_transfers.c b/src/backenddb/pg_lookup_expected_transfers.c
@@ -79,12 +79,15 @@ lookup_expected_transfers_cb (void *cls,
struct GNUNET_TIME_Timestamp execution_time;
bool confirmed;
bool validated;
+ bool no_amount;
char *last_detail = NULL;
uint32_t last_http_status = 0;
uint32_t last_ec = TALER_EC_NONE;
struct GNUNET_PQ_ResultSpec rs[] = {
- TALER_PQ_result_spec_amount_with_currency ("expected_credit_amount",
- &expected_credit_amount),
+ GNUNET_PQ_result_spec_allow_null (
+ TALER_PQ_result_spec_amount_with_currency ("expected_credit_amount",
+ &expected_credit_amount),
+ &no_amount),
GNUNET_PQ_result_spec_auto_from_type ("wtid",
&wtid),
GNUNET_PQ_result_spec_string ("payto_uri",
@@ -124,7 +127,9 @@ lookup_expected_transfers_cb (void *cls,
validated = ( (MHD_HTTP_OK == last_http_status) &&
(TALER_EC_NONE == last_ec) );
ltc->cb (ltc->cb_cls,
- &expected_credit_amount,
+ no_amount
+ ? NULL
+ : &expected_credit_amount,
&wtid,
payto_uri,
exchange_url,