• src/sbbs3/mqtt.cpp

    From Deuc¿@VERT to Git commit to main/sbbs/master on Mon May 11 11:03:03 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/6c26a249234f5457bc25dae1
    Modified Files:
    src/sbbs3/mqtt.cpp
    Log Message:
    mqtt.cpp: guard internal-client-only statics with #ifndef USE_MOSQUITTO

    The lputs adapter, its mutex, and pthread_once init are only used by
    the internal client connect path, not the mosquitto path.

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Aug 6 11:27:43 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b073feab243a6e9136962c24
    Modified Files:
    src/sbbs3/mqtt.cpp
    Log Message:
    mqtt: recognize OS hostname for internal broker

    Internal broker selection preferred startup->host_name whenever it was configured and used gethostname() only as a fallback. When Synchronet's
    global hostname differed from the machine hostname, a broker address
    matching the machine was classified as remote. No process started the
    internal listener, and every server attempted a failing TCP connection
    instead.

    Compare the broker address independently against both the OS hostname
    and the configured service hostname. Also initialize and explicitly
    terminate the gethostname() buffer so a lookup failure or maximum-length
    result cannot affect the comparison. Remote broker addresses continue to
    take the TCP client path.

    Verified by compiling:
    clang.freebsd.amd64.obj.debug-mt/mqtt.o
    and running git diff --check.

    Co-Authored-By: OpenAI Codex <noreply@openai.com>

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