diff options
Diffstat (limited to 'src/exchangedb/pg_do_batch_withdraw.c')
-rw-r--r-- | src/exchangedb/pg_do_batch_withdraw.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/exchangedb/pg_do_batch_withdraw.c b/src/exchangedb/pg_do_batch_withdraw.c index 3dee20d22..45b1d3229 100644 --- a/src/exchangedb/pg_do_batch_withdraw.c +++ b/src/exchangedb/pg_do_batch_withdraw.c @@ -17,6 +17,7 @@ * @file exchangedb/pg_do_batch_withdraw.c * @brief Implementation of the do_batch_withdraw function for Postgres * @author Christian Grothoff + * @author Özgür Kesim */ #include "platform.h" #include "taler_error_codes.h" @@ -32,8 +33,11 @@ TEH_PG_do_batch_withdraw ( struct GNUNET_TIME_Timestamp now, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *amount, + bool do_age_check, bool *found, bool *balance_ok, + bool *age_ok, + uint16_t *allowed_maximum_age, uint64_t *ruuid) { struct PostgresClosure *pg = cls; @@ -43,6 +47,7 @@ TEH_PG_do_batch_withdraw ( GNUNET_PQ_query_param_auto_from_type (reserve_pub), GNUNET_PQ_query_param_timestamp (&now), GNUNET_PQ_query_param_timestamp (&gc), + GNUNET_PQ_query_param_bool (do_age_check), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -50,6 +55,10 @@ TEH_PG_do_batch_withdraw ( found), GNUNET_PQ_result_spec_bool ("balance_ok", balance_ok), + GNUNET_PQ_result_spec_bool ("age_ok", + age_ok), + GNUNET_PQ_result_spec_uint16 ("allowed_maximum_age", + allowed_maximum_age), GNUNET_PQ_result_spec_uint64 ("ruuid", ruuid), GNUNET_PQ_result_spec_end @@ -67,9 +76,11 @@ TEH_PG_do_batch_withdraw ( "SELECT " " reserve_found" ",balance_ok" + ",age_ok" + ",allowed_maximum_age" ",ruuid" " FROM exchange_do_batch_withdraw" - " ($1,$2,$3,$4,$5);"); + " ($1,$2,$3,$4,$5,$6);"); return GNUNET_PQ_eval_prepared_singleton_select (pg->conn, "call_batch_withdraw", params, |