diff options
Diffstat (limited to 'src/auditordb/pg_get_auditor_closure_lags.c')
-rw-r--r-- | src/auditordb/pg_get_auditor_closure_lags.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/auditordb/pg_get_auditor_closure_lags.c b/src/auditordb/pg_get_auditor_closure_lags.c index de59e377b..a1291fc51 100644 --- a/src/auditordb/pg_get_auditor_closure_lags.c +++ b/src/auditordb/pg_get_auditor_closure_lags.c @@ -2,8 +2,6 @@ // Created by parallels on 27/03/24. // -#include "pg_get_auditor_closure_lags.h" - #include "platform.h" #include "taler_error_codes.h" @@ -11,6 +9,8 @@ #include "taler_pq_lib.h" #include "pg_helper.h" +#include "pg_get_auditor_closure_lags.h" + struct ClosureLagsContext { @@ -18,7 +18,7 @@ struct ClosureLagsContext /** * Function to call for each closure lag . */ - struct TALER_AUDITORDB_ClosureLagsCallback cb; + TALER_AUDITORDB_ClosureLagsCallback cb; /** * Closure for @e cb @@ -51,7 +51,7 @@ closure_lags_cb (void *cls, PGresult *result, unsigned int num_results) { - struct ClosureLagsContextContext *dcc = cls; + struct ClosureLagsContext *dcc = cls; struct PostgresClosure *pg = dcc->pg; for (unsigned int i = 0; i < num_results; i++) @@ -62,18 +62,10 @@ closure_lags_cb (void *cls, struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("row_id", &serial_id), -// -// GNUNET_PQ_result_spec_auto_from_type ("operation", &dc.operation), -// TALER_PQ_RESULT_SPEC_AMOUNT ("amount", &dc.amount), -// -// GNUNET_PQ_result_spec_bool ("profitable", &dc.profitable), - GNUNET_PQ_result_spec_int64 ("deadline", &dc.deadline), - GNUNET_PQ_result_spec_int64 ("wtid", &dc.wtid), - - GNUNET_PQ_result_spec_string ("account", *dc.account), + GNUNET_PQ_result_spec_string ("account", &dc.account), GNUNET_PQ_result_spec_end }; @@ -106,7 +98,7 @@ TAH_PG_get_closure_lags ( void *cls, uint64_t start_id, bool return_suppressed, // maybe not needed - struct TALER_AUDITORDB_ClosureLagsCallback cb, + TALER_AUDITORDB_ClosureLagsCallback cb, void *cb_cls) { @@ -116,6 +108,7 @@ TAH_PG_get_closure_lags ( GNUNET_PQ_query_param_bool (return_suppressed), GNUNET_PQ_query_param_end }; + struct ClosureLagsContext dcc = { .cb = cb, .cb_cls = cb_cls, |