aboutsummaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c8
-rw-r--r--src/auditor/taler-helper-auditor-coins.c12
-rw-r--r--src/auditor/taler-helper-auditor-purses.c9
-rw-r--r--src/auditor/taler-helper-auditor-reserves.c16
-rw-r--r--src/auditor/taler-helper-auditor-wire-debit.c1
5 files changed, 30 insertions, 16 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index a6122e513..22ba23b4c 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -140,13 +140,14 @@ report_amount_arithmetic_inconsistency (
}
{
- enum GNUNET_DB_QueryStatus qs;
struct TALER_AUDITORDB_AmountArithmeticInconsistency aai = {
+ .problem_row_id = rowid,
.profitable = profitable,
.operation = (char *) operation,
.exchange_amount = *exchange,
.auditor_amount = *auditor
};
+ enum GNUNET_DB_QueryStatus qs;
qs = TALER_ARL_adb->insert_amount_arithmetic_inconsistency (
TALER_ARL_adb->cls,
@@ -899,7 +900,7 @@ wire_transfer_information_cb (
denom_pub))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "wire",
.loss = *coin_value,
.operation_specific_pub = coin.coin_pub.eddsa_pub
@@ -1128,6 +1129,7 @@ get_wire_fee (struct AggregationContext *ac,
wfi->start_date))
{
struct TALER_AUDITORDB_FeeTimeInconsistency ftib = {
+ .problem_row_id = 0, /* FIXME: fetch above! */
.diagnostic = "start date before previous end date",
.time = wfi->start_date.abs_time,
.type = (char *) method
@@ -1136,7 +1138,6 @@ get_wire_fee (struct AggregationContext *ac,
qs = TALER_ARL_adb->insert_fee_time_inconsistency (
TALER_ARL_adb->cls,
&ftib);
-
if (qs < 0)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
@@ -1150,6 +1151,7 @@ get_wire_fee (struct AggregationContext *ac,
wfi->end_date))
{
struct TALER_AUDITORDB_FeeTimeInconsistency ftia = {
+ .problem_row_id = 0, /* FIXME: fetch above! */
.diagnostic = "end date date after next start date",
.time = wfi->end_date.abs_time,
.type = (char *) method
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index 8a9f8f0ac..6e530ef37 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -364,6 +364,7 @@ report_amount_arithmetic_inconsistency (
{
struct TALER_AUDITORDB_AmountArithmeticInconsistency aai = {
.profitable = profitable,
+ .problem_row_id = rowid,
.operation = (char *) operation,
.exchange_amount = *exchange,
.auditor_amount = *auditor
@@ -1207,6 +1208,7 @@ check_known_coin (
denom_pub))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = (char *) operation,
.loss = *loss_potential,
.operation_specific_pub = coin_pub->eddsa_pub
@@ -1386,6 +1388,7 @@ refresh_session_cb (void *cls,
coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "melt",
.loss = *amount_with_fee,
.operation_specific_pub = coin_pub->eddsa_pub
@@ -1442,7 +1445,7 @@ refresh_session_cb (void *cls,
with invalid data, even if the exchange is correctly operating. We
still report it. */
struct TALER_AUDITORDB_RefreshesHanging rh = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.amount = *amount_with_fee,
.coin_pub = coin_pub->eddsa_pub
};
@@ -1731,6 +1734,7 @@ deposit_cb (void *cls,
&deposit->csig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "deposit",
.loss = deposit->amount_with_fee,
.operation_specific_pub = deposit->coin.coin_pub.eddsa_pub
@@ -1867,6 +1871,7 @@ refund_cb (void *cls,
merchant_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "refund",
.loss = *amount_with_fee,
.operation_specific_pub = coin_pub->eddsa_pub
@@ -2145,6 +2150,7 @@ check_recoup (struct CoinContext *cc,
denom_pub))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = (char *) operation,
.loss = *amount,
.operation_specific_pub = coin->coin_pub.eddsa_pub
@@ -2217,6 +2223,7 @@ check_recoup (struct CoinContext *cc,
if (! ds->was_revoked)
{
struct TALER_AUDITORDB_BadSigLosses bsldnr = {
+ .problem_row_id = rowid,
.operation = (char *) operation,
.loss = *amount,
.operation_specific_pub = coin->coin_pub.eddsa_pub
@@ -2286,6 +2293,7 @@ recoup_cb (void *cls,
coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "recoup",
.loss = *amount,
.operation_specific_pub = coin->coin_pub.eddsa_pub
@@ -2416,6 +2424,7 @@ recoup_refresh_cb (void *cls,
coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "recoup-refresh",
.loss = *amount,
.operation_specific_pub = coin->coin_pub.eddsa_pub
@@ -2607,6 +2616,7 @@ purse_deposit_cb (
&deposit->coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
+ .problem_row_id = rowid,
.operation = "purse-deposit",
.loss = deposit->amount,
.operation_specific_pub = deposit->coin_pub.eddsa_pub
diff --git a/src/auditor/taler-helper-auditor-purses.c b/src/auditor/taler-helper-auditor-purses.c
index 8d86bba85..f9988fb52 100644
--- a/src/auditor/taler-helper-auditor-purses.c
+++ b/src/auditor/taler-helper-auditor-purses.c
@@ -146,6 +146,7 @@ report_amount_arithmetic_inconsistency (
{
struct TALER_AUDITORDB_AmountArithmeticInconsistency aai = {
.profitable = profitable,
+ .problem_row_id = rowid,
.operation = (char *) operation,
.exchange_amount = *exchange,
.auditor_amount = *auditor
@@ -504,7 +505,7 @@ handle_purse_requested (
purse_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "purse-request",
.loss = *target_amount,
.operation_specific_pub = purse_pub->eddsa_pub
@@ -629,7 +630,7 @@ handle_purse_deposits (
&deposit->coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "purse-deposit",
.loss = deposit->amount,
.operation_specific_pub = deposit->coin_pub.eddsa_pub
@@ -736,7 +737,7 @@ handle_purse_merged (
merge_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "merge-purse",
.loss = *amount,
.operation_specific_pub = merge_pub->eddsa_pub
@@ -845,7 +846,7 @@ handle_account_merged (
reserve_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "account-merge",
.loss = *purse_fee,
.operation_specific_pub = reserve_pub->eddsa_pub
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c
index 111290adf..54fa043f5 100644
--- a/src/auditor/taler-helper-auditor-reserves.c
+++ b/src/auditor/taler-helper-auditor-reserves.c
@@ -170,7 +170,7 @@ report_amount_arithmetic_inconsistency (
{
struct TALER_AUDITORDB_AmountArithmeticInconsistency aai = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.profitable = profitable,
.operation = (char *) operation,
.exchange_amount = *exchange,
@@ -581,7 +581,7 @@ handle_reserve_out (
execution_date))
{
struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency dkvwi ={
- .row_id = rowid,
+ .problem_row_id = rowid,
.execution_date = execution_date.abs_time,
.denompub_h = *&h_denom_pub,
.reserve_pub = *reserve_pub
@@ -609,7 +609,7 @@ handle_reserve_out (
reserve_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "withdraw",
.loss = *amount_with_fee,
.operation_specific_pub = reserve_pub->eddsa_pub
@@ -720,7 +720,7 @@ handle_recoup_by_reserve (
coin_sig))
{
struct TALER_AUDITORDB_BadSigLosses bslr = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "recoup",
.loss = *amount,
.operation_specific_pub = coin->coin_pub.eddsa_pub
@@ -799,7 +799,7 @@ handle_recoup_by_reserve (
"master signature invalid")))
{
struct TALER_AUDITORDB_BadSigLosses bslrm = {
- .row_id = rev_rowid,
+ .problem_row_id = rev_rowid,
.operation = "recoup-master",
.loss = *amount,
.operation_specific_pub = TALER_ARL_master_pub.eddsa_pub
@@ -945,7 +945,7 @@ handle_reserve_open (
reserve_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "reserve-open",
.loss = *reserve_payment,
.operation_specific_pub = reserve_pub->eddsa_pub
@@ -1100,7 +1100,7 @@ handle_reserve_closed (
&reserve_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = close_request_row,
+ .problem_row_id = close_request_row,
.operation = "close-request",
.loss = *amount_with_fee,
.operation_specific_pub = reserve_pub->eddsa_pub
@@ -1246,7 +1246,7 @@ handle_account_merged (
reserve_sig))
{
struct TALER_AUDITORDB_BadSigLosses bsl = {
- .row_id = rowid,
+ .problem_row_id = rowid,
.operation = "account-merge",
.loss = *purse_fee,
.operation_specific_pub = reserve_pub->eddsa_pub
diff --git a/src/auditor/taler-helper-auditor-wire-debit.c b/src/auditor/taler-helper-auditor-wire-debit.c
index 2a714d3f3..d3f9aacc0 100644
--- a/src/auditor/taler-helper-auditor-wire-debit.c
+++ b/src/auditor/taler-helper-auditor-wire-debit.c
@@ -455,6 +455,7 @@ check_pending_rc (void *cls,
if (! TALER_amount_is_zero (&rc->amount))
{
struct TALER_AUDITORDB_ClosureLags cl = {
+ .problem_row_id = rc->rowid,
.account = rc->receiver_account,
.amount = rc->amount,
.deadline = rc->execution_date.abs_time,