diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-15 21:22:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-15 21:22:44 +0200 |
commit | 8f0a4b6095fd05e101fc5389cc46ec211083979a (patch) | |
tree | c6aa6ef9f8bb7d7d9b573fe313de6b0b3f7be6df /src/auditor/taler-helper-auditor-deposits.c | |
parent | 6cabb25d8d780949459382661fb318c32d76f992 (diff) | |
download | exchange-8f0a4b6095fd05e101fc5389cc46ec211083979a.tar.xz |
fix #6133: enable nice shutdown of auditor helpers with CTRL-C
Diffstat (limited to 'src/auditor/taler-helper-auditor-deposits.c')
-rw-r--r-- | src/auditor/taler-helper-auditor-deposits.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c index ed23c6a52..41cf406cb 100644 --- a/src/auditor/taler-helper-auditor-deposits.c +++ b/src/auditor/taler-helper-auditor-deposits.c @@ -96,8 +96,9 @@ struct DepositConfirmationContext * @param cls our `struct DepositConfirmationContext` * @param serial_id row of the @a dc in the database * @param dc the deposit confirmation we know + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERROR to stop iterating */ -static void +static int test_dc (void *cls, uint64_t serial_id, const struct TALER_AUDITORDB_DepositConfirmation *dc) @@ -128,13 +129,15 @@ test_dc (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found deposit %s in exchange database\n", GNUNET_h2s (&dc->h_contract_terms)); - return; /* found, all good */ + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; + return GNUNET_OK; /* found, all good */ } if (qs < 0) { GNUNET_break (0); /* DB error, complain */ dcc->qs = qs; - return; + return GNUNET_SYSERR; } } /* deposit confirmation missing! report! */ @@ -155,6 +158,9 @@ test_dc (void *cls, TALER_ARL_amount_add (&dcc->missed_amount, &dcc->missed_amount, &dc->amount_without_fee); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; + return GNUNET_OK; } |