simple 5GC registration is done

This commit is contained in:
Sukchan Lee 2020-06-21 23:07:14 -04:00
parent bcd02b1f33
commit b35c2277be
213 changed files with 7713 additions and 5445 deletions

View file

@ -5,7 +5,7 @@
#include "release_data.h"
OpenAPI_release_data_t *OpenAPI_release_data_create(
OpenAPI_cause_t *cause,
OpenAPI_cause_e cause,
OpenAPI_ng_ap_cause_t *ng_ap_cause,
int _5g_mm_cause_value,
OpenAPI_user_location_t *ue_location,
@ -37,7 +37,6 @@ void OpenAPI_release_data_free(OpenAPI_release_data_t *release_data)
return;
}
OpenAPI_lnode_t *node;
OpenAPI_cause_free(release_data->cause);
OpenAPI_ng_ap_cause_free(release_data->ng_ap_cause);
OpenAPI_user_location_free(release_data->ue_location);
ogs_free(release_data->ue_time_zone);
@ -64,13 +63,7 @@ cJSON *OpenAPI_release_data_convertToJSON(OpenAPI_release_data_t *release_data)
item = cJSON_CreateObject();
if (release_data->cause) {
cJSON *cause_local_JSON = OpenAPI_cause_convertToJSON(release_data->cause);
if (cause_local_JSON == NULL) {
ogs_error("OpenAPI_release_data_convertToJSON() failed [cause]");
goto end;
}
cJSON_AddItemToObject(item, "cause", cause_local_JSON);
if (item->child == NULL) {
if (cJSON_AddStringToObject(item, "cause", OpenAPI_cause_ToString(release_data->cause)) == NULL) {
ogs_error("OpenAPI_release_data_convertToJSON() failed [cause]");
goto end;
}
@ -178,9 +171,13 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS
OpenAPI_release_data_t *release_data_local_var = NULL;
cJSON *cause = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "cause");
OpenAPI_cause_t *cause_local_nonprim = NULL;
OpenAPI_cause_e causeVariable;
if (cause) {
cause_local_nonprim = OpenAPI_cause_parseFromJSON(cause);
if (!cJSON_IsString(cause)) {
ogs_error("OpenAPI_release_data_parseFromJSON() failed [cause]");
goto end;
}
causeVariable = OpenAPI_cause_FromString(cause->valuestring);
}
cJSON *ng_ap_cause = cJSON_GetObjectItemCaseSensitive(release_dataJSON, "ngApCause");
@ -269,7 +266,7 @@ OpenAPI_release_data_t *OpenAPI_release_data_parseFromJSON(cJSON *release_dataJS
}
release_data_local_var = OpenAPI_release_data_create (
cause ? cause_local_nonprim : NULL,
cause ? causeVariable : 0,
ng_ap_cause ? ng_ap_cause_local_nonprim : NULL,
_5g_mm_cause_value ? _5g_mm_cause_value->valuedouble : 0,
ue_location ? ue_location_local_nonprim : NULL,