[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

@ -724,6 +724,14 @@ cJSON *OpenAPI_sm_policy_update_context_data_convertToJSON(OpenAPI_sm_policy_upd
if (sm_policy_update_context_data->rep_pra_infos) {
OpenAPI_list_for_each(sm_policy_update_context_data->rep_pra_infos, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
if (localKeyValue == NULL) {
ogs_error("OpenAPI_sm_policy_update_context_data_convertToJSON() failed [rep_pra_infos]");
goto end;
}
if (localKeyValue->key == NULL) {
ogs_error("OpenAPI_sm_policy_update_context_data_convertToJSON() failed [rep_pra_infos]");
goto end;
}
cJSON *itemLocal = localKeyValue->value ?
OpenAPI_presence_info_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();