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