https://gitlab.synchro.net/main/sbbs/-/commit/b6d43b90042c553aea43ea44
Modified Files:
ctrl/text.dat exec/load/text.js src/sbbs3/qwk.cpp qwkjob.cpp qwkjob.h text.h text_defaults.c text_id.c
Log Message:
qwk: terminal QWK download and upload take the per-user pack lock
A terminal user's own QWK download or REP upload took no lock, so it
could run at the same time as a background pack or REP import for the
same user (FTP, Web, a script): two packs both advanced the message
pointers and both qwk_success() calls deleted the same mail.
sbbs_t::qwk_download() now holds data/pack<user#>.lock from before
pack_qwk() through qwk_success() and the pointer restore.
sbbs_t::qwk_upload() holds it around unpack_rep() only, not the protocol receive, which can take minutes while nothing conflicts. The lock is
taken non-blocking with the same owner text and max age as the event
thread; if it is busy, the user sees the new QWKTransferInProgress text
and the call returns false without touching any pointers.
The lock file name is now built in one place, qwkjob_user_lock_name(),
shared by qwkjob.cpp and qwk.cpp.
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net