aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-12 21:48:43 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-12 21:48:43 +0200
commit57cb2d1ca62329c9b0c59aa6424bab7d29e66c07 (patch)
tree3e993324fc0fd9604ef9382dbb7464e7fb6c9ecd
parent176b0edaebca0bfa1011321b9ad609dc939fdcbf (diff)
tolerate extreme case where all denominations expired
-rw-r--r--src/util/taler-exchange-secmod-rsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c
index 0a6d797e1..0b2da99d7 100644
--- a/src/util/taler-exchange-secmod-rsa.c
+++ b/src/util/taler-exchange-secmod-rsa.c
@@ -1195,6 +1195,8 @@ create_key (struct Denomination *denom,
static struct GNUNET_TIME_Absolute
denomination_action_time (const struct Denomination *denom)
{
+ if (NULL == denom->keys_head)
+ return GNUNET_TIME_UNIT_ZERO_ABS;
return GNUNET_TIME_absolute_min (
GNUNET_TIME_absolute_add (denom->keys_head->anchor,
denom->duration_withdraw),
@@ -1340,9 +1342,9 @@ update_denominations (void *cls)
struct GNUNET_TIME_Absolute now;
(void) cls;
+ keygen_task = NULL;
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
- keygen_task = NULL;
do {
denom = denom_head;
update_keys (denom,