• exec/tests/sexyz/last_ack.js skipifsrc/sbbs3/sexyz.c

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Oct 25 18:47:24 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/05ca5ae96c6d72f3a6d66e55
    Added Files:
    exec/tests/sexyz/last_ack.js skipif
    Modified Files:
    src/sbbs3/sexyz.c
    Log Message:
    sexyz: don't drop the receiver's last ACK on exit (#1300)

    A YMODEM receive ended without sending the ACK for the batch-terminating
    empty header block. A sender that waits for that handshake reported a
    failed transfer, or retried until it timed out, although every file had
    been received intact.

    34af5f34b5 (2026-07-24) buffered the producer side of the output path
    for every mode except windowed and segmented ZMODEM, so X/YMODEM in both directions too. The ACK for YMODEM header block 0 went into that
    buffer. An ordinary header got it flushed by the next receive, which
    flushes before waiting for input; the empty header ends the batch, so receive_files() returned success at once, and the shutdown path waited
    only for the ring to drain, never for the producer buffer, so the ACK
    never reached the output thread.

    Flush the ACK before returning from the termination block, and treat a
    failed send or flush of it as an error. At shutdown, flush the producer
    buffer before waiting on the ring, then wait for the output thread to
    finish sending what it read from the ring (a new output_idle event), so
    nothing is left behind in its linear buffer when the process exits.
    Buffer the producer only for a streaming ZMODEM send, the case it was
    added for: X/YMODEM and every receiver send short, ack-paced responses.

    Bump the sexyz revision to 3.7.

    The new test exec/tests/sexyz/last_ack.js plays a YMODEM batch and an
    XMODEM file into sexyz's stdio mode over a bidirectional File.popen()
    and expects the final ACK on the wire, then EOF, without sending
    anything further that would prompt a flush. Unix only, since stdio
    mode is.

    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

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