mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 07:08:11 +00:00
[SBI] Crash occurs when ENUM in the MAP (#2103)
This commit is contained in:
parent
ce668c556c
commit
969c116e77
1097 changed files with 266728 additions and 42047 deletions
|
|
@ -60,33 +60,77 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
|
|||
|
||||
void OpenAPI_amf_non3_gpp_access_registration_free(OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == amf_non3_gpp_access_registration) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_instance_id);
|
||||
ogs_free(amf_non3_gpp_access_registration->supported_features);
|
||||
ogs_free(amf_non3_gpp_access_registration->pei);
|
||||
ogs_free(amf_non3_gpp_access_registration->dereg_callback_uri);
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_service_name_dereg);
|
||||
ogs_free(amf_non3_gpp_access_registration->pcscf_restoration_callback_uri);
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_service_name_pcscf_rest);
|
||||
OpenAPI_guami_free(amf_non3_gpp_access_registration->guami);
|
||||
OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, node) {
|
||||
OpenAPI_backup_amf_info_free(node->data);
|
||||
if (amf_non3_gpp_access_registration->amf_instance_id) {
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_instance_id);
|
||||
amf_non3_gpp_access_registration->amf_instance_id = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->supported_features) {
|
||||
ogs_free(amf_non3_gpp_access_registration->supported_features);
|
||||
amf_non3_gpp_access_registration->supported_features = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->pei) {
|
||||
ogs_free(amf_non3_gpp_access_registration->pei);
|
||||
amf_non3_gpp_access_registration->pei = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->dereg_callback_uri) {
|
||||
ogs_free(amf_non3_gpp_access_registration->dereg_callback_uri);
|
||||
amf_non3_gpp_access_registration->dereg_callback_uri = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->amf_service_name_dereg) {
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_service_name_dereg);
|
||||
amf_non3_gpp_access_registration->amf_service_name_dereg = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->pcscf_restoration_callback_uri) {
|
||||
ogs_free(amf_non3_gpp_access_registration->pcscf_restoration_callback_uri);
|
||||
amf_non3_gpp_access_registration->pcscf_restoration_callback_uri = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->amf_service_name_pcscf_rest) {
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_service_name_pcscf_rest);
|
||||
amf_non3_gpp_access_registration->amf_service_name_pcscf_rest = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->guami) {
|
||||
OpenAPI_guami_free(amf_non3_gpp_access_registration->guami);
|
||||
amf_non3_gpp_access_registration->guami = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->backup_amf_info) {
|
||||
OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, node) {
|
||||
OpenAPI_backup_amf_info_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(amf_non3_gpp_access_registration->backup_amf_info);
|
||||
amf_non3_gpp_access_registration->backup_amf_info = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->amf_ee_subscription_id) {
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_ee_subscription_id);
|
||||
amf_non3_gpp_access_registration->amf_ee_subscription_id = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->registration_time) {
|
||||
ogs_free(amf_non3_gpp_access_registration->registration_time);
|
||||
amf_non3_gpp_access_registration->registration_time = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->vgmlc_address) {
|
||||
OpenAPI_vgmlc_address_free(amf_non3_gpp_access_registration->vgmlc_address);
|
||||
amf_non3_gpp_access_registration->vgmlc_address = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->context_info) {
|
||||
OpenAPI_context_info_free(amf_non3_gpp_access_registration->context_info);
|
||||
amf_non3_gpp_access_registration->context_info = NULL;
|
||||
}
|
||||
if (amf_non3_gpp_access_registration->supi) {
|
||||
ogs_free(amf_non3_gpp_access_registration->supi);
|
||||
amf_non3_gpp_access_registration->supi = NULL;
|
||||
}
|
||||
OpenAPI_list_free(amf_non3_gpp_access_registration->backup_amf_info);
|
||||
ogs_free(amf_non3_gpp_access_registration->amf_ee_subscription_id);
|
||||
ogs_free(amf_non3_gpp_access_registration->registration_time);
|
||||
OpenAPI_vgmlc_address_free(amf_non3_gpp_access_registration->vgmlc_address);
|
||||
OpenAPI_context_info_free(amf_non3_gpp_access_registration->context_info);
|
||||
ogs_free(amf_non3_gpp_access_registration->supi);
|
||||
ogs_free(amf_non3_gpp_access_registration);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (amf_non3_gpp_access_registration == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [AmfNon3GppAccessRegistration]");
|
||||
|
|
@ -94,6 +138,10 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
if (!amf_non3_gpp_access_registration->amf_instance_id) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_instance_id]");
|
||||
return NULL;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "amfInstanceId", amf_non3_gpp_access_registration->amf_instance_id) == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [amf_instance_id]");
|
||||
goto end;
|
||||
|
|
@ -120,11 +168,19 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
|
|||
}
|
||||
}
|
||||
|
||||
if (amf_non3_gpp_access_registration->ims_vo_ps == OpenAPI_ims_vo_ps_NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
|
||||
return NULL;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "imsVoPs", OpenAPI_ims_vo_ps_ToString(amf_non3_gpp_access_registration->ims_vo_ps)) == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!amf_non3_gpp_access_registration->dereg_callback_uri) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [dereg_callback_uri]");
|
||||
return NULL;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "deregCallbackUri", amf_non3_gpp_access_registration->dereg_callback_uri) == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [dereg_callback_uri]");
|
||||
goto end;
|
||||
|
|
@ -151,6 +207,10 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
|
|||
}
|
||||
}
|
||||
|
||||
if (!amf_non3_gpp_access_registration->guami) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [guami]");
|
||||
return NULL;
|
||||
}
|
||||
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf_non3_gpp_access_registration->guami);
|
||||
if (guami_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [guami]");
|
||||
|
|
@ -168,20 +228,20 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
|
|||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *backup_amf_info_node;
|
||||
if (amf_non3_gpp_access_registration->backup_amf_info) {
|
||||
OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, backup_amf_info_node) {
|
||||
cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(backup_amf_info_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
|
||||
OpenAPI_list_for_each(amf_non3_gpp_access_registration->backup_amf_info, node) {
|
||||
cJSON *itemLocal = OpenAPI_backup_amf_info_convertToJSON(node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(backup_amf_infoList, itemLocal);
|
||||
}
|
||||
}
|
||||
|
||||
if (amf_non3_gpp_access_registration->rat_type == OpenAPI_rat_type_NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [rat_type]");
|
||||
return NULL;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(amf_non3_gpp_access_registration->rat_type)) == NULL) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [rat_type]");
|
||||
goto end;
|
||||
|
|
@ -255,28 +315,51 @@ end:
|
|||
OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registration_parseFromJSON(cJSON *amf_non3_gpp_access_registrationJSON)
|
||||
{
|
||||
OpenAPI_amf_non3_gpp_access_registration_t *amf_non3_gpp_access_registration_local_var = NULL;
|
||||
cJSON *amf_instance_id = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfInstanceId");
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *amf_instance_id = NULL;
|
||||
cJSON *supported_features = NULL;
|
||||
cJSON *purge_flag = NULL;
|
||||
cJSON *pei = NULL;
|
||||
cJSON *ims_vo_ps = NULL;
|
||||
OpenAPI_ims_vo_ps_e ims_vo_psVariable = 0;
|
||||
cJSON *dereg_callback_uri = NULL;
|
||||
cJSON *amf_service_name_dereg = NULL;
|
||||
cJSON *pcscf_restoration_callback_uri = NULL;
|
||||
cJSON *amf_service_name_pcscf_rest = NULL;
|
||||
cJSON *guami = NULL;
|
||||
OpenAPI_guami_t *guami_local_nonprim = NULL;
|
||||
cJSON *backup_amf_info = NULL;
|
||||
OpenAPI_list_t *backup_amf_infoList = NULL;
|
||||
cJSON *rat_type = NULL;
|
||||
OpenAPI_rat_type_e rat_typeVariable = 0;
|
||||
cJSON *urrp_indicator = NULL;
|
||||
cJSON *amf_ee_subscription_id = NULL;
|
||||
cJSON *registration_time = NULL;
|
||||
cJSON *vgmlc_address = NULL;
|
||||
OpenAPI_vgmlc_address_t *vgmlc_address_local_nonprim = NULL;
|
||||
cJSON *context_info = NULL;
|
||||
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
|
||||
cJSON *no_ee_subscription_ind = NULL;
|
||||
cJSON *supi = NULL;
|
||||
amf_instance_id = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfInstanceId");
|
||||
if (!amf_instance_id) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_instance_id]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsString(amf_instance_id)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_instance_id]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supportedFeatures");
|
||||
|
||||
supported_features = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supportedFeatures");
|
||||
if (supported_features) {
|
||||
if (!cJSON_IsString(supported_features)) {
|
||||
if (!cJSON_IsString(supported_features) && !cJSON_IsNull(supported_features)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [supported_features]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *purge_flag = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "purgeFlag");
|
||||
|
||||
purge_flag = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "purgeFlag");
|
||||
if (purge_flag) {
|
||||
if (!cJSON_IsBool(purge_flag)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [purge_flag]");
|
||||
|
|
@ -284,119 +367,103 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *pei = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pei");
|
||||
|
||||
pei = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pei");
|
||||
if (pei) {
|
||||
if (!cJSON_IsString(pei)) {
|
||||
if (!cJSON_IsString(pei) && !cJSON_IsNull(pei)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pei]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "imsVoPs");
|
||||
ims_vo_ps = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "imsVoPs");
|
||||
if (!ims_vo_ps) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [ims_vo_ps]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_ims_vo_ps_e ims_vo_psVariable;
|
||||
if (!cJSON_IsString(ims_vo_ps)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [ims_vo_ps]");
|
||||
goto end;
|
||||
}
|
||||
ims_vo_psVariable = OpenAPI_ims_vo_ps_FromString(ims_vo_ps->valuestring);
|
||||
|
||||
cJSON *dereg_callback_uri = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "deregCallbackUri");
|
||||
dereg_callback_uri = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "deregCallbackUri");
|
||||
if (!dereg_callback_uri) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [dereg_callback_uri]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!cJSON_IsString(dereg_callback_uri)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [dereg_callback_uri]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *amf_service_name_dereg = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNameDereg");
|
||||
|
||||
amf_service_name_dereg = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNameDereg");
|
||||
if (amf_service_name_dereg) {
|
||||
if (!cJSON_IsString(amf_service_name_dereg)) {
|
||||
if (!cJSON_IsString(amf_service_name_dereg) && !cJSON_IsNull(amf_service_name_dereg)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_dereg]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *pcscf_restoration_callback_uri = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pcscfRestorationCallbackUri");
|
||||
|
||||
pcscf_restoration_callback_uri = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "pcscfRestorationCallbackUri");
|
||||
if (pcscf_restoration_callback_uri) {
|
||||
if (!cJSON_IsString(pcscf_restoration_callback_uri)) {
|
||||
if (!cJSON_IsString(pcscf_restoration_callback_uri) && !cJSON_IsNull(pcscf_restoration_callback_uri)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [pcscf_restoration_callback_uri]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *amf_service_name_pcscf_rest = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNamePcscfRest");
|
||||
|
||||
amf_service_name_pcscf_rest = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfServiceNamePcscfRest");
|
||||
if (amf_service_name_pcscf_rest) {
|
||||
if (!cJSON_IsString(amf_service_name_pcscf_rest)) {
|
||||
if (!cJSON_IsString(amf_service_name_pcscf_rest) && !cJSON_IsNull(amf_service_name_pcscf_rest)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_service_name_pcscf_rest]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *guami = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "guami");
|
||||
guami = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "guami");
|
||||
if (!guami) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [guami]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_guami_t *guami_local_nonprim = NULL;
|
||||
guami_local_nonprim = OpenAPI_guami_parseFromJSON(guami);
|
||||
|
||||
cJSON *backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "backupAmfInfo");
|
||||
|
||||
OpenAPI_list_t *backup_amf_infoList;
|
||||
backup_amf_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "backupAmfInfo");
|
||||
if (backup_amf_info) {
|
||||
cJSON *backup_amf_info_local_nonprimitive;
|
||||
if (!cJSON_IsArray(backup_amf_info)){
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
backup_amf_infoList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(backup_amf_info_local_nonprimitive, backup_amf_info ) {
|
||||
if (!cJSON_IsObject(backup_amf_info_local_nonprimitive)) {
|
||||
cJSON *backup_amf_info_local = NULL;
|
||||
if (!cJSON_IsArray(backup_amf_info)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local_nonprimitive);
|
||||
|
||||
if (!backup_amf_infoItem) {
|
||||
ogs_error("No backup_amf_infoItem");
|
||||
OpenAPI_list_free(backup_amf_infoList);
|
||||
goto end;
|
||||
backup_amf_infoList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(backup_amf_info_local, backup_amf_info) {
|
||||
if (!cJSON_IsObject(backup_amf_info_local)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [backup_amf_info]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_backup_amf_info_t *backup_amf_infoItem = OpenAPI_backup_amf_info_parseFromJSON(backup_amf_info_local);
|
||||
if (!backup_amf_infoItem) {
|
||||
ogs_error("No backup_amf_infoItem");
|
||||
OpenAPI_list_free(backup_amf_infoList);
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
|
||||
}
|
||||
|
||||
OpenAPI_list_add(backup_amf_infoList, backup_amf_infoItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *rat_type = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "ratType");
|
||||
rat_type = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "ratType");
|
||||
if (!rat_type) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [rat_type]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_rat_type_e rat_typeVariable;
|
||||
if (!cJSON_IsString(rat_type)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [rat_type]");
|
||||
goto end;
|
||||
}
|
||||
rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
|
||||
|
||||
cJSON *urrp_indicator = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "urrpIndicator");
|
||||
|
||||
urrp_indicator = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "urrpIndicator");
|
||||
if (urrp_indicator) {
|
||||
if (!cJSON_IsBool(urrp_indicator)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [urrp_indicator]");
|
||||
|
|
@ -404,40 +471,33 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *amf_ee_subscription_id = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfEeSubscriptionId");
|
||||
|
||||
amf_ee_subscription_id = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "amfEeSubscriptionId");
|
||||
if (amf_ee_subscription_id) {
|
||||
if (!cJSON_IsString(amf_ee_subscription_id)) {
|
||||
if (!cJSON_IsString(amf_ee_subscription_id) && !cJSON_IsNull(amf_ee_subscription_id)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [amf_ee_subscription_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *registration_time = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "registrationTime");
|
||||
|
||||
registration_time = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "registrationTime");
|
||||
if (registration_time) {
|
||||
if (!cJSON_IsString(registration_time)) {
|
||||
if (!cJSON_IsString(registration_time) && !cJSON_IsNull(registration_time)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [registration_time]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "vgmlcAddress");
|
||||
|
||||
OpenAPI_vgmlc_address_t *vgmlc_address_local_nonprim = NULL;
|
||||
vgmlc_address = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "vgmlcAddress");
|
||||
if (vgmlc_address) {
|
||||
vgmlc_address_local_nonprim = OpenAPI_vgmlc_address_parseFromJSON(vgmlc_address);
|
||||
}
|
||||
|
||||
cJSON *context_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "contextInfo");
|
||||
|
||||
OpenAPI_context_info_t *context_info_local_nonprim = NULL;
|
||||
context_info = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "contextInfo");
|
||||
if (context_info) {
|
||||
context_info_local_nonprim = OpenAPI_context_info_parseFromJSON(context_info);
|
||||
}
|
||||
|
||||
cJSON *no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "noEeSubscriptionInd");
|
||||
|
||||
no_ee_subscription_ind = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "noEeSubscriptionInd");
|
||||
if (no_ee_subscription_ind) {
|
||||
if (!cJSON_IsBool(no_ee_subscription_ind)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [no_ee_subscription_ind]");
|
||||
|
|
@ -445,10 +505,9 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *supi = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supi");
|
||||
|
||||
supi = cJSON_GetObjectItemCaseSensitive(amf_non3_gpp_access_registrationJSON, "supi");
|
||||
if (supi) {
|
||||
if (!cJSON_IsString(supi)) {
|
||||
if (!cJSON_IsString(supi) && !cJSON_IsNull(supi)) {
|
||||
ogs_error("OpenAPI_amf_non3_gpp_access_registration_parseFromJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -456,31 +515,50 @@ OpenAPI_amf_non3_gpp_access_registration_t *OpenAPI_amf_non3_gpp_access_registra
|
|||
|
||||
amf_non3_gpp_access_registration_local_var = OpenAPI_amf_non3_gpp_access_registration_create (
|
||||
ogs_strdup(amf_instance_id->valuestring),
|
||||
supported_features ? ogs_strdup(supported_features->valuestring) : NULL,
|
||||
supported_features && !cJSON_IsNull(supported_features) ? ogs_strdup(supported_features->valuestring) : NULL,
|
||||
purge_flag ? true : false,
|
||||
purge_flag ? purge_flag->valueint : 0,
|
||||
pei ? ogs_strdup(pei->valuestring) : NULL,
|
||||
pei && !cJSON_IsNull(pei) ? ogs_strdup(pei->valuestring) : NULL,
|
||||
ims_vo_psVariable,
|
||||
ogs_strdup(dereg_callback_uri->valuestring),
|
||||
amf_service_name_dereg ? ogs_strdup(amf_service_name_dereg->valuestring) : NULL,
|
||||
pcscf_restoration_callback_uri ? ogs_strdup(pcscf_restoration_callback_uri->valuestring) : NULL,
|
||||
amf_service_name_pcscf_rest ? ogs_strdup(amf_service_name_pcscf_rest->valuestring) : NULL,
|
||||
amf_service_name_dereg && !cJSON_IsNull(amf_service_name_dereg) ? ogs_strdup(amf_service_name_dereg->valuestring) : NULL,
|
||||
pcscf_restoration_callback_uri && !cJSON_IsNull(pcscf_restoration_callback_uri) ? ogs_strdup(pcscf_restoration_callback_uri->valuestring) : NULL,
|
||||
amf_service_name_pcscf_rest && !cJSON_IsNull(amf_service_name_pcscf_rest) ? ogs_strdup(amf_service_name_pcscf_rest->valuestring) : NULL,
|
||||
guami_local_nonprim,
|
||||
backup_amf_info ? backup_amf_infoList : NULL,
|
||||
rat_typeVariable,
|
||||
urrp_indicator ? true : false,
|
||||
urrp_indicator ? urrp_indicator->valueint : 0,
|
||||
amf_ee_subscription_id ? ogs_strdup(amf_ee_subscription_id->valuestring) : NULL,
|
||||
registration_time ? ogs_strdup(registration_time->valuestring) : NULL,
|
||||
amf_ee_subscription_id && !cJSON_IsNull(amf_ee_subscription_id) ? ogs_strdup(amf_ee_subscription_id->valuestring) : NULL,
|
||||
registration_time && !cJSON_IsNull(registration_time) ? ogs_strdup(registration_time->valuestring) : NULL,
|
||||
vgmlc_address ? vgmlc_address_local_nonprim : NULL,
|
||||
context_info ? context_info_local_nonprim : NULL,
|
||||
no_ee_subscription_ind ? true : false,
|
||||
no_ee_subscription_ind ? no_ee_subscription_ind->valueint : 0,
|
||||
supi ? ogs_strdup(supi->valuestring) : NULL
|
||||
supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL
|
||||
);
|
||||
|
||||
return amf_non3_gpp_access_registration_local_var;
|
||||
end:
|
||||
if (guami_local_nonprim) {
|
||||
OpenAPI_guami_free(guami_local_nonprim);
|
||||
guami_local_nonprim = NULL;
|
||||
}
|
||||
if (backup_amf_infoList) {
|
||||
OpenAPI_list_for_each(backup_amf_infoList, node) {
|
||||
OpenAPI_backup_amf_info_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(backup_amf_infoList);
|
||||
backup_amf_infoList = NULL;
|
||||
}
|
||||
if (vgmlc_address_local_nonprim) {
|
||||
OpenAPI_vgmlc_address_free(vgmlc_address_local_nonprim);
|
||||
vgmlc_address_local_nonprim = NULL;
|
||||
}
|
||||
if (context_info_local_nonprim) {
|
||||
OpenAPI_context_info_free(context_info_local_nonprim);
|
||||
context_info_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue