• docs/v322_new.md src/sbbs3/js_global.cpp js_socket.cpp jsexec.cpp mail

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sun Oct 25 18:47:24 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/45782f780df71c073a2beb92
    Modified Files:
    docs/v322_new.md src/sbbs3/js_global.cpp js_socket.cpp jsexec.cpp mailsrvr.cpp main.cpp sbbs.h services.cpp websrvr.cpp
    Log Message:
    Route JS Socket log output to the script host's logger, not the terminal server's

    js_socket.cpp logged everything through the file-global lprintf(), which
    inside sbbs.dll/libsbbs.so resolves to main.cpp's terminal-server logger.
    The mail, web and services servers each keep their own static lprintf(),
    so a Socket's debug trace, TLS errors and listening-socket failures from
    their scripts appeared in the Terminal Server's log, were tagged "term"
    in error.log and published under the terminal server's MQTT topic.
    Under jsexec on Windows the terminal startup is NULL, so the output was
    dropped entirely and errors were written to an error.log in the current directory through the DLL's zeroed scfg. This dates from the Socket
    class's introduction in a8352397c7 (2001-06-12); the TODO noting it was
    added in 34587421f7 (2023-11-21).

    Add an lprintf function pointer to js_callback_t, set by every host when
    it initializes its callback struct and inherited by background load()
    threads. js_socket.cpp resolves its logger through the socket's js_cb,
    falling back to the terminal server's when a host set none, and passes
    the same pointer to ssl_sync(), add_private_key(), destroy_session() and xpms_create(). The cryptlib attribute helpers take the socket private
    struct instead of a bare session so they can reach it, and their TLS
    messages now carry the socket number like the rest.

    Resolves #700

    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)