exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 93347b3904962c80d6aeba0c3be4a75af2a13e83
parent 07a5f6fb821ae48efa877215360a5c9c7cfc6fa4
Author: Sebastian <sebasjm@gmail.com>
Date:   Sun,  7 Feb 2021 20:11:24 -0300

fix #6745

Diffstat:
Msrc/util/taler-exchange-secmod-eddsa.c | 17++++++++++-------
Msrc/util/taler-exchange-secmod-rsa.c | 17++++++++++-------
2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/src/util/taler-exchange-secmod-eddsa.c b/src/util/taler-exchange-secmod-eddsa.c @@ -1427,13 +1427,16 @@ do_shutdown (void *cls) done_task = NULL; } /* shut down worker threads */ - GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); - in_shutdown = true; - GNUNET_assert (0 == pthread_cond_broadcast (&work_cond)); - GNUNET_assert (0 == pthread_mutex_unlock (&work_lock)); - for (unsigned int i = 0; i<num_workers; i++) - GNUNET_assert (0 == pthread_join (workers[i], - NULL)); + if (NULL != workers) + { + GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); + in_shutdown = true; + GNUNET_assert (0 == pthread_cond_broadcast (&work_cond)); + GNUNET_assert (0 == pthread_mutex_unlock (&work_lock)); + for (unsigned int i = 0; i<num_workers; i++) + GNUNET_assert (0 == pthread_join (workers[i], + NULL)); + } if (NULL != done_signal) { GNUNET_break (GNUNET_OK == diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c @@ -1798,13 +1798,16 @@ do_shutdown (void *cls) done_task = NULL; } /* shut down worker threads */ - GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); - in_shutdown = true; - GNUNET_assert (0 == pthread_cond_broadcast (&work_cond)); - GNUNET_assert (0 == pthread_mutex_unlock (&work_lock)); - for (unsigned int i = 0; i<num_workers; i++) - GNUNET_assert (0 == pthread_join (workers[i], - NULL)); + if (NULL != workers) + { + GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); + in_shutdown = true; + GNUNET_assert (0 == pthread_cond_broadcast (&work_cond)); + GNUNET_assert (0 == pthread_mutex_unlock (&work_lock)); + for (unsigned int i = 0; i<num_workers; i++) + GNUNET_assert (0 == pthread_join (workers[i], + NULL)); + } if (NULL != done_signal) { GNUNET_break (GNUNET_OK ==