[Release-17] Upgrade SBI to v17.x.0

This commit is contained in:
Sukchan Lee 2023-03-01 19:56:49 +09:00
parent 969c116e77
commit 4d44b1843e
1687 changed files with 121604 additions and 9310 deletions

View file

@ -5,13 +5,15 @@
#include "sor_update_info.h"
OpenAPI_sor_update_info_t *OpenAPI_sor_update_info_create(
OpenAPI_plmn_id_t *vplmn_id
OpenAPI_plmn_id_t *vplmn_id,
char *supported_features
)
{
OpenAPI_sor_update_info_t *sor_update_info_local_var = ogs_malloc(sizeof(OpenAPI_sor_update_info_t));
ogs_assert(sor_update_info_local_var);
sor_update_info_local_var->vplmn_id = vplmn_id;
sor_update_info_local_var->supported_features = supported_features;
return sor_update_info_local_var;
}
@ -27,6 +29,10 @@ void OpenAPI_sor_update_info_free(OpenAPI_sor_update_info_t *sor_update_info)
OpenAPI_plmn_id_free(sor_update_info->vplmn_id);
sor_update_info->vplmn_id = NULL;
}
if (sor_update_info->supported_features) {
ogs_free(sor_update_info->supported_features);
sor_update_info->supported_features = NULL;
}
ogs_free(sor_update_info);
}
@ -56,6 +62,13 @@ cJSON *OpenAPI_sor_update_info_convertToJSON(OpenAPI_sor_update_info_t *sor_upda
goto end;
}
if (sor_update_info->supported_features) {
if (cJSON_AddStringToObject(item, "supportedFeatures", sor_update_info->supported_features) == NULL) {
ogs_error("OpenAPI_sor_update_info_convertToJSON() failed [supported_features]");
goto end;
}
}
end:
return item;
}
@ -66,6 +79,7 @@ OpenAPI_sor_update_info_t *OpenAPI_sor_update_info_parseFromJSON(cJSON *sor_upda
OpenAPI_lnode_t *node = NULL;
cJSON *vplmn_id = NULL;
OpenAPI_plmn_id_t *vplmn_id_local_nonprim = NULL;
cJSON *supported_features = NULL;
vplmn_id = cJSON_GetObjectItemCaseSensitive(sor_update_infoJSON, "vplmnId");
if (!vplmn_id) {
ogs_error("OpenAPI_sor_update_info_parseFromJSON() failed [vplmn_id]");
@ -73,8 +87,17 @@ OpenAPI_sor_update_info_t *OpenAPI_sor_update_info_parseFromJSON(cJSON *sor_upda
}
vplmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(vplmn_id);
supported_features = cJSON_GetObjectItemCaseSensitive(sor_update_infoJSON, "supportedFeatures");
if (supported_features) {
if (!cJSON_IsString(supported_features) && !cJSON_IsNull(supported_features)) {
ogs_error("OpenAPI_sor_update_info_parseFromJSON() failed [supported_features]");
goto end;
}
}
sor_update_info_local_var = OpenAPI_sor_update_info_create (
vplmn_id_local_nonprim
vplmn_id_local_nonprim,
supported_features && !cJSON_IsNull(supported_features) ? ogs_strdup(supported_features->valuestring) : NULL
);
return sor_update_info_local_var;