From b8bf6bea2eeb775b751016d0cc6cd8c7f1257d1d Mon Sep 17 00:00:00 2001 From: Terrence Date: Sat, 8 Mar 2025 03:26:15 +0800 Subject: [PATCH] add update param to SendIotDescriptors --- main/protocols/protocol.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/main/protocols/protocol.cc b/main/protocols/protocol.cc index 3672559c..b2c079f7 100644 --- a/main/protocols/protocol.cc +++ b/main/protocols/protocol.cc @@ -89,6 +89,7 @@ void Protocol::SendIotDescriptors(const std::string& descriptors) { cJSON* messageRoot = cJSON_CreateObject(); cJSON_AddStringToObject(messageRoot, "session_id", session_id_.c_str()); cJSON_AddStringToObject(messageRoot, "type", "iot"); + cJSON_AddBoolToObject(messageRoot, "update", true); cJSON* descriptorArray = cJSON_CreateArray(); cJSON_AddItemToArray(descriptorArray, cJSON_Duplicate(descriptor, 1));