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-reserves.c | |
parent | 6cabb25d8d780949459382661fb318c32d76f992 (diff) |
fix #6133: enable nice shutdown of auditor helpers with CTRL-C
Diffstat (limited to 'src/auditor/taler-helper-auditor-reserves.c')
-rw-r--r-- | src/auditor/taler-helper-auditor-reserves.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c index 0b140e740..d596863e0 100644 --- a/src/auditor/taler-helper-auditor-reserves.c +++ b/src/auditor/taler-helper-auditor-reserves.c @@ -456,6 +456,8 @@ handle_reserve_in (void *cls, idle_reserve_expiration_time); rs->a_expiration_date = GNUNET_TIME_absolute_max (rs->a_expiration_date, expiry); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; return GNUNET_OK; } @@ -524,6 +526,8 @@ handle_reserve_out (void *cls, report_row_inconsistency ("withdraw", rowid, "denomination key not found"); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; return GNUNET_OK; } @@ -569,7 +573,9 @@ handle_reserve_out (void *cls, TALER_ARL_amount_add (&total_bad_sig_loss, &total_bad_sig_loss, amount_with_fee); - return GNUNET_OK; /* exit here, we cannot add this to the legitimate withdrawals */ + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; + return GNUNET_OK; /* exit function here, we cannot add this to the legitimate withdrawals */ } GNUNET_CRYPTO_hash (reserve_pub, @@ -620,6 +626,8 @@ handle_reserve_out (void *cls, TALER_ARL_amount_add (&rs->total_fee, &rs->total_fee, &withdraw_fee); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; return GNUNET_OK; } @@ -813,6 +821,8 @@ handle_recoup_by_reserve ( idle_reserve_expiration_time); rs->a_expiration_date = GNUNET_TIME_absolute_max (rs->a_expiration_date, expiry); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; return GNUNET_OK; } @@ -980,6 +990,8 @@ handle_reserve_closed ( "Additional closing operation for reserve `%s' of %s\n", TALER_B2S (reserve_pub), TALER_amount2s (amount_with_fee)); + if (TALER_ARL_do_abort ()) + return GNUNET_SYSERR; return GNUNET_OK; } |