• src/sbbs3/pack_qwk.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Sep 18 23:15:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e9e4654c9e69e8778f4aa80d
    Modified Files:
    src/sbbs3/pack_qwk.cpp
    Log Message:
    Don't deliver a QWK packet built from files that failed to write

    pack_qwk() never checked whether its writes to MESSAGES.DAT, HEADERS.DAT, VOTING.DAT or the .NDX files succeeded, and ignored every fclose() result.
    When the temp directory's volume stopped accepting writes, the buffered data (even MESSAGES.DAT's 128-byte header) was lost at close, the empty files were archived, and the packet was reported as a success. QWK hubs received 292-byte packets containing 0-byte MESSAGES.DAT/HEADERS.DAT, failed to unpack them and renamed them *.bad. Because the pack "succeeded", the hubs' message pointers were also advanced, so the messages meant for those packets were never sent.

    Now each of those files is closed through a check of ferror() and fclose(),
    and MESSAGES.DAT must be at least one QWK block long before it is archived.
    Any failure is logged via errormsg() and no packet is created, which also leaves the message pointers alone so the messages go out in the next packet.

    Fixes #1244

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Nov 29 16:11:54 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b303ac1dce6e100b80c911da
    Modified Files:
    src/sbbs3/pack_qwk.cpp
    Log Message:
    QWK: create .NDX index files only when they have an entry

    pack_qwk() opened 000.NDX, each sub-board's <conf>.NDX and PERSONAL.NDX
    before packing, then removed the sub-board and personal indexes if
    nothing had been written to them. On Windows the remove could fail with
    a sharing violation (WinError 32) when another process, such as a virus scanner, had the just-closed file open; since 90e345693a (2026-10-29)
    reported that failure to error.log, where it recurred for PERSONAL.NDX
    during QWK network polls that packed no personal messages.

    Open each index when its first entry is written instead, so an empty
    one is never created and there is nothing to remove. An index that
    cannot be opened still fails the pack. A mail pack in which every
    message was skipped no longer leaves an empty 000.NDX in the packet.

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

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