[SBI] Fixed a bug with encoder/decoder of scpPorts

(#2310, #2274)
This commit is contained in:
Sukchan Lee 2023-05-14 07:00:22 +09:00
parent 1ba7a73abd
commit 63df530bb4
123 changed files with 2132 additions and 42 deletions

View file

@ -102,6 +102,14 @@ cJSON *OpenAPI_traffic_descriptor_components_convertToJSON(OpenAPI_traffic_descr
if (traffic_descriptor_components->app_descs) {
OpenAPI_list_for_each(traffic_descriptor_components->app_descs, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
if (localKeyValue == NULL) {
ogs_error("OpenAPI_traffic_descriptor_components_convertToJSON() failed [app_descs]");
goto end;
}
if (localKeyValue->key == NULL) {
ogs_error("OpenAPI_traffic_descriptor_components_convertToJSON() failed [app_descs]");
goto end;
}
cJSON *itemLocal = localKeyValue->value ?
OpenAPI_app_descriptor_1_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();