commit 18a68ab78965be39d6a457675f17d33b3b81c1cb
parent e50a5f4d2b85a47b1318bda2f4890812b0a8afad
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 25 Aug 2021 11:45:13 +0200
ensure statements are prepared before keys subsystem initialization
Diffstat:
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
@@ -1419,6 +1419,13 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ if (GNUNET_SYSERR ==
+ TEH_plugin->preflight (TEH_plugin->cls))
+ {
+ global_ret = EXIT_FAILURE;
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
if (GNUNET_OK !=
TEH_keys_init ())
{
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c
@@ -1711,7 +1711,8 @@ build_key_state (struct HelperState *hs,
ksh);
if (qs < 0)
{
- GNUNET_break (0);
+ GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
+ GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR != qs);
destroy_key_state (ksh,
true);
return NULL;