mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-01 11:25:44 +00:00
Update src/mqtt/MQTT.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
0bfbd189d1
commit
1bc5cc4860
@ -644,7 +644,8 @@ bool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTC
|
|||||||
meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();
|
meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();
|
||||||
cn->level = meshtastic_LogRecord_Level_ERROR;
|
cn->level = meshtastic_LogRecord_Level_ERROR;
|
||||||
cn->time = getValidTime(RTCQualityFromNet);
|
cn->time = getValidTime(RTCQualityFromNet);
|
||||||
strcpy(cn->message, warning);
|
strncpy(cn->message, warning, sizeof(cn->message) - 1);
|
||||||
|
cn->message[sizeof(cn->message) - 1] = '\0'; // Ensure null termination
|
||||||
service->sendClientNotification(cn);
|
service->sendClientNotification(cn);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user