File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,8 @@ struct PubSubConfig {
279279
280280 // Defaults
281281 static constexpr uint16_t defaultPort = 1883 ;
282+ static constexpr uint16_t defaultPortTls = 8883 ;
283+
282284 uint16_t serverPort = defaultPort;
283285 String serverAddr = default_mqtt_address;
284286 const char *mqttUsername = default_mqtt_username;
@@ -641,7 +643,7 @@ bool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTC
641643 }
642644
643645 const bool defaultServer = isDefaultServer (parsed.serverAddr );
644- if (defaultServer && parsed.serverPort != PubSubConfig::defaultPort) {
646+ if (defaultServer && ! IS_ONE_OF ( parsed.serverPort , PubSubConfig::defaultPort, PubSubConfig::defaultPortTls) ) {
645647 const char *warning = " Invalid MQTT config: default server address must not have a port specified" ;
646648 LOG_ERROR (warning);
647649#if !IS_RUNNING_TESTS
You can’t perform that action at this time.
0 commit comments