JSON string type control. Relability fix

This commit is contained in:
2020-01-10 00:45:32 +03:00
parent 602a997757
commit 7dd48f78d4
6 changed files with 77 additions and 42 deletions

View File

@@ -30,7 +30,7 @@ int abstractIn::publish(char * value, const char* subtopic)
if (in)
{
aJsonObject *emit = aJson.getObjectItem(in->inputObj, "emit");
if (emit)
if (emit && emit->type == aJson_String)
{
return publishTopic(emit->valuestring,value,subtopic);
}