exchange

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

commit 011c0388a55c8069bc990c1c96e37e3861d449a2
parent 856915a9558fb44afab21fc229b09833b77e92c2
Author: Nic Eigel <nic@eigel.ch>
Date:   Fri, 20 Sep 2024 15:14:04 +0200

auditor api switch to generic update

Diffstat:
Msrc/auditor/Makefile.am | 22----------------------
Msrc/auditor/taler-auditor-httpd.c | 137++++++++++++++++++++++++++++++++-----------------------------------------------
Dsrc/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h | 33---------------------------------
Dsrc/auditor/taler-auditor-httpd_bad-sig-losses-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_bad-sig-losses-upd.h | 33---------------------------------
Dsrc/auditor/taler-auditor-httpd_closure-lags-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_closure-lags-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_coin-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_coin-inconsistency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.c | 149-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h | 36------------------------------------
Dsrc/auditor/taler-auditor-httpd_denomination-pending-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_denomination-pending-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_denominations-without-sigs-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_denominations-without-sigs-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_deposit-confirmation-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_deposit-confirmation-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_emergency-by-count-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_emergency-by-count-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_emergency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_emergency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.h | 35-----------------------------------
Msrc/auditor/taler-auditor-httpd_patch_generic_suppressed.c | 1-
Dsrc/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h | 35-----------------------------------
Dsrc/auditor/taler-auditor-httpd_refreshes-hanging-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_refreshes-hanging-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h | 42------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h | 44--------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.c | 148-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h | 35-----------------------------------
Dsrc/auditor/taler-auditor-httpd_row-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_row-inconsistency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.h | 34----------------------------------
Dsrc/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.c | 147-------------------------------------------------------------------------------
Dsrc/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.h | 34----------------------------------
Msrc/auditordb/Makefile.am | 23-----------------------
Dsrc/auditordb/pg_delete_deposit_confirmations.c | 47-----------------------------------------------
Dsrc/auditordb/pg_delete_deposit_confirmations.h | 41-----------------------------------------
Dsrc/auditordb/pg_update_amount_arithmetic_inconsistency.c | 45---------------------------------------------
Dsrc/auditordb/pg_update_amount_arithmetic_inconsistency.h | 28----------------------------
Dsrc/auditordb/pg_update_bad_sig_losses.c | 45---------------------------------------------
Dsrc/auditordb/pg_update_bad_sig_losses.h | 28----------------------------
Dsrc/auditordb/pg_update_closure_lags.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_closure_lags.h | 29-----------------------------
Dsrc/auditordb/pg_update_coin_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_coin_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_denomination_pending.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_denomination_pending.h | 29-----------------------------
Dsrc/auditordb/pg_update_denominations_without_sigs.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_denominations_without_sigs.h | 29-----------------------------
Dsrc/auditordb/pg_update_deposit_confirmations.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_deposit_confirmations.h | 29-----------------------------
Dsrc/auditordb/pg_update_emergency.c | 44--------------------------------------------
Dsrc/auditordb/pg_update_emergency.h | 29-----------------------------
Dsrc/auditordb/pg_update_emergency_by_count.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_emergency_by_count.h | 29-----------------------------
Dsrc/auditordb/pg_update_fee_time_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_fee_time_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_misattribution_in_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_misattribution_in_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_purse_not_closed_inconsistencies.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_purse_not_closed_inconsistencies.h | 29-----------------------------
Dsrc/auditordb/pg_update_refreshes_hanging.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_refreshes_hanging.h | 29-----------------------------
Dsrc/auditordb/pg_update_reserve_balance_insufficient_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_reserve_balance_insufficient_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_reserve_in_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_reserve_in_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_reserve_not_closed_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_reserve_not_closed_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_row_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_row_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_row_minor_inconsistencies.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_row_minor_inconsistencies.h | 29-----------------------------
Dsrc/auditordb/pg_update_wire_format_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_wire_format_inconsistency.h | 29-----------------------------
Dsrc/auditordb/pg_update_wire_out_inconsistency.c | 48------------------------------------------------
Dsrc/auditordb/pg_update_wire_out_inconsistency.h | 29-----------------------------
Msrc/auditordb/plugin_auditordb_postgres.c | 29-----------------------------
Msrc/include/taler_auditordb_lib.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
96 files changed, 121 insertions(+), 5938 deletions(-)

