add update param to SendIotDescriptors

This commit is contained in:
Terrence
2025-03-08 03:26:15 +08:00
parent 968bf0e2eb
commit b8bf6bea2e

View File

@ -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));