Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Dec 5, 2024
1 parent 220240a commit 09ad65e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions BSB_LAN/include/mqtt_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,14 @@ void mqtt_callback(char* topic, byte* passed_payload, unsigned int length) {
default: {setmode = 2;break;}
}
param = parsingStringToParameter(payload);
payload=strchr(payload,'=');
payload++;
if (setmode < 2) {
payload=strchr(payload,'=');
if (payload == NULL) {
printFmtToDebug("MQTT message does not contain '=', discarding...\r\n");
return;
}
payload++;
}
} else {
printFmtToDebug("MQTT message not recognized: %s - %s\r\n", topic, payload);
return;
Expand Down

0 comments on commit 09ad65e

Please sign in to comment.