From 4524180ada7d49e2f3ea4356df4706f2c9b0841d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 22 Oct 2022 00:27:32 +0200 Subject: [PATCH] -document why re-locking here is safe -- at least right now --- src/bank-lib/fakebank.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c index fa1475b7a..34b87be57 100644 --- a/src/bank-lib/fakebank.c +++ b/src/bank-lib/fakebank.c @@ -3630,6 +3630,10 @@ access_withdrawals_confirm (struct TALER_FAKEBANK_Handle *h, TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT, NULL); } + /* Re-acquiring the lock and continuing to operate on 'wo' + is currently (!) acceptable because we NEVER free 'wo' + until shutdown. We may want to revise this if keeping + all withdraw operations in RAM becomes an issue... */ GNUNET_assert (0 == pthread_mutex_lock (&h->big_lock)); wo->confirmation_done = true;