BBS: TELESC.NET.BR Assunto: src/sbbs3/mqtt.cpp src/sbbs3/scfg/scfgnet.c De: Deuc¨ Data: Mon, 11 May 2026 07:23:48 -0700 ----------------------------------------------------------- https://gitlab.synchro.net/main/sbbs/-/commit/6fa50f05fd33485fa399a6d1 Modified Files: src/sbbs3/mqtt.cpp src/sbbs3/scfg/scfgnet.c Log Message: mqtt: start internal broker only when broker_addr matches local hostname Previously, enabling "Internal Broker" in SCFG forced broker_addr to 127.0.0.1 and always started the in-process broker. Now the address is configurable and compared against the local hostname (startup->host_name from the INI, falling back to gethostname()). localhost, 127.0.0.1, and ::1 are always treated as local. When the address doesn't match, the server falls through to the normal TCP client path, connecting to the remote broker with whatever TLS mode is configured. This allows multi-host BBS setups where one instance runs the internal broker and the others connect to it over the network. SCFG now shows and allows editing Broker Address in internal broker mode, and only defaults to "localhost" when the field is empty. Note: MQTT still borrows whichever startup struct happens to be passed in by the calling server there is no mqtt_startup_t of its own. This means host_name resolution depends on the caller, and the lputs callback has to be threaded through from whoever called mqtt_startup() rather than being a first-class member of the MQTT config. A dedicated startup struct would clean up both of these and avoid the gethostname() fallback. Co-Authored-By: Claude Opus 4.6 (1M context)n --- mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net ----------------------------------------------------------- [Voltar]