https://gitlab.synchro.net/main/sbbs/-/commit/efd77fec752a8affc9918b48
Modified Files:
src/sbbs3/getnode.cpp
Log Message:
getnodedat(): don't leak the node.dab record lock on a seek failure
Restructure the retry loop to seek before locking (matching the C
getnodedat() in userdat.c): previously a seeknodedat() failure after a successful lock() continued the loop without unlocking, so on Windows
(where locking an already-held region fails) one transient seek failure poisoned all remaining retries. Also drop the pointless unlock() after
a *failed* lock() and only unlock on a short read when we actually
locked the record. Plus an uncrustify whitespace pass over the file.
Noticed while reviewing the node status reset retry of 46ebc4f26 (desk-23-lamp). Validated against an isolated scratch terminal server: connect/disconnect exercises the locked getnodedat()/putnodedat() path
and the node record returns to waiting-for-connection with no NODE.DAB
errors logged.
Co-Authored-By: Claude Fable 5 <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)