commit 4524180ada7d49e2f3ea4356df4706f2c9b0841d parent 3b90f9cae240623799917a839c018039dae506b0 Author: Christian Grothoff <christian@grothoff.org> Date: Sat, 22 Oct 2022 00:27:32 +0200 -document why re-locking here is safe -- at least right now Diffstat:
| M | src/bank-lib/fakebank.c | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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;