From f1fad31a9bfab55c7d6bb799d762bccf730d12e6 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 27 Feb 2024 08:28:18 +0100 Subject: [PATCH] now really ignore _type=transition if data is not string --- recorder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recorder.c b/recorder.c index f810124..ea889ce 100644 --- a/recorder.c +++ b/recorder.c @@ -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