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, 17 insertions, 4 deletions
diff --git a/src/auditordb/pg_get_auditor_closure_lags.c b/src/auditordb/pg_get_auditor_closure_lags.c index 0cf9bcf72..18a506cba 100644 --- a/src/auditordb/pg_get_auditor_closure_lags.c +++ b/src/auditordb/pg_get_auditor_closure_lags.c @@ -1,7 +1,18 @@ -// -// Created by parallels on 27/03/24. -// +/* + This file is part of TALER + Copyright (C) 2024 Taler Systems SA + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ #include "platform.h" #include "taler_error_codes.h" @@ -103,11 +114,13 @@ TAH_PG_get_auditor_closure_lags ( void *cb_cls) { + uint64_t plimit = (uint64_t) ((limit < 0) ? -limit : limit); + struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_uint64 (&offset), GNUNET_PQ_query_param_bool (return_suppressed), - GNUNET_PQ_query_param_int64 (&limit), + GNUNET_PQ_query_param_uint64 (&plimit), GNUNET_PQ_query_param_end }; |