[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

@ -400,6 +400,14 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
if (access_and_mobility_subscription_data->shared_vn_group_data_ids) {
OpenAPI_list_for_each(access_and_mobility_subscription_data->shared_vn_group_data_ids, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
if (localKeyValue == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_vn_group_data_ids]");
goto end;
}
if (localKeyValue->key == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [shared_vn_group_data_ids]");
goto end;
}
if (cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [inner]");
goto end;
@ -834,6 +842,14 @@ cJSON *OpenAPI_access_and_mobility_subscription_data_convertToJSON(OpenAPI_acces
if (access_and_mobility_subscription_data->adjacent_plmn_restrictions) {
OpenAPI_list_for_each(access_and_mobility_subscription_data->adjacent_plmn_restrictions, node) {
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)node->data;
if (localKeyValue == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [adjacent_plmn_restrictions]");
goto end;
}
if (localKeyValue->key == NULL) {
ogs_error("OpenAPI_access_and_mobility_subscription_data_convertToJSON() failed [adjacent_plmn_restrictions]");
goto end;
}
cJSON *itemLocal = localKeyValue->value ?
OpenAPI_plmn_restriction_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();