Fix audience command parsing in CommonCLI to correctly handle 9-character prefix. This adjustment ensures proper audience configuration for MQTT slots, enhancing the functionality introduced in previous commits.

This commit is contained in:
agessaman committed 2026-03-30 22:09:34 -07:00
1 parent 1263e71d31
commit a4324a830a
1 file changed
+2 -2
+2 -2
View File
@@ -1457,8 +1457,8 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
_callbacks->restartBridgeSlot(slot);
sprintf(reply, "OK - slot %d topic: %s", slot + 1, _prefs->mqtt_slot_topic[slot]);
}
} else if (memcmp(subcmd, "audience ", 8) == 0) {
StrHelper::strncpy(_prefs->mqtt_slot_audience[slot], &subcmd[8], sizeof(_prefs->mqtt_slot_audience[slot]));
} else if (memcmp(subcmd, "audience ", 9) == 0) {
StrHelper::strncpy(_prefs->mqtt_slot_audience[slot], &subcmd[9], sizeof(_prefs->mqtt_slot_audience[slot]));
savePrefs();
_callbacks->restartBridgeSlot(slot);
if (_prefs->mqtt_slot_audience[slot][0] != '\0') {