• src/sbbs3/services.cpp

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Fri Dec 12 23:42:12 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/23e465ca78e0348003d6cc70
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    Hack around the protected_uint32_t allocation issue

    macOS builds failling with link errors:

    Undefined symbols for architecture arm64:
    "operator new(unsigned long)", referenced from:
    _services_thread in services.o
    ld: symbol(s) not found for architecture arm64

    and

    Undefined symbols for architecture x86_64:
    "operator new(unsigned long)", referenced from:
    _services_thread in services.o
    ld: symbol(s) not found for architecture x86_64

    We need to use new for when the std Atomic class is used however, since we
    need (?) to invoke the constructor.
    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sat Dec 13 00:10:42 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9a41a0d4fb4a61dfa78ea8d4
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    Revert "Hack around the protected_uint32_t allocation issue"

    This reverts commit 23e465ca78e0348003d6cc7023213519421bf25d.
    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sat Dec 13 15:23:19 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/af34887eb934266787192c8e
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    Fix the (newly introduced, small) service[].clients memory leak
    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sat Jan 17 14:10:39 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/0d6074e0dbc8566359e90f8d
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    Missed a spot where logoutuserdat was called without checking LoginInfoSave ARS --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Wed May 6 19:41:53 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/306c753155781bdb5147f988
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    services: suppress login_attempt_list lock false-positives (CIDs 631138, 631139, 639948, 643135)

    loginAttempts() and loginBanned() each call listLock+listUnlock
    internally on the link_list, leaving the mutex unlocked across the
    return. Coverity's inter-procedural lock tracking misses the matching
    unlock and reports:
    - LOCK: native_service_thread returning without unlocking
    - SLEEP: mswait while holding the lock (after loginAttempts)
    - LOCK: loginBanned re-locks while supposedly already locked

    None of these are real — the call sites never hold the mutex. Annotate
    the call sites with a SUPPRESS pointing at the invariant.

    CID 643138 (Y2K38_SAFETY for time32_t cast in connect-rate report) is deliberate — timestr() is a time32_t API by design — and is left for
    the project-wide Y2K38 architectural decision.

    Co-Authored-By: Claude Opus 4.7 <[email protected]>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Thu Jun 4 19:01:13 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/cfa6fe9e126476a9f3db8384
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    services: don't apply JS disconnection check to static services

    ead5ccf16 (song-11-earn) added a disconnection check to the Services
    server's js_OperationCallback() that aborts a script once its client
    socket has been gone for 10 consecutive callbacks (socket_check() of client->socket fails). This is correct for per-connection services
    (accepted client socket), but static services (SERVICE_OPT_STATIC -
    e.g. the IRC daemon, MRC connector) run via js_static_service_thread()
    with a zero-initialized service_client whose .socket is never set (0). socket_check(0, ...) returns false, so auto_terminate static services
    were wrongly warned "Disconnected" and aborted after 10 callbacks, then
    (being STATIC_LOOP) immediately restarted - cycling endlessly.

    Gate the disconnection check on !(client->service->options & SERVICE_OPT_STATIC) so it only runs for real per-client connections.

    Fixes #1156 (reported by Accession).

    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Thu Jun 4 19:13:32 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/55a7e431ba36a37bb5b64c79
    Modified Files:
    src/sbbs3/services.cpp
    Log Message:
    services: init static-service client socket to INVALID_SOCKET, not 0

    js_static_service_thread() memset()s its service_client to zero and never assigns .socket, leaving it 0 - a valid file descriptor (stdin), not the codebase's "no socket" sentinel. The thread already passes INVALID_SOCKET
    to js_initcx(), but js_initcx() doesn't store its sock arg into the struct,
    so the field silently stayed 0. Set it to INVALID_SOCKET explicitly so no
    code path mistakes fd 0 for a live client socket.

    Hygiene follow-up to cfa6fe9e1 (bolt-11-banner) / #1156; not a behavior
    change (socket_check() already returns false for both 0 and INVALID_SOCKET,
    so the SERVICE_OPT_STATIC guard remains the actual fix).

    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)