now really ignore _type=transition if data is not string

This commit is contained in:
Jan-Piet Mens
2024-04-02 10:53:37 +02:00
parent 1a913d319a
commit f1fad31a9b
+10
View File
@@ -1247,6 +1247,16 @@ void handle_message(void *userdata, char *topic, char *payload, size_t payloadle
}
if (_type == T_TRANSITION) {
JsonNode *e, *d;
e = json_find_member(json, "event");
d = json_find_member(json, "desc");
if (e->tag != JSON_STRING || d->tag != JSON_STRING) {
olog(LOG_DEBUG, "Ignoring _type=transition: event or desc not string");
goto cleanup;
}
}
/*
* We have normalized data in the JSON, so we can now write it