merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit b4e235730522c1109e4b2291918b874bee1a6c5f
parent 324c7be39568b644a3f177feef6ad8f148c1733f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 13 Jun 2026 20:59:03 +0200

refactor to use new more robust GNUNET_PQ_init() style to handle database connection drops better

Diffstat:
Msrc/backenddb/helper.h | 5-----
Msrc/backenddb/pg.c | 14+-------------
2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/src/backenddb/helper.h b/src/backenddb/helper.h @@ -39,11 +39,6 @@ struct TALER_MERCHANTDB_PostgresContext struct GNUNET_PQ_Context *conn; /** - * Directory with SQL statements to run to create tables. - */ - char *sql_dir; - - /** * Underlying configuration. */ const struct GNUNET_CONFIGURATION_Handle *cfg; diff --git a/src/backenddb/pg.c b/src/backenddb/pg.c @@ -40,7 +40,7 @@ struct TALER_MERCHANTDB_PostgresContext; * database. Gives the application a chance to run some * per-connection initialization logic. * - * @param pg database conntext in the auditor + * @param pg database context in the merchant backend * @param pq database connection handle */ static void @@ -71,18 +71,6 @@ TALER_MERCHANTDB_connect ( pg = GNUNET_new (struct TALER_MERCHANTDB_PostgresContext); pg->cfg = cfg; - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_filename (cfg, - "merchantdb-postgres", - "SQL_DIR", - &pg->sql_dir)) - { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "merchantdb-postgres", - "SQL_DIR"); - GNUNET_free (pg); - return NULL; - } pg->conn = GNUNET_PQ_init (pg->cfg, "merchantdb-postgres", &reconnect_cb,