• src/sbbs3/websrvr.cpp web/root/qwk.ssjs

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Mon Oct 26 00:09:03 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/83cd70159dc00a4b6021d087
    Modified Files:
    src/sbbs3/websrvr.cpp web/root/qwk.ssjs
    Log Message:
    web: pack QWK and import REP packets in-process via qwkjob

    The Web Server now gives every JavaScript context a qwkjob host, so system.qwk_pack() and system.qwk_unpack() work in .ssjs pages. qwk.ssjs
    (used by remote QWKnet nodes running qnet-http.js) calls them instead of touching a semaphore file and polling for the Terminal Server's event
    thread, which made every GET wait on the event thread's cycle and fail
    with 503 after 60 seconds when events were disabled.

    GET: "busy" and "throttled" reply 503 with Retry-After: 60, "empty"
    replies 204, any other failure replies 503 with the result in the
    status text.

    POST: the body is written to the temp directory and imported before the
    reply. When the user's lock is held or the job cap is reached, the REP
    is queued as data/file/<user#>.rep (or <user#>.<hex-time>.rep if that
    name is taken) for the event thread's sweep, and the reply is still 200, because qnet-http.js re-sends the REP on any other status and the
    replies would be posted twice. A failed import is kept as .bad and also
    replies 200, since re-sending the same packet cannot help. A pending
    REP no longer blocks a new upload (the 409 is gone).

    If the binary lacks the new methods, qwk.ssjs falls back to the previous semaphore and direct-write paths, with a 500 ms sleep in the pack wait
    loop instead of a busy spin. The dead CVS $Revision keyword is replaced
    by a plain version string.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net