donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 274e324fa7f7dcbebeebfc43f5dfeab6c777160f
parent 3c1e637e47445327ab45f9291ef63b590153d54c
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date:   Sat, 13 Jan 2024 00:20:16 +0100

Merge remote-tracking branch 'refs/remotes/origin/master'

Diffstat:
Msrc/donau-tools/Makefile.am | 2+-
Msrc/donau/Makefile.am | 3++-
Msrc/donaudb/Makefile.am | 23+++++++++++------------
Msrc/donaudb/plugin_donaudb_postgres.c | 19+++++++++++--------
Msrc/lib/Makefile.am | 3++-
Msrc/testing/Makefile.am | 2+-
6 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/src/donau-tools/Makefile.am b/src/donau-tools/Makefile.am @@ -19,9 +19,9 @@ donau_dbinit_SOURCES = \ donau_dbinit_LDADD = \ $(LIBGCRYPT_LIBS) \ $(top_builddir)/src/util/libdonauutil.la \ - $(top_builddir)/src/pq/libtalerpq.la \ $(top_builddir)/src/donaudb/libdonaudb.la \ -lgnunetutil \ + -ltalerpq \ $(XLIB) donau_dbinit_CPPFLAGS = \ -I$(top_srcdir)/src/include \ diff --git a/src/donau/Makefile.am b/src/donau/Makefile.am @@ -21,12 +21,13 @@ bin_PROGRAMS = \ donau_httpd_LDADD = \ $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/donaudb/libdonaudb.la \ $(top_builddir)/src/util/libdonauutil.la \ -lmicrohttpd \ -ltalermhd \ -ltalerutil \ + -ltalerjson \ + -ltalerpq \ -lgnunetcurl \ -lgnunetutil \ -lgnunetjson \ diff --git a/src/donaudb/Makefile.am b/src/donaudb/Makefile.am @@ -65,7 +65,6 @@ plugin_LTLIBRARIES = \ libtaler_plugin_donaudb_postgres.la endif - libtaler_plugin_donaudb_postgres_la_SOURCES = \ plugin_donaudb_postgres.c pg_helper.h \ pg_preflight.h pg_preflight.c \ @@ -90,20 +89,20 @@ libtaler_plugin_donaudb_postgres_la_SOURCES = \ pg_insert_history_entry.h pg_insert_history_entry.c \ pg_insert_issued_receipt.h pg_insert_issued_receipt.c \ pg_insert_submitted_receipt.h pg_insert_submitted_receipt.c - + + libtaler_plugin_donaudb_postgres_la_LIBADD = \ - $(LTLIBINTL) -libtaler_plugin_donaudb_postgres_la_LDFLAGS = \ - $(TALER_PLUGIN_LDFLAGS) \ - $(top_builddir)/src/pq/libtalerpq.la \ - $(top_builddir)/src/json/libtalerjson.la \ + $(LTLIBINTL) \ $(top_builddir)/src/util/libdonauutil.la \ - -lpq \ - -lpthread \ + -ltalerpq \ + -ltalerutil \ -lgnunetpq \ -lgnunetutil \ - -ljansson \ + -lpq \ $(XLIB) +libtaler_plugin_donaudb_postgres_la_LDFLAGS = \ + $(TALER_PLUGIN_LDFLAGS) + lib_LTLIBRARIES = \ libdonaudb.la @@ -132,12 +131,12 @@ test_donaudb_postgres_SOURCES = \ test_donaudb.c test_donaudb_postgres_LDADD = \ libdonaudb.la \ - $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libdonauutil.la \ - $(top_builddir)/src/pq/libtalerpq.la \ -ljansson \ -lgnunetjson \ -lgnunetutil \ + -ltalerjson \ + -ltalerpq \ $(XLIB) EXTRA_test_donaudb_postgres_DEPENDENCIES = \ diff --git a/src/donaudb/plugin_donaudb_postgres.c b/src/donaudb/plugin_donaudb_postgres.c @@ -58,6 +58,7 @@ #include "pg_lookup_signing_key.h" #include "pg_lookup_charity.h" #include "pg_get_charities.h" +#include "pg_insert_charity.h" /** * Set to 1 to enable Postgres auto_explain module. This will @@ -74,14 +75,14 @@ * @param conn SQL connection that was used */ #define BREAK_DB_ERR(result,conn) do { \ - GNUNET_break (0); \ - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \ - "Database failure: %s/%s/%s/%s/%s", \ - PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \ - PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \ - PQresultErrorMessage (result), \ - PQresStatus (PQresultStatus (result)), \ - PQerrorMessage (conn)); \ + GNUNET_break (0); \ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \ + "Database failure: %s/%s/%s/%s/%s", \ + PQresultErrorField (result, PG_DIAG_MESSAGE_PRIMARY), \ + PQresultErrorField (result, PG_DIAG_MESSAGE_DETAIL), \ + PQresultErrorMessage (result), \ + PQresStatus (PQresultStatus (result)), \ + PQerrorMessage (conn)); \ } while (0) @@ -296,6 +297,8 @@ libtaler_plugin_donaudb_postgres_init (void *cls) // = &DH_PG_lookup_signing_key; plugin->lookup_charity = &DH_PG_lookup_charity; + plugin->insert_charity + = &DH_PG_insert_charity; plugin->get_charities = &DH_PG_get_charities; diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am @@ -25,12 +25,13 @@ libdonau_la_SOURCES = \ ## maybe need libtalercurl libdonau_la_LIBADD = \ - $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libdonauutil.la \ -lgnunetcurl \ -lgnunetjson \ -lgnunetutil \ -ljansson \ + -ltalerpq \ + -ltalerjson \ $(LIBGNURLCURL_LIBS) \ $(XLIB) diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am @@ -42,11 +42,11 @@ test_donau_api_cs_LDADD = \ libdonautesting.la \ $(top_builddir)/src/lib/libdonau.la \ $(LIBGCRYPT_LIBS) \ - $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libdonauutil.la \ -lgnunetcurl \ -lgnunetutil \ -ljansson \ + -ltalerjson \ $(XLIB) test_donau_api_rsa_SOURCES = \