Add only one 5GC scenario (call-flow)

This commit is contained in:
Sukchan Lee 2020-06-17 01:22:28 -04:00
parent 20008b6a13
commit dbee687a75
1415 changed files with 86635 additions and 5877 deletions

View file

@ -18,7 +18,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_cre
OpenAPI_guami_t *guami,
OpenAPI_list_t *backup_amf_info,
int dr_flag,
OpenAPI_rat_type_t *rat_type,
OpenAPI_rat_type_e rat_type,
int urrp_indicator,
char *amf_ee_subscription_id,
int ue_srvcc_capability,
@ -78,7 +78,6 @@ void OpenAPI_amf3_gpp_access_registration_free(OpenAPI_amf3_gpp_access_registrat
OpenAPI_backup_amf_info_free(node->data);
}
OpenAPI_list_free(amf3_gpp_access_registration->backup_amf_info);
OpenAPI_rat_type_free(amf3_gpp_access_registration->rat_type);
ogs_free(amf3_gpp_access_registration->amf_ee_subscription_id);
ogs_free(amf3_gpp_access_registration->nid);
ogs_free(amf3_gpp_access_registration->registration_time);
@ -114,7 +113,7 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (amf3_gpp_access_registration->purge_flag >= 0) {
if (amf3_gpp_access_registration->purge_flag) {
if (cJSON_AddBoolToObject(item, "purgeFlag", amf3_gpp_access_registration->purge_flag) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [purge_flag]");
goto end;
@ -171,7 +170,7 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (amf3_gpp_access_registration->initial_registration_ind >= 0) {
if (amf3_gpp_access_registration->initial_registration_ind) {
if (cJSON_AddBoolToObject(item, "initialRegistrationInd", amf3_gpp_access_registration->initial_registration_ind) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [initial_registration_ind]");
goto end;
@ -213,7 +212,7 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (amf3_gpp_access_registration->dr_flag >= 0) {
if (amf3_gpp_access_registration->dr_flag) {
if (cJSON_AddBoolToObject(item, "drFlag", amf3_gpp_access_registration->dr_flag) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [dr_flag]");
goto end;
@ -224,18 +223,12 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [rat_type]");
goto end;
}
cJSON *rat_type_local_JSON = OpenAPI_rat_type_convertToJSON(amf3_gpp_access_registration->rat_type);
if (rat_type_local_JSON == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [rat_type]");
goto end;
}
cJSON_AddItemToObject(item, "ratType", rat_type_local_JSON);
if (item->child == NULL) {
if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(amf3_gpp_access_registration->rat_type)) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [rat_type]");
goto end;
}
if (amf3_gpp_access_registration->urrp_indicator >= 0) {
if (amf3_gpp_access_registration->urrp_indicator) {
if (cJSON_AddBoolToObject(item, "urrpIndicator", amf3_gpp_access_registration->urrp_indicator) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [urrp_indicator]");
goto end;
@ -249,7 +242,7 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (amf3_gpp_access_registration->ue_srvcc_capability >= 0) {
if (amf3_gpp_access_registration->ue_srvcc_capability) {
if (cJSON_AddBoolToObject(item, "ueSrvccCapability", amf3_gpp_access_registration->ue_srvcc_capability) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [ue_srvcc_capability]");
goto end;
@ -440,9 +433,13 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
goto end;
}
OpenAPI_rat_type_t *rat_type_local_nonprim = NULL;
OpenAPI_rat_type_e rat_typeVariable;
rat_type_local_nonprim = OpenAPI_rat_type_parseFromJSON(rat_type);
if (!cJSON_IsString(rat_type)) {
ogs_error("OpenAPI_amf3_gpp_access_registration_parseFromJSON() failed [rat_type]");
goto end;
}
rat_typeVariable = OpenAPI_rat_type_FromString(rat_type->valuestring);
cJSON *urrp_indicator = cJSON_GetObjectItemCaseSensitive(amf3_gpp_access_registrationJSON, "urrpIndicator");
@ -530,7 +527,7 @@ OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_par
guami_local_nonprim,
backup_amf_info ? backup_amf_infoList : NULL,
dr_flag ? dr_flag->valueint : 0,
rat_type_local_nonprim,
rat_typeVariable,
urrp_indicator ? urrp_indicator->valueint : 0,
amf_ee_subscription_id ? ogs_strdup(amf_ee_subscription_id->valuestring) : NULL,
ue_srvcc_capability ? ue_srvcc_capability->valueint : 0,
@ -546,3 +543,37 @@ end:
return NULL;
}
OpenAPI_amf3_gpp_access_registration_t *OpenAPI_amf3_gpp_access_registration_copy(OpenAPI_amf3_gpp_access_registration_t *dst, OpenAPI_amf3_gpp_access_registration_t *src)
{
cJSON *item = NULL;
char *content = NULL;
ogs_assert(src);
item = OpenAPI_amf3_gpp_access_registration_convertToJSON(src);
if (!item) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed");
return NULL;
}
content = cJSON_Print(item);
cJSON_Delete(item);
if (!content) {
ogs_error("cJSON_Print() failed");
return NULL;
}
item = cJSON_Parse(content);
ogs_free(content);
if (!item) {
ogs_error("cJSON_Parse() failed");
return NULL;
}
OpenAPI_amf3_gpp_access_registration_free(dst);
dst = OpenAPI_amf3_gpp_access_registration_parseFromJSON(item);
cJSON_Delete(item);
return dst;
}