• src/sbbs3/main.cpp sbbs.h

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Monday, November 03, 2025 23:07:00
    https://gitlab.synchro.net/main/sbbs/-/commit/1372d896d8238236c7eec79e
    Modified Files:
    src/sbbs3/main.cpp sbbs.h xtrn_sec.cpp
    Log Message:
    Don't let user run external program that's executing its assigned event

    ... using 0-byte semfile: data/event.<code>.running

    The second part of fix for issue #998

    Kind of abusing/reusing a node status string for the error message displayed
    to a user that tries to run the program while the event is running. Might want to address that (support an error display file or other text.dat string) later.

    Background events don't work for this (since we never know if/when they're finished executing).

    If an event is configured to run exclusive, but on "any node" and you run multiple instances of sbbs (using the same data dir), then this isn't going
    to work for you since the event thread deletes any stale semfiles when it starts up.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Monday, January 19, 2026 01:20:00
    https://gitlab.synchro.net/main/sbbs/-/commit/460b5f93b2dd5eca7bfee64b
    Modified Files:
    src/sbbs3/main.cpp sbbs.h
    Log Message:
    Log the total amount of user and mail data backed-up daily (in bytes)

    This was done previous, file by file, at debug log level, in exact bytes.
    That detail is still logged, however the "DAILY: Backing-up ..." log messages are now debug (instead of info) level messages and the total number of bytes (estimated) is now logged at info-level after the backup has completed with "DAILY: Backed-up ..." messages.

    This allows easier tracking of the mail and user base growth over time through log analysis (if the sysop has auto-backups enabled).

    With possible use of "Fast Allocation" (instead of Self-packing) for the
    mail base, it is important that a sysop should be able to easily track the growth rate over time to determine the (necessary) packing interval.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Tuesday, February 10, 2026 03:04:00
    https://gitlab.synchro.net/main/sbbs/-/commit/e4cab7de5d2dabb47b8a8ee8
    Modified Files:
    src/sbbs3/main.cpp sbbs.h str.cpp
    Log Message:
    Enable cached filter file (ip.can, host.can) support in the terminal server

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Saturday, June 06, 2026 02:23:00
    https://gitlab.synchro.net/main/sbbs/-/commit/9cf170c0246a40f6d502d8b1
    Modified Files:
    src/sbbs3/main.cpp sbbs.h str.cpp
    Log Message:
    Terminal server: fully transmit pre-disconnect message before close (#1157)

    Messages shown to a client immediately before disconnecting (nonodes.txt
    when all nodes are full or node init fails, and badip.msg/badhost.msg for blocked clients) were intermittently not seen by the caller.

    Root cause: these paths printed the file then called flush_output(), which waits on outbuf.empty_event. That event fires when output_thread moves the ring-buffer contents into its *linear* buffer (RingBufRead), not when those bytes are actually sent over the socket. flush_output() therefore returned
    in the gap between ring->linear hand-off and the sendsocket(), the caller closed the socket, and output_thread's send then failed on the closed FD ("!ERROR ... sending on socket"). The result was a thread-scheduling race, matching the reporter's intermittent, protocol-independent symptom.

    Add sbbs_t::WaitForOutbufDrained(timeout): wait for the ring buffer to
    empty AND for output_thread's linear buffer to be transmitted, tracked via
    a new output_thread_busy atomic (set before the ring->linear read so the empty_event hand-off can't be mistaken for "everything sent", cleared once
    the linear buffer is fully sent). Use it in place of flush_output() at the
    two nonodes.txt disconnect sites (main.cpp) and in trashcan_msg() (str.cpp).

    flush_output() is retained for outcom()'s transmit-backpressure retry loop, where "wait for ring-buffer space" (with its online short-circuit) is the correct semantics.

    The nonodes drop-before-close pattern is from ff1aae498 (same-3-jazz); trashcan_msg()'s flush_output(500) is from 424dfe107 (cold-36-task); the underlying empty_event-means-ring-drained-not-sent gap is inherent to the two-stage output_thread design.

    Reported by xbit with detailed cross-client testing.

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

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