diff --git a/src/auditor/Makefile.am b/src/auditor/Makefile.am @@ -195,11 +195,9 @@ taler_auditor_httpd_SOURCES = \ taler-auditor-httpd_spa.c taler-auditor-httpd_spa.h \ taler-auditor-httpd_deposit-confirmation.c taler-auditor-httpd_deposit-confirmation.h \ taler-auditor-httpd_deposit-confirmation-get.c taler-auditor-httpd_deposit-confirmation-get.h \ - taler-auditor-httpd_deposit-confirmation-upd.c taler-auditor-httpd_deposit-confirmation-upd.h \ taler-auditor-httpd_amount-arithmetic-inconsistency-get.c taler-auditor-httpd_amount-arithmetic-inconsistency-get.h \ taler-auditor-httpd_coin-inconsistency-get.c taler-auditor-httpd_coin-inconsistency-get.h \ taler-auditor-httpd_row-inconsistency-get.c taler-auditor-httpd_row-inconsistency-get.h \ - taler-auditor-httpd_amount-arithmetic-inconsistency-upd.c taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h \ taler-auditor-httpd_emergency-get.c taler-auditor-httpd_emergency-get.h \ taler-auditor-httpd_emergency-by-count-get.c taler-auditor-httpd_emergency-by-count-get.h \ taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.c taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.h \ @@ -208,43 +206,23 @@ taler_auditor_httpd_SOURCES = \ taler-auditor-httpd_patch_generic_suppressed.c taler-auditor-httpd_patch_generic_suppressed.h \ taler-auditor-httpd_delete_generic.c taler-auditor-httpd_delete_generic.h \ taler-auditor-httpd_bad-sig-losses-get.c taler-auditor-httpd_bad-sig-losses-get.h \ - taler-auditor-httpd_bad-sig-losses-upd.c taler-auditor-httpd_bad-sig-losses-upd.h \ taler-auditor-httpd_closure-lags-get.c taler-auditor-httpd_closure-lags-get.h \ taler-auditor-httpd_progress-get.c taler-auditor-httpd_progress-get.h \ taler-auditor-httpd_refreshes-hanging-get.c taler-auditor-httpd_refreshes-hanging-get.h \ - taler-auditor-httpd_emergency-by-count-upd.c taler-auditor-httpd_emergency-by-count-upd.h \ - taler-auditor-httpd_row-inconsistency-upd.c taler-auditor-httpd_row-inconsistency-upd.h \ - taler-auditor-httpd_purse-not-closed-inconsistencies-upd.c taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h \ - taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.c taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h \ - taler-auditor-httpd_coin-inconsistency-upd.c taler-auditor-httpd_coin-inconsistency-upd.h \ - taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.c taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h \ - taler-auditor-httpd_refreshes-hanging-upd.c taler-auditor-httpd_refreshes-hanging-upd.h \ - taler-auditor-httpd_emergency-upd.c taler-auditor-httpd_emergency-upd.h \ - taler-auditor-httpd_closure-lags-upd.c taler-auditor-httpd_closure-lags-upd.h \ taler-auditor-httpd_reserve-in-inconsistency-get.c taler-auditor-httpd_reserve-in-inconsistency-get.h \ - taler-auditor-httpd_reserve-in-inconsistency-upd.c taler-auditor-httpd_reserve-in-inconsistency-upd.h \ taler-auditor-httpd_reserve-not-closed-inconsistency-get.c taler-auditor-httpd_reserve-not-closed-inconsistency-get.h \ - taler-auditor-httpd_reserve-not-closed-inconsistency-upd.c taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h \ taler-auditor-httpd_denominations-without-sigs-get.c taler-auditor-httpd_denominations-without-sigs-get.h \ - taler-auditor-httpd_denominations-without-sigs-upd.c taler-auditor-httpd_denominations-without-sigs-upd.h \ taler-auditor-httpd_misattribution-in-inconsistency-get.c taler-auditor-httpd_misattribution-in-inconsistency-get.h \ - taler-auditor-httpd_misattribution-in-inconsistency-upd.c taler-auditor-httpd_misattribution-in-inconsistency-upd.h \ taler-auditor-httpd_reserves-get.c taler-auditor-httpd_reserves-get.h \ taler-auditor-httpd_purses-get.c taler-auditor-httpd_purses-get.h \ taler-auditor-httpd_historic-denomination-revenue-get.c taler-auditor-httpd_historic-denomination-revenue-get.h \ taler-auditor-httpd_denomination-pending-get.c taler-auditor-httpd_denomination-pending-get.h \ - taler-auditor-httpd_denomination-pending-upd.c taler-auditor-httpd_denomination-pending-upd.h \ taler-auditor-httpd_historic-reserve-summary-get.c taler-auditor-httpd_historic-reserve-summary-get.h \ taler-auditor-httpd_wire-format-inconsistency-get.c taler-auditor-httpd_wire-format-inconsistency-get.h \ - taler-auditor-httpd_wire-format-inconsistency-upd.c taler-auditor-httpd_wire-format-inconsistency-upd.h \ taler-auditor-httpd_wire-out-inconsistency-get.c taler-auditor-httpd_wire-out-inconsistency-get.h \ - taler-auditor-httpd_wire-out-inconsistency-upd.c taler-auditor-httpd_wire-out-inconsistency-upd.h \ taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.h \ - taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.c taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h \ taler-auditor-httpd_row-minor-inconsistencies-get.c taler-auditor-httpd_row-minor-inconsistencies-get.h \ - taler-auditor-httpd_row-minor-inconsistencies-upd.c taler-auditor-httpd_row-minor-inconsistencies-upd.h \ taler-auditor-httpd_fee-time-inconsistency-get.c taler-auditor-httpd_fee-time-inconsistency-get.h \ - taler-auditor-httpd_fee-time-inconsistency-upd.c taler-auditor-httpd_fee-time-inconsistency-upd.h \ taler-auditor-httpd_balances-get.c taler-auditor-httpd_balances-get.h \ taler-auditor-httpd_mhd.c taler-auditor-httpd_mhd.h taler_auditor_httpd_LDADD = \ diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c @@ -34,81 +34,35 @@ #include "taler-auditor-httpd_deposit-confirmation.h" #include "taler-auditor-httpd_deposit-confirmation-get.h" #include "taler-auditor-httpd_amount-arithmetic-inconsistency-get.h" -#include "taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h" #include "taler-auditor-httpd_coin-inconsistency-get.h" #include "taler-auditor-httpd_row-inconsistency-get.h" - #include "taler-auditor-httpd_emergency-get.h" - #include "taler-auditor-httpd_emergency-by-count-get.h" - #include \ "taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-get.h" - #include "taler-auditor-httpd_purse-not-closed-inconsistencies-get.h" - #include "taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.h" - #include "taler-auditor-httpd_bad-sig-losses-get.h" -#include "taler-auditor-httpd_bad-sig-losses-upd.h" - #include "taler-auditor-httpd_closure-lags-get.h" - #include "taler-auditor-httpd_refreshes-hanging-get.h" - #include "taler-auditor-httpd_mhd.h" #include "taler-auditor-httpd.h" - #include "taler-auditor-httpd_delete_generic.h" #include "taler-auditor-httpd_patch_generic_suppressed.h" -#include "taler-auditor-httpd_emergency-by-count-upd.h" -#include "taler-auditor-httpd_row-inconsistency-upd.h" -#include "taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h" -#include "taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h" -#include "taler-auditor-httpd_coin-inconsistency-upd.h" -#include \ - "taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h" -#include "taler-auditor-httpd_refreshes-hanging-upd.h" -#include "taler-auditor-httpd_emergency-upd.h" -#include "taler-auditor-httpd_closure-lags-upd.h" -#include "taler-auditor-httpd_row-minor-inconsistencies-upd.h" - #include "taler-auditor-httpd_reserve-in-inconsistency-get.h" -#include "taler-auditor-httpd_reserve-in-inconsistency-upd.h" - #include "taler-auditor-httpd_reserve-not-closed-inconsistency-get.h" -#include "taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h" - #include "taler-auditor-httpd_denominations-without-sigs-get.h" -#include "taler-auditor-httpd_denominations-without-sigs-upd.h" - #include "taler-auditor-httpd_misattribution-in-inconsistency-get.h" -#include "taler-auditor-httpd_misattribution-in-inconsistency-upd.h" - #include "taler-auditor-httpd_reserves-get.h" #include "taler-auditor-httpd_purses-get.h" - #include "taler-auditor-httpd_historic-denomination-revenue-get.h" #include "taler-auditor-httpd_historic-reserve-summary-get.h" - #include "taler-auditor-httpd_denomination-pending-get.h" -#include "taler-auditor-httpd_denomination-pending-upd.h" - #include "taler-auditor-httpd_wire-format-inconsistency-get.h" -#include "taler-auditor-httpd_wire-format-inconsistency-upd.h" - #include "taler-auditor-httpd_wire-out-inconsistency-get.h" -#include "taler-auditor-httpd_wire-out-inconsistency-upd.h" - #include "taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.h" -#include "taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h" - #include "taler-auditor-httpd_row-minor-inconsistencies-get.h" -#include "taler-auditor-httpd_row-minor-inconsistencies-upd.h" - #include "taler-auditor-httpd_fee-time-inconsistency-get.h" -#include "taler-auditor-httpd_fee-time-inconsistency-upd.h" - #include "taler-auditor-httpd_balances-get.h" #include "taler-auditor-httpd_progress-get.h" @@ -432,7 +386,8 @@ handle_mhd_request (void *cls, { "/monitoring/coin-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_COIN_INCONSISTENCY_handler_update, MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_COIN_INCONSISTENCY }, { "/monitoring/row-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -445,7 +400,8 @@ handle_mhd_request (void *cls, { "/monitoring/row-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_ROW_INCONSISTENCY_handler_update, MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_ROW_INCONSISTENCY }, { "/monitoring/bad-sig-losses", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -460,8 +416,9 @@ handle_mhd_request (void *cls, { "/monitoring/bad-sig-losses", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_BAD_SIG_LOSSES_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_BAD_SIG_LOSSES }, { "/monitoring/closure-lags", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -476,8 +433,9 @@ handle_mhd_request (void *cls, { "/monitoring/closure-lags", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_CLOSURE_LAGS_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_CLOSURE_LAGS }, { "/monitoring/emergency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -492,8 +450,9 @@ handle_mhd_request (void *cls, { "/monitoring/emergency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_EMERGENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_EMERGENCY }, { "/monitoring/refreshes-hanging", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -508,8 +467,9 @@ handle_mhd_request (void *cls, { "/monitoring/refreshes-hanging", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_REFRESHES_HANGING_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_REFRESHES_HANGING }, { "/monitoring/denomination-key-validity-withdraw-inconsistency", MHD_HTTP_METHOD_GET, "application/json", @@ -527,8 +487,9 @@ handle_mhd_request (void *cls, MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY }, { "/monitoring/reserve-balance-insufficient-inconsistency", MHD_HTTP_METHOD_GET, "application/json", @@ -546,8 +507,9 @@ handle_mhd_request (void *cls, MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY }, { "/monitoring/purse-not-closed-inconsistencies", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -562,8 +524,9 @@ handle_mhd_request (void *cls, { "/monitoring/purse-not-closed-inconsistencies", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY }, { "/monitoring/emergency-by-count", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -578,8 +541,9 @@ handle_mhd_request (void *cls, { "/monitoring/emergency-by-count", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_EMERGENCY_BY_COUNT_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_EMERGENCY_BY_COUNT }, { "/monitoring/reserve-in-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -594,8 +558,9 @@ handle_mhd_request (void *cls, { "/monitoring/reserve-in-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_RESERVE_IN_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY }, { "/monitoring/reserve-not-closed-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -610,8 +575,9 @@ handle_mhd_request (void *cls, { "/monitoring/reserve-not-closed-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_RESERVE_NOT_CLOSED_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY }, { "/monitoring/denominations-without-sigs", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -626,8 +592,9 @@ handle_mhd_request (void *cls, { "/monitoring/denominations-without-sigs", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_DENOMINATIONS_WITHOUT_SIGS_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG }, { "/monitoring/misattribution-in-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -642,8 +609,9 @@ handle_mhd_request (void *cls, { "/monitoring/misattribution-in-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY }, { "/monitoring/reserves", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -689,8 +657,9 @@ handle_mhd_request (void *cls, { "/monitoring/wire-format-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_WIRE_FORMAT_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY }, { "/monitoring/wire-out-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -705,8 +674,9 @@ handle_mhd_request (void *cls, { "/monitoring/wire-out-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_WIRE_OUT_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY }, { "/monitoring/reserve-balance-summary-wrong-inconsistency", MHD_HTTP_METHOD_GET, "application/json", @@ -724,8 +694,9 @@ handle_mhd_request (void *cls, MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY }, { "/monitoring/row-minor-inconsistencies", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -740,8 +711,9 @@ handle_mhd_request (void *cls, { "/monitoring/row-minor-inconsistencies", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_ROW_MINOR_INCONSISTENCIES_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY }, { "/monitoring/fee-time-inconsistency", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, @@ -756,8 +728,9 @@ handle_mhd_request (void *cls, { "/monitoring/fee-time-inconsistency", MHD_HTTP_METHOD_PATCH, "application/json", NULL, 0, - &TAH_FEE_TIME_INCONSISTENCY_handler_update, - MHD_HTTP_OK, true }, + &TAH_patch_handler_generic_suppressed, + MHD_HTTP_OK, true, + .table = TALER_AUDITORDB_FEE_TIME_INCONSISTENCY }, { "/monitoring/balances", MHD_HTTP_METHOD_GET, "application/json", NULL, 0, diff --git a/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h" - -MHD_RESULT -TAH_AMOUNT_ARITHMETIC_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[1] != NULL) - row_id = atoi (args[1]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_amount_arithmetic_inconsistency (TAH_plugin->cls, - &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h @@ -1,33 +0,0 @@ -/* - 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/> - */ - -#ifndef SRC_TALER_AUDITOR_HTTPD_AMOUNT_ARITHMETIC_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_AMOUNT_ARITHMETIC_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_AMOUNT_ARITHMETIC_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_bad-sig-losses-upd.c b/src/auditor/taler-auditor-httpd_bad-sig-losses-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_bad-sig-losses-upd.h" - -MHD_RESULT -TAH_BAD_SIG_LOSSES_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_bad_sig_losses (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_bad-sig-losses-upd.h b/src/auditor/taler-auditor-httpd_bad-sig-losses-upd.h @@ -1,33 +0,0 @@ -/* - 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/> - */ - -#ifndef SRC_TALER_AUDITOR_HTTPD_BAD_SIG_LOSSES_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_BAD_SIG_LOSSES_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_BAD_SIG_LOSSES_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_BAD_SIG_LOSSES_UPD_H diff --git a/src/auditor/taler-auditor-httpd_closure-lags-upd.c b/src/auditor/taler-auditor-httpd_closure-lags-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_closure-lags-upd.h" - -MHD_RESULT -TAH_CLOSURE_LAGS_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_closure_lags (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_closure-lags-upd.h b/src/auditor/taler-auditor-httpd_closure-lags-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_CLOSURE_LAGS_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_CLOSURE_LAGS_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_CLOSURE_LAGS_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_coin-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_coin-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_coin-inconsistency-upd.h" - -MHD_RESULT -TAH_COIN_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_coin_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_coin-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_coin-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_COIN_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_COIN_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_COIN_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.c @@ -1,149 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include \ - "taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h" - -MHD_RESULT -TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_denomination_key_validity_withdraw_inconsistency ( - TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_denomination-key-validity-withdraw-inconsistency-upd.h @@ -1,36 +0,0 @@ -/* - 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/> - */ - - -#ifndef \ - SRC_TALER_AUDITOR_HTTPD_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_UPD_H -#define \ - SRC_TALER_AUDITOR_HTTPD_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_denomination-pending-upd.c b/src/auditor/taler-auditor-httpd_denomination-pending-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_denomination-pending-upd.h" - -MHD_RESULT -TAH_DENOMINATION_PENDING_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_denomination_pending (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_denomination-pending-upd.h b/src/auditor/taler-auditor-httpd_denomination-pending-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_DENOMINATION_PENDING_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_DENOMINATION_PENDING_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_DENOMINATION_PENDING_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_denominations-without-sigs-upd.c b/src/auditor/taler-auditor-httpd_denominations-without-sigs-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_denominations-without-sigs-upd.h" - -MHD_RESULT -TAH_DENOMINATIONS_WITHOUT_SIGS_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_denominations_without_sigs (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_denominations-without-sigs-upd.h b/src/auditor/taler-auditor-httpd_denominations-without-sigs-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_DENOMINATIONS_WITHOUT_SIGS_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_DENOMINATIONS_WITHOUT_SIGS_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_DENOMINATIONS_WITHOUT_SIGS_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation-upd.c b/src/auditor/taler-auditor-httpd_deposit-confirmation-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_deposit-confirmation-upd.h" - -MHD_RESULT -TAH_DEPOSIT_CONFIRMATION_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_deposit_confirmations (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation-upd.h b/src/auditor/taler-auditor-httpd_deposit-confirmation-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_DEPOSIT_CONFIRMATION_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_DEPOSIT_CONFIRMATION_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_DEPOSIT_CONFIRMATION_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_emergency-by-count-upd.c b/src/auditor/taler-auditor-httpd_emergency-by-count-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_emergency-by-count-upd.h" - -MHD_RESULT -TAH_EMERGENCY_BY_COUNT_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_emergency_by_count (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_emergency-by-count-upd.h b/src/auditor/taler-auditor-httpd_emergency-by-count-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_EMERGENCY_BY_COUNT_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_EMERGENCY_BY_COUNT_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_EMERGENCY_BY_COUNT_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif diff --git a/src/auditor/taler-auditor-httpd_emergency-upd.c b/src/auditor/taler-auditor-httpd_emergency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_emergency-upd.h" - -MHD_RESULT -TAH_EMERGENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_emergency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_emergency-upd.h b/src/auditor/taler-auditor-httpd_emergency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_EMERGENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_EMERGENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_EMERGENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_EMERGENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_fee-time-inconsistency-upd.h" - -MHD_RESULT -TAH_FEE_TIME_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_fee_time_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_FEE_TIME_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_FEE_TIME_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_FEE_TIME_INCONSISTENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_FEE_TIME_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_misattribution-in-inconsistency-upd.h" - -MHD_RESULT -TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_misattribution_in_inconsistency (TAH_plugin->cls, - &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-upd.h @@ -1,35 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_MISATTRIBUTION_IN_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_MISATTRIBUTION_IN_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_update (struct - TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_MISATTRIBUTION_IN_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_patch_generic_suppressed.c b/src/auditor/taler-auditor-httpd_patch_generic_suppressed.c @@ -24,7 +24,6 @@ #include "taler_json_lib.h" #include "taler_mhd_lib.h" #include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_amount-arithmetic-inconsistency-upd.h" MHD_RESULT diff --git a/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.c b/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h" - -MHD_RESULT -TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_purse_not_closed_inconsistencies (TAH_plugin->cls, - &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h b/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-upd.h @@ -1,35 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_PURSE_NOT_CLOSED_INCONSISTENCIES_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_PURSE_NOT_CLOSED_INCONSISTENCIES_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_handler_update (struct - TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_PURSE_NOT_CLOSED_INCONSISTENCIES_UPD_H diff --git a/src/auditor/taler-auditor-httpd_refreshes-hanging-upd.c b/src/auditor/taler-auditor-httpd_refreshes-hanging-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_refreshes-hanging-upd.h" - -MHD_RESULT -TAH_REFRESHES_HANGING_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_refreshes_hanging (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_refreshes-hanging-upd.h b/src/auditor/taler-auditor-httpd_refreshes-hanging-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_REFRESHES_HANGING_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_REFRESHES_HANGING_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_REFRESHES_HANGING_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_REFRESHES_HANGING_UPD_H diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h" - -MHD_RESULT -TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_reserve_balance_insufficient_inconsistency ( - TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-upd.h @@ -1,42 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_update (struct - TAH_RequestHandler - *rh, - struct - MHD_Connection * - connection, - void ** - connection_cls, - const char * - upload_data, - size_t * - upload_data_size, - const char *const - args[]); - -#endif \ - // SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h" - -MHD_RESULT -TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_reserve_balance_summary_wrong_inconsistency ( - TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-upd.h @@ -1,44 +0,0 @@ -/* - 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/> - */ - - -#ifndef \ - SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_UPD_H -#define \ - SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_update (struct - TAH_RequestHandler - *rh, - struct - MHD_Connection * - connection, - void ** - connection_cls, - const char * - upload_data, - size_t * - upload_data_size, - const char * - const args[]); - -#endif \ - // SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_reserve-in-inconsistency-upd.h" - -MHD_RESULT -TAH_RESERVE_IN_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_reserve_in_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_RESERVE_IN_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_RESERVE_IN_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_RESERVE_IN_INCONSISTENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_RESERVE_IN_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.c @@ -1,148 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h" - -MHD_RESULT -TAH_RESERVE_NOT_CLOSED_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_reserve_not_closed_inconsistency (TAH_plugin->cls, - &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_reserve-not-closed-inconsistency-upd.h @@ -1,35 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_RESERVE_NOT_CLOSED_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_RESERVE_NOT_CLOSED_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_RESERVE_NOT_CLOSED_INCONSISTENCY_handler_update (struct - TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_RESERVE_NOT_CLOSED_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_row-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_row-inconsistency-upd.h" - -MHD_RESULT -TAH_ROW_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_row_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_row-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_ROW_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_ROW_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_ROW_INCONSISTENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_ROW_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.c b/src/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_row-minor-inconsistencies-upd.h" - -MHD_RESULT -TAH_ROW_MINOR_INCONSISTENCIES_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_row_minor_inconsistencies (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.h b/src/auditor/taler-auditor-httpd_row-minor-inconsistencies-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_ROW_MINOR_INCONSISTENCIES_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_ROW_MINOR_INCONSISTENCIES_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_ROW_MINOR_INCONSISTENCIES_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_ROW_MINOR_INCONSISTENCIES_UPD_H diff --git a/src/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_wire-format-inconsistency-upd.h" - -MHD_RESULT -TAH_WIRE_FORMAT_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_wire_format_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_wire-format-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_WIRE_FORMAT_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_WIRE_FORMAT_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_WIRE_FORMAT_INCONSISTENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_WIRE_FORMAT_INCONSISTENCY_UPD_H diff --git a/src/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.c b/src/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.c @@ -1,147 +0,0 @@ -/* - 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 <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_json_lib.h> -#include <jansson.h> -#include <microhttpd.h> -#include <pthread.h> -#include "taler_json_lib.h" -#include "taler_mhd_lib.h" -#include "taler-auditor-httpd.h" -#include "taler-auditor-httpd_wire-out-inconsistency-upd.h" - -MHD_RESULT -TAH_WIRE_OUT_INCONSISTENCY_handler_update ( - struct TAH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) -{ - enum GNUNET_DB_QueryStatus qs; - - if (GNUNET_SYSERR == - TAH_plugin->preflight (TAH_plugin->cls)) - { - GNUNET_break (0); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_SETUP_FAILED, - NULL); - } - - uint64_t row_id; - - if (args[2] != NULL) - row_id = atoi (args[2]); - else - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no row id specified"); - - - struct TALER_AUDITORDB_Generic_Update gu; - - gu.row_id = row_id; - - struct GNUNET_JSON_Specification spec[] = { - - // GNUNET_JSON_spec_uint64 ("row_id", &gu.row_id), - GNUNET_JSON_spec_bool ("suppressed", &gu.suppressed), - - GNUNET_JSON_spec_end () - }; - - json_t *json; - - (void) rh; - (void) connection_cls; - (void) upload_data; - (void) upload_data_size; - { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json); - return MHD_YES; /* failure */ - } - } - - /* execute transaction */ - qs = TAH_plugin->update_wire_out_inconsistency (TAH_plugin->cls, &gu); - - GNUNET_JSON_parse_free (spec); - json_decref (json); - - MHD_RESULT ret = MHD_NO; - - switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_DB_STORE_FAILED, - "update_account"); - break; - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_break (0); - ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, - "unexpected serialization problem"); - break; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_NOT_FOUND, - TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, - "no updates executed"); - break; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - ret = TALER_MHD_reply_static (connection, - MHD_HTTP_NO_CONTENT, - NULL, - NULL, - 0); - break; - } - - return ret; -} diff --git a/src/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.h b/src/auditor/taler-auditor-httpd_wire-out-inconsistency-upd.h @@ -1,34 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_TALER_AUDITOR_HTTPD_WIRE_OUT_INCONSISTENCY_UPD_H -#define SRC_TALER_AUDITOR_HTTPD_WIRE_OUT_INCONSISTENCY_UPD_H - - -#include <microhttpd.h> -#include "taler-auditor-httpd.h" - -MHD_RESULT -TAH_WIRE_OUT_INCONSISTENCY_handler_update (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]); - -#endif // SRC_TALER_AUDITOR_HTTPD_WIRE_OUT_INCONSISTENCY_UPD_H diff --git a/src/auditordb/Makefile.am b/src/auditordb/Makefile.am @@ -62,7 +62,6 @@ libtaler_plugin_auditordb_postgres_la_SOURCES = \ plugin_auditordb_postgres.c \ pg_helper.h pg_helper.c \ pg_delete_generic.c pg_delete_generic.h \ - pg_delete_deposit_confirmations.c pg_delete_deposit_confirmations.h \ pg_delete_pending_deposit.c pg_delete_pending_deposit.h \ pg_delete_purse_info.c pg_delete_purse_info.h \ pg_del_denomination_balance.h pg_del_denomination_balance.c \ @@ -111,60 +110,38 @@ pg_insert_reserve_balance_insufficient_inconsistency.c pg_insert_reserve_balance pg_get_reserve_balance_insufficient_inconsistency.c pg_get_reserve_balance_insufficient_inconsistency.h \ pg_insert_bad_sig_losses.c pg_insert_bad_sig_losses.h \ pg_get_bad_sig_losses.c pg_get_bad_sig_losses.h \ -pg_update_bad_sig_losses.c pg_update_bad_sig_losses.h \ pg_insert_auditor_closure_lags.c pg_insert_auditor_closure_lags.h \ pg_get_auditor_closure_lags.c pg_get_auditor_closure_lags.h \ pg_insert_refreshes_hanging.c pg_insert_refreshes_hanging.h \ pg_get_refreshes_hanging.c pg_get_refreshes_hanging.h \ -pg_update_emergency_by_count.c pg_update_emergency_by_count.h \ -pg_update_row_inconsistency.c pg_update_row_inconsistency.h \ -pg_update_purse_not_closed_inconsistencies.c pg_update_purse_not_closed_inconsistencies.h \ -pg_update_reserve_balance_insufficient_inconsistency.c pg_update_reserve_balance_insufficient_inconsistency.h \ -pg_update_coin_inconsistency.c pg_update_coin_inconsistency.h \ -pg_update_denomination_key_validity_withdraw_inconsistency.c pg_update_denomination_key_validity_withdraw_inconsistency.h \ -pg_update_refreshes_hanging.c pg_update_refreshes_hanging.h \ -pg_update_emergency.c pg_update_emergency.h \ -pg_update_closure_lags.c pg_update_closure_lags.h \ pg_get_reserve_in_inconsistency.c pg_get_reserve_in_inconsistency.h \ pg_insert_reserve_in_inconsistency.c pg_insert_reserve_in_inconsistency.h \ -pg_update_reserve_in_inconsistency.c pg_update_reserve_in_inconsistency.h \ pg_get_reserve_not_closed_inconsistency.c pg_get_reserve_not_closed_inconsistency.h \ pg_insert_reserve_not_closed_inconsistency.c pg_insert_reserve_not_closed_inconsistency.h \ -pg_update_reserve_not_closed_inconsistency.c pg_update_reserve_not_closed_inconsistency.h \ pg_get_denominations_without_sigs.c pg_get_denominations_without_sigs.h \ pg_insert_denominations_without_sigs.c pg_insert_denominations_without_sigs.h \ -pg_update_denominations_without_sigs.c pg_update_denominations_without_sigs.h \ pg_get_misattribution_in_inconsistency.c pg_get_misattribution_in_inconsistency.h \ pg_insert_misattribution_in_inconsistency.c pg_insert_misattribution_in_inconsistency.h \ -pg_update_misattribution_in_inconsistency.c pg_update_misattribution_in_inconsistency.h \ pg_update_balance.c pg_update_balance.h \ pg_get_reserves.c pg_get_reserves.h \ pg_get_purses.c pg_get_purses.h \ pg_insert_historic_denom_revenue.c pg_insert_historic_denom_revenue.h \ pg_get_denomination_pending.c pg_get_denomination_pending.h \ pg_insert_denomination_pending.c pg_insert_denomination_pending.h \ -pg_update_denomination_pending.c pg_update_denomination_pending.h \ pg_get_exchange_signkeys.c pg_get_exchange_signkeys.h \ pg_get_wire_format_inconsistency.c pg_get_wire_format_inconsistency.h \ pg_insert_wire_format_inconsistency.c pg_insert_wire_format_inconsistency.h \ -pg_update_wire_format_inconsistency.c pg_update_wire_format_inconsistency.h \ pg_get_wire_out_inconsistency.c pg_get_wire_out_inconsistency.h \ pg_insert_wire_out_inconsistency.c pg_insert_wire_out_inconsistency.h \ pg_delete_wire_out_inconsistency_if_matching.c pg_delete_wire_out_inconsistency_if_matching.h \ -pg_update_wire_out_inconsistency.c pg_update_wire_out_inconsistency.h \ pg_get_reserve_balance_summary_wrong_inconsistency.c pg_get_reserve_balance_summary_wrong_inconsistency.h \ pg_insert_reserve_balance_summary_wrong_inconsistency.c pg_insert_reserve_balance_summary_wrong_inconsistency.h \ -pg_update_reserve_balance_summary_wrong_inconsistency.c pg_update_reserve_balance_summary_wrong_inconsistency.h \ pg_get_row_minor_inconsistencies.c pg_get_row_minor_inconsistencies.h \ pg_insert_row_minor_inconsistencies.c pg_insert_row_minor_inconsistencies.h \ -pg_update_row_minor_inconsistencies.c pg_update_row_minor_inconsistencies.h \ pg_get_fee_time_inconsistency.c pg_get_fee_time_inconsistency.h \ pg_insert_fee_time_inconsistency.c pg_insert_fee_time_inconsistency.h \ -pg_update_fee_time_inconsistency.c pg_update_fee_time_inconsistency.h \ pg_get_balances.c pg_get_balances.h \ pg_insert_exchange_signkey.c pg_insert_exchange_signkey.h \ -pg_update_deposit_confirmations.c pg_update_deposit_confirmations.h \ -pg_update_amount_arithmetic_inconsistency.c pg_update_amount_arithmetic_inconsistency.h libtaler_plugin_auditordb_postgres_la_LDFLAGS = \ $(TALER_PLUGIN_LDFLAGS) diff --git a/src/auditordb/pg_delete_deposit_confirmations.c b/src/auditordb/pg_delete_deposit_confirmations.c @@ -1,47 +0,0 @@ -/* - 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/> - */ -/** - * @file auditordb/pg_delete_deposit_confirmations.c - * @brief Implementation of the delete_deposit_confirmations function for Postgres - * @author Nicola Eigel - */ -#include "platform.h" -#include "taler_error_codes.h" -#include "taler_dbevents.h" -#include "taler_pq_lib.h" -#include "pg_delete_deposit_confirmations.h" -#include "pg_helper.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_delete_deposit_confirmation ( - void *cls, - uint64_t row_id) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&row_id), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "auditor_delete_deposit_confirmation", - "DELETE" - " FROM auditor_deposit_confirmations" - " WHERE deposit_confirmation_serial_id=$1;"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "auditor_delete_deposit_confirmation", - params); -} diff --git a/src/auditordb/pg_delete_deposit_confirmations.h b/src/auditordb/pg_delete_deposit_confirmations.h @@ -1,41 +0,0 @@ -/* - 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/> - */ -/** - * @file auditordb/pg_delete_deposit_confirmations.h - * @brief implementation of the delete_deposit_confirmation function for Postgres - * @author Nicola Eigel - */ -#ifndef PG_DELETE_DEPOSIT_CONFIRMATIONS_H -#define PG_DELETE_DEPOSIT_CONFIRMATIONS_H - -#include "taler_util.h" -#include "taler_json_lib.h" -#include "taler_auditordb_plugin.h" - -/** - * Delete a row from the deposit confirmations table. - * - * @param cls the @e cls of this struct with the plugin-specific state - * @param row_id row to delete - * @return query transaction status - */ -enum GNUNET_DB_QueryStatus -TAH_PG_delete_deposit_confirmation ( - void *cls, - uint64_t row_id); - - -#endif diff --git a/src/auditordb/pg_update_amount_arithmetic_inconsistency.c b/src/auditordb/pg_update_amount_arithmetic_inconsistency.c @@ -1,45 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_amount_arithmetic_inconsistency.h" - - -enum GNUNET_DB_QueryStatus -TAH_PG_update_amount_arithmetic_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_amount_arithmetic_inconsistency", - "UPDATE auditor_amount_arithmetic_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_amount_arithmetic_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_amount_arithmetic_inconsistency.h b/src/auditordb/pg_update_amount_arithmetic_inconsistency.h @@ -1,28 +0,0 @@ -/* - 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/> - */ - -#ifndef SRC_PG_UPDATE_AMOUNT_ARITHMETIC_INCONSISTENCY_H -#define SRC_PG_UPDATE_AMOUNT_ARITHMETIC_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_amount_arithmetic_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_AMOUNT_ARITHMETIC_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_bad_sig_losses.c b/src/auditordb/pg_update_bad_sig_losses.c @@ -1,45 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_bad_sig_losses.h" - - -enum GNUNET_DB_QueryStatus -TAH_PG_update_bad_sig_losses ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_bad_sig_losses", - "UPDATE auditor_bad_sig_losses SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_bad_sig_losses", - params); -} diff --git a/src/auditordb/pg_update_bad_sig_losses.h b/src/auditordb/pg_update_bad_sig_losses.h @@ -1,28 +0,0 @@ -/* - 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/> - */ - -#ifndef SRC_PG_UPDATE_BAD_SIG_LOSSES_H -#define SRC_PG_UPDATE_BAD_SIG_LOSSES_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_bad_sig_losses ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_BAD_SIG_LOSSES_H diff --git a/src/auditordb/pg_update_closure_lags.c b/src/auditordb/pg_update_closure_lags.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_closure_lags.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_closure_lags ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_closure_lags", - "UPDATE auditor_closure_lags SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_closure_lags", - params); -} diff --git a/src/auditordb/pg_update_closure_lags.h b/src/auditordb/pg_update_closure_lags.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_CLOSURE_LAGS_H -#define SRC_PG_UPDATE_CLOSURE_LAGS_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_closure_lags ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_CLOSURE_LAGS_H diff --git a/src/auditordb/pg_update_coin_inconsistency.c b/src/auditordb/pg_update_coin_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_coin_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_coin_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_coin_inconsistency", - "UPDATE auditor_coin_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_coin_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_coin_inconsistency.h b/src/auditordb/pg_update_coin_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_COIN_INCONSISTENCY_H -#define SRC_PG_UPDATE_COIN_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_coin_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_COIN_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.c b/src/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_denomination_key_validity_withdraw_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_denomination_key_validity_withdraw_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_denomination_key_validity_withdraw_inconsistency", - "UPDATE auditor_denomination_key_validity_withdraw_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_denomination_key_validity_withdraw_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.h b/src/auditordb/pg_update_denomination_key_validity_withdraw_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_H -#define SRC_PG_UPDATE_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_denomination_key_validity_withdraw_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_denomination_pending.c b/src/auditordb/pg_update_denomination_pending.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_denomination_pending.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_denomination_pending ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_denomination_pending", - "UPDATE auditor_denomination_pending SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_denomination_pending", - params); -} diff --git a/src/auditordb/pg_update_denomination_pending.h b/src/auditordb/pg_update_denomination_pending.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_DENOMINATION_PENDING_H -#define SRC_PG_UPDATE_DENOMINATION_PENDING_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_denomination_pending ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_DENOMINATION_PENDING_H diff --git a/src/auditordb/pg_update_denominations_without_sigs.c b/src/auditordb/pg_update_denominations_without_sigs.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_denominations_without_sigs.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_denominations_without_sigs ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_denominations_without_sigs", - "UPDATE auditor_denominations_without_sigs SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_denominations_without_sigs", - params); -} diff --git a/src/auditordb/pg_update_denominations_without_sigs.h b/src/auditordb/pg_update_denominations_without_sigs.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_DENOMINATIONS_WITHOUT_SIGS_H -#define SRC_PG_UPDATE_DENOMINATIONS_WITHOUT_SIGS_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_denominations_without_sigs ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_DENOMINATIONS_WITHOUT_SIGS_H diff --git a/src/auditordb/pg_update_deposit_confirmations.c b/src/auditordb/pg_update_deposit_confirmations.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_deposit_confirmations.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_deposit_confirmations ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_deposit_confirmations", - "UPDATE auditor_deposit_confirmations SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_deposit_confirmations", - params); -} diff --git a/src/auditordb/pg_update_deposit_confirmations.h b/src/auditordb/pg_update_deposit_confirmations.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_DEPOSIT_CONFIRMATIONS_H -#define SRC_PG_UPDATE_DEPOSIT_CONFIRMATIONS_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_deposit_confirmations ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_DEPOSIT_CONFIRMATIONS_H diff --git a/src/auditordb/pg_update_emergency.c b/src/auditordb/pg_update_emergency.c @@ -1,44 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" -#include "pg_update_emergency.h" - -/** - * Update a given resource – for now this only means suppressing - */ -enum GNUNET_DB_QueryStatus -TAH_PG_update_emergency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - PREPARE (pg, - "update_emergency", - "UPDATE auditor_emergency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_emergency", - params); -} diff --git a/src/auditordb/pg_update_emergency.h b/src/auditordb/pg_update_emergency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_EMERGENCY_H -#define SRC_PG_UPDATE_EMERGENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_emergency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_EMERGENCY_H diff --git a/src/auditordb/pg_update_emergency_by_count.c b/src/auditordb/pg_update_emergency_by_count.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_emergency_by_count.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_emergency_by_count ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_emergency_by_count", - "UPDATE auditor_emergency_by_count SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_emergency_by_count", - params); -} diff --git a/src/auditordb/pg_update_emergency_by_count.h b/src/auditordb/pg_update_emergency_by_count.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_EMERGENCY_BY_COUNT_H -#define SRC_PG_UPDATE_EMERGENCY_BY_COUNT_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_emergency_by_count ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_EMERGENCY_BY_COUNT_H diff --git a/src/auditordb/pg_update_fee_time_inconsistency.c b/src/auditordb/pg_update_fee_time_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_fee_time_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_fee_time_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_fee_time_inconsistency", - "UPDATE auditor_fee_time_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_fee_time_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_fee_time_inconsistency.h b/src/auditordb/pg_update_fee_time_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_FEE_TIME_INCONSISTENCY_H -#define SRC_PG_UPDATE_FEE_TIME_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_fee_time_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_FEE_TIME_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_misattribution_in_inconsistency.c b/src/auditordb/pg_update_misattribution_in_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_misattribution_in_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_misattribution_in_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_misattribution_in_inconsistency", - "UPDATE auditor_misattribution_in_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_misattribution_in_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_misattribution_in_inconsistency.h b/src/auditordb/pg_update_misattribution_in_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_MISATTRIBUTION_IN_INCONSISTENCY_H -#define SRC_PG_UPDATE_MISATTRIBUTION_IN_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_misattribution_in_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_MISATTRIBUTION_IN_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_purse_not_closed_inconsistencies.c b/src/auditordb/pg_update_purse_not_closed_inconsistencies.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_purse_not_closed_inconsistencies.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_purse_not_closed_inconsistencies ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_purse_not_closed_inconsistencies", - "UPDATE auditor_purse_not_closed_inconsistencies SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_purse_not_closed_inconsistencies", - params); -} diff --git a/src/auditordb/pg_update_purse_not_closed_inconsistencies.h b/src/auditordb/pg_update_purse_not_closed_inconsistencies.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_PURSE_NOT_CLOSED_INCONSISTENCIES_H -#define SRC_PG_UPDATE_PURSE_NOT_CLOSED_INCONSISTENCIES_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_purse_not_closed_inconsistencies ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_PURSE_NOT_CLOSED_INCONSISTENCIES_H diff --git a/src/auditordb/pg_update_refreshes_hanging.c b/src/auditordb/pg_update_refreshes_hanging.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_refreshes_hanging.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_refreshes_hanging ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_refreshes_hanging", - "UPDATE auditor_refreshes_hanging SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_refreshes_hanging", - params); -} diff --git a/src/auditordb/pg_update_refreshes_hanging.h b/src/auditordb/pg_update_refreshes_hanging.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_REFRESHES_HANGING_H -#define SRC_PG_UPDATE_REFRESHES_HANGING_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_refreshes_hanging ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_REFRESHES_HANGING_H diff --git a/src/auditordb/pg_update_reserve_balance_insufficient_inconsistency.c b/src/auditordb/pg_update_reserve_balance_insufficient_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_reserve_balance_insufficient_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_balance_insufficient_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_reserve_balance_insufficient_inconsistency", - "UPDATE auditor_reserve_balance_insufficient_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_reserve_balance_insufficient_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_reserve_balance_insufficient_inconsistency.h b/src/auditordb/pg_update_reserve_balance_insufficient_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H -#define SRC_PG_UPDATE_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_balance_insufficient_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.c b/src/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_reserve_balance_summary_wrong_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_balance_summary_wrong_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_reserve_balance_summary_wrong_inconsistency", - "UPDATE auditor_reserve_balance_summary_wrong_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_reserve_balance_summary_wrong_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.h b/src/auditordb/pg_update_reserve_balance_summary_wrong_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_H -#define SRC_PG_UPDATE_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_balance_summary_wrong_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_reserve_in_inconsistency.c b/src/auditordb/pg_update_reserve_in_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_reserve_in_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_in_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_reserve_in_inconsistency", - "UPDATE auditor_reserve_in_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_reserve_in_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_reserve_in_inconsistency.h b/src/auditordb/pg_update_reserve_in_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_RESERVE_IN_INCONSISTENCY_H -#define SRC_PG_UPDATE_RESERVE_IN_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_in_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_RESERVE_IN_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_reserve_not_closed_inconsistency.c b/src/auditordb/pg_update_reserve_not_closed_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_reserve_not_closed_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_not_closed_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_reserve_not_closed_inconsistency", - "UPDATE auditor_reserve_not_closed_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_reserve_not_closed_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_reserve_not_closed_inconsistency.h b/src/auditordb/pg_update_reserve_not_closed_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_RESERVE_NOT_CLOSED_INCONSISTENCY_H -#define SRC_PG_UPDATE_RESERVE_NOT_CLOSED_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_reserve_not_closed_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_RESERVE_NOT_CLOSED_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_row_inconsistency.c b/src/auditordb/pg_update_row_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_row_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_row_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_row_inconsistency", - "UPDATE auditor_row_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_row_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_row_inconsistency.h b/src/auditordb/pg_update_row_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_ROW_INCONSISTENCY_H -#define SRC_PG_UPDATE_ROW_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_row_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_ROW_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_row_minor_inconsistencies.c b/src/auditordb/pg_update_row_minor_inconsistencies.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_row_minor_inconsistencies.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_row_minor_inconsistencies ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_row_minor_inconsistencies", - "UPDATE auditor_row_minor_inconsistencies SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_row_minor_inconsistencies", - params); -} diff --git a/src/auditordb/pg_update_row_minor_inconsistencies.h b/src/auditordb/pg_update_row_minor_inconsistencies.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_ROW_MINOR_INCONSISTENCIES_H -#define SRC_PG_UPDATE_ROW_MINOR_INCONSISTENCIES_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_row_minor_inconsistencies ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_ROW_MINOR_INCONSISTENCIES_H diff --git a/src/auditordb/pg_update_wire_format_inconsistency.c b/src/auditordb/pg_update_wire_format_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_wire_format_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_wire_format_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_wire_format_inconsistency", - "UPDATE auditor_wire_format_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_wire_format_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_wire_format_inconsistency.h b/src/auditordb/pg_update_wire_format_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_WIRE_FORMAT_INCONSISTENCY_H -#define SRC_PG_UPDATE_WIRE_FORMAT_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_wire_format_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_WIRE_FORMAT_INCONSISTENCY_H diff --git a/src/auditordb/pg_update_wire_out_inconsistency.c b/src/auditordb/pg_update_wire_out_inconsistency.c @@ -1,48 +0,0 @@ -/* - 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_pq_lib.h" -#include "pg_helper.h" - -#include "pg_update_wire_out_inconsistency.h" - -/* -Update a given resource – for now this only means suppressing -*/ -enum GNUNET_DB_QueryStatus -TAH_PG_update_wire_out_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *gu) -{ - struct PostgresClosure *pg = cls; - struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (&gu->row_id), - GNUNET_PQ_query_param_bool (gu->suppressed), - GNUNET_PQ_query_param_end - }; - - - PREPARE (pg, - "update_wire_out_inconsistency", - "UPDATE auditor_wire_out_inconsistency SET" - " suppressed=$2" - " WHERE row_id=$1"); - return GNUNET_PQ_eval_prepared_non_select (pg->conn, - "update_wire_out_inconsistency", - params); -} diff --git a/src/auditordb/pg_update_wire_out_inconsistency.h b/src/auditordb/pg_update_wire_out_inconsistency.h @@ -1,29 +0,0 @@ -/* - 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/> - */ - - -#ifndef SRC_PG_UPDATE_WIRE_OUT_INCONSISTENCY_H -#define SRC_PG_UPDATE_WIRE_OUT_INCONSISTENCY_H - -#include "taler_util.h" -#include "taler_auditordb_plugin.h" - -enum GNUNET_DB_QueryStatus -TAH_PG_update_wire_out_inconsistency ( - void *cls, - const struct TALER_AUDITORDB_Generic_Update *dc); - -#endif // SRC_PG_UPDATE_WIRE_OUT_INCONSISTENCY_H diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c @@ -24,7 +24,6 @@ #include <pthread.h> #include <libpq-fe.h> #include "pg_delete_generic.h" -#include "pg_delete_deposit_confirmations.h" #include "pg_delete_pending_deposit.h" #include "pg_delete_purse_info.h" #include "pg_del_denomination_balance.h" @@ -62,17 +61,6 @@ #include "pg_get_amount_arithmetic_inconsistency.h" #include "pg_get_coin_inconsistency.h" #include "pg_get_row_inconsistency.h" -#include "pg_update_emergency_by_count.h" -#include "pg_update_row_inconsistency.h" -#include "pg_update_purse_not_closed_inconsistencies.h" -#include "pg_update_reserve_balance_insufficient_inconsistency.h" -#include "pg_update_coin_inconsistency.h" -#include "pg_update_denomination_key_validity_withdraw_inconsistency.h" -#include "pg_update_refreshes_hanging.h" -#include "pg_update_emergency.h" -#include "pg_update_closure_lags.h" -#include "pg_update_row_minor_inconsistencies.h" - #include "pg_update_balance.h" @@ -91,14 +79,12 @@ #include "pg_get_bad_sig_losses.h" #include "pg_insert_bad_sig_losses.h" -#include "pg_update_bad_sig_losses.h" #include "pg_get_denomination_key_validity_withdraw_inconsistency.h" #include "pg_insert_denomination_key_validity_withdraw_inconsistency.h" #include "pg_get_fee_time_inconsistency.h" #include "pg_insert_fee_time_inconsistency.h" -#include "pg_update_fee_time_inconsistency.h" #include "pg_get_purse_not_closed_inconsistencies.h" #include "pg_insert_purse_not_closed_inconsistencies.h" @@ -111,48 +97,36 @@ #include "pg_get_reserve_in_inconsistency.h" #include "pg_insert_reserve_in_inconsistency.h" -#include "pg_update_reserve_in_inconsistency.h" #include "pg_get_reserve_not_closed_inconsistency.h" #include "pg_insert_reserve_not_closed_inconsistency.h" -#include "pg_update_reserve_not_closed_inconsistency.h" #include "pg_get_denominations_without_sigs.h" #include "pg_insert_denominations_without_sigs.h" -#include "pg_update_denominations_without_sigs.h" #include "pg_get_misattribution_in_inconsistency.h" #include "pg_insert_misattribution_in_inconsistency.h" -#include "pg_update_misattribution_in_inconsistency.h" #include "pg_get_reserves.h" #include "pg_get_purses.h" #include "pg_get_denomination_pending.h" #include "pg_insert_denomination_pending.h" -#include "pg_update_denomination_pending.h" #include "pg_get_exchange_signkeys.h" #include "pg_get_wire_format_inconsistency.h" #include "pg_insert_wire_format_inconsistency.h" -#include "pg_update_wire_format_inconsistency.h" #include "pg_get_wire_out_inconsistency.h" #include "pg_insert_wire_out_inconsistency.h" #include "pg_delete_wire_out_inconsistency_if_matching.h" -#include "pg_update_wire_out_inconsistency.h" #include "pg_get_reserve_balance_summary_wrong_inconsistency.h" #include "pg_insert_reserve_balance_summary_wrong_inconsistency.h" -#include "pg_update_reserve_balance_summary_wrong_inconsistency.h" #include "pg_get_row_minor_inconsistencies.h" #include "pg_insert_row_minor_inconsistencies.h" -#include "pg_update_row_minor_inconsistencies.h" - -#include "pg_update_amount_arithmetic_inconsistency.h" -#include "pg_update_deposit_confirmations.h" #define LOG(kind,...) GNUNET_log_from (kind, "taler-auditordb-postgres", \ __VA_ARGS__) @@ -587,9 +561,6 @@ libtaler_plugin_auditordb_postgres_init (void *cls) = &TAH_PG_insert_deposit_confirmation; plugin->get_deposit_confirmations = &TAH_PG_get_deposit_confirmations; - plugin->delete_deposit_confirmation - = &TAH_PG_delete_deposit_confirmation; - plugin->get_amount_arithmetic_inconsistency = &TAH_PG_get_amount_arithmetic_inconsistency; diff --git a/src/include/taler_auditordb_lib.h b/src/include/taler_auditordb_lib.h @@ -30,27 +30,93 @@ enum TALER_AUDITORDB_DeletableSuppressableTables * For auditor_amount_arithmetic_inconsistency table. */ TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY, + /** + * For auditor_closure_lags table. + */ TALER_AUDITORDB_CLOSURE_LAGS, + /** + * For auditor_progress table. + */ TALER_AUDITORDB_PROGRESS, + /** + * For auditor_bad_sig_losses table. + */ TALER_AUDITORDB_BAD_SIG_LOSSES, + /** + * For auditor_coin_inconsistency table. + */ TALER_AUDITORDB_COIN_INCONSISTENCY, + /** + * For auditor_denomination_key_validity_withdraw_inconsistency table. + */ TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY, + /** + * For auditor_denomination_pending table. + */ TALER_AUDITORDB_DENOMINATION_PENDING, + /** + * For auditor_denominations_without_sig table. + */ TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG, + /** + * For auditor_deposit_confirmation table. + */ TALER_AUDITORDB_DEPOSIT_CONFIRMATION, + /** + * For auditor_emergency table. + */ TALER_AUDITORDB_EMERGENCY, + /** + * For auditor_emergency_by_count table. + */ TALER_AUDITORDB_EMERGENCY_BY_COUNT, + /** + * For auditor_fee_time_inconsistency table. + */ TALER_AUDITORDB_FEE_TIME_INCONSISTENCY, + /** + * For auditor_misattribution_in_inconsistency table. + */ TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY, + /** + * For auditor_purse_not_closed_inconsistency table. + */ TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY, + /** + * For auditor_refreshes_hanging table. + */ TALER_AUDITORDB_REFRESHES_HANGING, + /** + * For auditor_reserve_balance_insufficient_inconsistency table. + */ TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY, + /** + * For auditor_reserve_balance_summary_wrong_inconsistency table. + */ TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY, + /** + * For auditor_reserve_in_inconsistency table. + */ TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY, + /** + * For auditor_reserve_not_closed_inconsistency table. + */ TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY, + /** + * For auditor_row_inconsistency table. + */ TALER_AUDITORDB_ROW_INCONSISTENCY, + /** + * For auditor_row_minor_inconsistency table. + */ TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY, + /** + * For auditor_wire_format_inconsistency table. + */ TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY, + /** + * For auditor_wire_out_inconsistency table. + */ TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY, /** * Terminal.