exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 41594e06f363996b2df6e6698f376f09ecd95aea
parent f2b0e010be719916c53f2dba468c8cc655b3d0fe
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun, 12 Apr 2026 19:05:27 +0200

no longer a plugin

Diffstat:
Msrc/auditordb/meson.build | 2+-
Asrc/auditordb/pg.c | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsrc/auditordb/plugin_auditordb_postgres.c | 61-------------------------------------------------------------
3 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/src/auditordb/meson.build b/src/auditordb/meson.build @@ -110,7 +110,7 @@ libtalerauditordb = library( 'insert_wire_format_inconsistency.c', 'insert_wire_out_inconsistency.c', 'lookup_reserve_in_inconsistency.c', - 'plugin_auditordb_postgres.c', + 'pg.c', 'preflight.c', 'select_early_aggregations.c', 'select_historic_denom_revenue.c', diff --git a/src/auditordb/pg.c b/src/auditordb/pg.c @@ -0,0 +1,61 @@ +/* + This file is part of TALER + Copyright (C) 2014-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/> +*/ +/** + * @file pg.c + * @brief Low-level (statement-level) Postgres database access for the auditor + * @author Christian Grothoff + * @author Gabor X Toth + */ +#include "taler/taler_pq_lib.h" +#include <pthread.h> +#include <libpq-fe.h> +#include "taler/taler_auditordb_lib.h" +#include "pg_helper.h" + + +struct AUDITORDB_PostgresContext * +TALER_AUDITORDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, + bool skip_preflight) +{ + struct AUDITORDB_PostgresContext *pg; + + pg = GNUNET_new (struct AUDITORDB_PostgresContext); + pg->cfg = cfg; + if (GNUNET_OK != + TALER_config_get_currency (cfg, + "exchange", + &pg->currency)) + { + GNUNET_free (pg); + return NULL; + } + return pg; +} + + +void +TALER_AUDITORDB_disconnect (struct AUDITORDB_PostgresContext *pg) +{ + if (NULL == pg) + return; + if (NULL != pg->conn) + GNUNET_PQ_disconnect (pg->conn); + GNUNET_free (pg->currency); + GNUNET_free (pg); +} + + +/* end of plugin_auditordb_postgres.c */ diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c @@ -1,61 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014-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/> -*/ -/** - * @file plugin_auditordb_postgres.c - * @brief Low-level (statement-level) Postgres database access for the auditor - * @author Christian Grothoff - * @author Gabor X Toth - */ -#include "taler/taler_pq_lib.h" -#include <pthread.h> -#include <libpq-fe.h> -#include "taler/taler_auditordb_lib.h" -#include "pg_helper.h" - - -struct AUDITORDB_PostgresContext * -TALER_AUDITORDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, - bool skip_preflight) -{ - struct AUDITORDB_PostgresContext *pg; - - pg = GNUNET_new (struct AUDITORDB_PostgresContext); - pg->cfg = cfg; - if (GNUNET_OK != - TALER_config_get_currency (cfg, - "exchange", - &pg->currency)) - { - GNUNET_free (pg); - return NULL; - } - return pg; -} - - -void -TALER_AUDITORDB_disconnect (struct AUDITORDB_PostgresContext *pg) -{ - if (NULL == pg) - return; - if (NULL != pg->conn) - GNUNET_PQ_disconnect (pg->conn); - GNUNET_free (pg->currency); - GNUNET_free (pg); -} - - -/* end of plugin_auditordb_postgres.c */