[AMF] security protection (UERANSIM-issues316)

1. Allocate ngKSI other than the value already used.
2. Add the protection of Service request
3. fix SBI convert error ng_ap_cause
This commit is contained in:
Sukchan Lee 2021-05-08 13:24:17 +09:00
parent b0e8dbb31a
commit 5ea9b22209
384 changed files with 226 additions and 2699 deletions

View File

@ -229,7 +229,8 @@ ED3(uint8_t spare:4;,
typedef struct ogs_nas_5gs_registration_type_s {
union {
struct {
ED3(uint8_t type:4;,
ED4(uint8_t tsc:1;,
uint8_t ksi:3;,
uint8_t follow_on_request:1;,
uint8_t value:3;)
};

View File

@ -227,14 +227,6 @@ cJSON *OpenAPI_{{classname}}_convertToJSON(OpenAPI_{{classname}}_t *{{classname}
item = cJSON_CreateObject();
{{#vars}}
{{#required}}
{{^isBoolean}}
if (!{{{classname}}}->{{{name}}}) {
ogs_error("OpenAPI_{{classname}}_convertToJSON() failed [{{{name}}}]");
goto end;
}
{{/isBoolean}}
{{/required}}
{{^required}}
if ({{{classname}}}->{{{name}}}) {
{{/required}}

View File

@ -44,10 +44,6 @@ cJSON *OpenAPI_acc_net_ch_id_convertToJSON(OpenAPI_acc_net_ch_id_t *acc_net_ch_i
}
item = cJSON_CreateObject();
if (!acc_net_ch_id->acc_net_cha_id_value) {
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [acc_net_cha_id_value]");
goto end;
}
if (cJSON_AddNumberToObject(item, "accNetChaIdValue", acc_net_ch_id->acc_net_cha_id_value) == NULL) {
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [acc_net_cha_id_value]");
goto end;

View File

@ -53,10 +53,6 @@ cJSON *OpenAPI_accu_usage_report_convertToJSON(OpenAPI_accu_usage_report_t *accu
}
item = cJSON_CreateObject();
if (!accu_usage_report->ref_um_ids) {
ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [ref_um_ids]");
goto end;
}
if (cJSON_AddStringToObject(item, "refUmIds", accu_usage_report->ref_um_ids) == NULL) {
ogs_error("OpenAPI_accu_usage_report_convertToJSON() failed [ref_um_ids]");
goto end;

View File

@ -67,10 +67,6 @@ cJSON *OpenAPI_acknowledge_info_convertToJSON(OpenAPI_acknowledge_info_t *acknow
}
}
if (!acknowledge_info->provisioning_time) {
ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [provisioning_time]");
goto end;
}
if (cJSON_AddStringToObject(item, "provisioningTime", acknowledge_info->provisioning_time) == NULL) {
ogs_error("OpenAPI_acknowledge_info_convertToJSON() failed [provisioning_time]");
goto end;

View File

@ -38,10 +38,6 @@ cJSON *OpenAPI_additional_access_info_convertToJSON(OpenAPI_additional_access_in
}
item = cJSON_CreateObject();
if (!additional_access_info->access_type) {
ogs_error("OpenAPI_additional_access_info_convertToJSON() failed [access_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(additional_access_info->access_type)) == NULL) {
ogs_error("OpenAPI_additional_access_info_convertToJSON() failed [access_type]");
goto end;

View File

@ -52,10 +52,6 @@ cJSON *OpenAPI_af_event_exposure_data_convertToJSON(OpenAPI_af_event_exposure_da
}
item = cJSON_CreateObject();
if (!af_event_exposure_data->af_events) {
ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_events]");
goto end;
}
cJSON *af_eventsList = cJSON_AddArrayToObject(item, "afEvents");
if (af_eventsList == NULL) {
ogs_error("OpenAPI_af_event_exposure_data_convertToJSON() failed [af_events]");

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_allowed_nssai_convertToJSON(OpenAPI_allowed_nssai_t *allowed_nssa
}
item = cJSON_CreateObject();
if (!allowed_nssai->allowed_snssai_list) {
ogs_error("OpenAPI_allowed_nssai_convertToJSON() failed [allowed_snssai_list]");
goto end;
}
cJSON *allowed_snssai_listList = cJSON_AddArrayToObject(item, "allowedSnssaiList");
if (allowed_snssai_listList == NULL) {
ogs_error("OpenAPI_allowed_nssai_convertToJSON() failed [allowed_snssai_list]");
@ -64,10 +60,6 @@ cJSON *OpenAPI_allowed_nssai_convertToJSON(OpenAPI_allowed_nssai_t *allowed_nssa
}
}
if (!allowed_nssai->access_type) {
ogs_error("OpenAPI_allowed_nssai_convertToJSON() failed [access_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(allowed_nssai->access_type)) == NULL) {
ogs_error("OpenAPI_allowed_nssai_convertToJSON() failed [access_type]");
goto end;

View File

@ -46,10 +46,6 @@ cJSON *OpenAPI_allowed_snssai_convertToJSON(OpenAPI_allowed_snssai_t *allowed_sn
}
item = cJSON_CreateObject();
if (!allowed_snssai->allowed_snssai) {
ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [allowed_snssai]");
goto end;
}
cJSON *allowed_snssai_local_JSON = OpenAPI_snssai_convertToJSON(allowed_snssai->allowed_snssai);
if (allowed_snssai_local_JSON == NULL) {
ogs_error("OpenAPI_allowed_snssai_convertToJSON() failed [allowed_snssai]");

View File

@ -47,10 +47,6 @@ cJSON *OpenAPI_alternative_qos_profile_convertToJSON(OpenAPI_alternative_qos_pro
}
item = cJSON_CreateObject();
if (!alternative_qos_profile->index) {
ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [index]");
goto end;
}
if (cJSON_AddNumberToObject(item, "index", alternative_qos_profile->index) == NULL) {
ogs_error("OpenAPI_alternative_qos_profile_convertToJSON() failed [index]");
goto end;

View File

@ -40,19 +40,11 @@ cJSON *OpenAPI_ambr_convertToJSON(OpenAPI_ambr_t *ambr)
}
item = cJSON_CreateObject();
if (!ambr->uplink) {
ogs_error("OpenAPI_ambr_convertToJSON() failed [uplink]");
goto end;
}
if (cJSON_AddStringToObject(item, "uplink", ambr->uplink) == NULL) {
ogs_error("OpenAPI_ambr_convertToJSON() failed [uplink]");
goto end;
}
if (!ambr->downlink) {
ogs_error("OpenAPI_ambr_convertToJSON() failed [downlink]");
goto end;
}
if (cJSON_AddStringToObject(item, "downlink", ambr->downlink) == NULL) {
ogs_error("OpenAPI_ambr_convertToJSON() failed [downlink]");
goto end;

View File

@ -40,19 +40,11 @@ cJSON *OpenAPI_ambr_rm_convertToJSON(OpenAPI_ambr_rm_t *ambr_rm)
}
item = cJSON_CreateObject();
if (!ambr_rm->uplink) {
ogs_error("OpenAPI_ambr_rm_convertToJSON() failed [uplink]");
goto end;
}
if (cJSON_AddStringToObject(item, "uplink", ambr_rm->uplink) == NULL) {
ogs_error("OpenAPI_ambr_rm_convertToJSON() failed [uplink]");
goto end;
}
if (!ambr_rm->downlink) {
ogs_error("OpenAPI_ambr_rm_convertToJSON() failed [downlink]");
goto end;
}
if (cJSON_AddStringToObject(item, "downlink", ambr_rm->downlink) == NULL) {
ogs_error("OpenAPI_ambr_rm_convertToJSON() failed [downlink]");
goto end;

View File

@ -96,10 +96,6 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
item = cJSON_CreateObject();
if (!amf3_gpp_access_registration->amf_instance_id) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfInstanceId", amf3_gpp_access_registration->amf_instance_id) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [amf_instance_id]");
goto end;
@ -139,10 +135,6 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (!amf3_gpp_access_registration->dereg_callback_uri) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [dereg_callback_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "deregCallbackUri", amf3_gpp_access_registration->dereg_callback_uri) == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [dereg_callback_uri]");
goto end;
@ -176,10 +168,6 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (!amf3_gpp_access_registration->guami) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [guami]");
goto end;
}
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf3_gpp_access_registration->guami);
if (guami_local_JSON == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [guami]");
@ -218,10 +206,6 @@ cJSON *OpenAPI_amf3_gpp_access_registration_convertToJSON(OpenAPI_amf3_gpp_acces
}
}
if (!amf3_gpp_access_registration->rat_type) {
ogs_error("OpenAPI_amf3_gpp_access_registration_convertToJSON() failed [rat_type]");
goto end;
}
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;

View File

@ -58,10 +58,6 @@ cJSON *OpenAPI_amf3_gpp_access_registration_modification_convertToJSON(OpenAPI_a
}
item = cJSON_CreateObject();
if (!amf3_gpp_access_registration_modification->guami) {
ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [guami]");
goto end;
}
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf3_gpp_access_registration_modification->guami);
if (guami_local_JSON == NULL) {
ogs_error("OpenAPI_amf3_gpp_access_registration_modification_convertToJSON() failed [guami]");

View File

@ -37,10 +37,6 @@ cJSON *OpenAPI_amf_dereg_info_convertToJSON(OpenAPI_amf_dereg_info_t *amf_dereg_
}
item = cJSON_CreateObject();
if (!amf_dereg_info->dereg_reason) {
ogs_error("OpenAPI_amf_dereg_info_convertToJSON() failed [dereg_reason]");
goto end;
}
cJSON *dereg_reason_local_JSON = OpenAPI_deregistration_reason_convertToJSON(amf_dereg_info->dereg_reason);
if (dereg_reason_local_JSON == NULL) {
ogs_error("OpenAPI_amf_dereg_info_convertToJSON() failed [dereg_reason]");

View File

@ -59,10 +59,6 @@ cJSON *OpenAPI_amf_event_convertToJSON(OpenAPI_amf_event_t *amf_event)
}
item = cJSON_CreateObject();
if (!amf_event->type) {
ogs_error("OpenAPI_amf_event_convertToJSON() failed [type]");
goto end;
}
cJSON *type_local_JSON = OpenAPI_amf_event_type_convertToJSON(amf_event->type);
if (type_local_JSON == NULL) {
ogs_error("OpenAPI_amf_event_convertToJSON() failed [type]");

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_amf_event_mode_convertToJSON(OpenAPI_amf_event_mode_t *amf_event_
}
item = cJSON_CreateObject();
if (!amf_event_mode->trigger) {
ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [trigger]");
goto end;
}
cJSON *trigger_local_JSON = OpenAPI_amf_event_trigger_convertToJSON(amf_event_mode->trigger);
if (trigger_local_JSON == NULL) {
ogs_error("OpenAPI_amf_event_mode_convertToJSON() failed [trigger]");

View File

@ -72,10 +72,6 @@ cJSON *OpenAPI_amf_event_subscription_convertToJSON(OpenAPI_amf_event_subscripti
}
item = cJSON_CreateObject();
if (!amf_event_subscription->event_list) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [event_list]");
goto end;
}
cJSON *event_listList = cJSON_AddArrayToObject(item, "eventList");
if (event_listList == NULL) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [event_list]");
@ -94,28 +90,16 @@ cJSON *OpenAPI_amf_event_subscription_convertToJSON(OpenAPI_amf_event_subscripti
}
}
if (!amf_event_subscription->event_notify_uri) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [event_notify_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "eventNotifyUri", amf_event_subscription->event_notify_uri) == NULL) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [event_notify_uri]");
goto end;
}
if (!amf_event_subscription->notify_correlation_id) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [notify_correlation_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "notifyCorrelationId", amf_event_subscription->notify_correlation_id) == NULL) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [notify_correlation_id]");
goto end;
}
if (!amf_event_subscription->nf_id) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [nf_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "nfId", amf_event_subscription->nf_id) == NULL) {
ogs_error("OpenAPI_amf_event_subscription_convertToJSON() failed [nf_id]");
goto end;

View File

@ -73,28 +73,16 @@ cJSON *OpenAPI_amf_info_convertToJSON(OpenAPI_amf_info_t *amf_info)
}
item = cJSON_CreateObject();
if (!amf_info->amf_set_id) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [amf_set_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfSetId", amf_info->amf_set_id) == NULL) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [amf_set_id]");
goto end;
}
if (!amf_info->amf_region_id) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [amf_region_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfRegionId", amf_info->amf_region_id) == NULL) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [amf_region_id]");
goto end;
}
if (!amf_info->guami_list) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [guami_list]");
goto end;
}
cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
if (guami_listList == NULL) {
ogs_error("OpenAPI_amf_info_convertToJSON() failed [guami_list]");

View File

@ -85,10 +85,6 @@ 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]");
goto end;
}
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;
@ -115,10 +111,6 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
}
if (!amf_non3_gpp_access_registration->ims_vo_ps) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
goto end;
}
cJSON *ims_vo_ps_local_JSON = OpenAPI_ims_vo_ps_convertToJSON(amf_non3_gpp_access_registration->ims_vo_ps);
if (ims_vo_ps_local_JSON == NULL) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [ims_vo_ps]");
@ -130,10 +122,6 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
goto end;
}
if (!amf_non3_gpp_access_registration->dereg_callback_uri) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [dereg_callback_uri]");
goto end;
}
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;
@ -160,10 +148,6 @@ 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]");
goto end;
}
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]");
@ -195,10 +179,6 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_convertToJSON(OpenAPI_amf_non3_g
}
}
if (!amf_non3_gpp_access_registration->rat_type) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_convertToJSON() failed [rat_type]");
goto end;
}
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;

View File

@ -51,10 +51,6 @@ cJSON *OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON(OpenA
}
item = cJSON_CreateObject();
if (!amf_non3_gpp_access_registration_modification->guami) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [guami]");
goto end;
}
cJSON *guami_local_JSON = OpenAPI_guami_convertToJSON(amf_non3_gpp_access_registration_modification->guami);
if (guami_local_JSON == NULL) {
ogs_error("OpenAPI_amf_non3_gpp_access_registration_modification_convertToJSON() failed [guami]");

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_amf_status_change_notification_convertToJSON(OpenAPI_amf_status_c
}
item = cJSON_CreateObject();
if (!amf_status_change_notification->amf_status_info_list) {
ogs_error("OpenAPI_amf_status_change_notification_convertToJSON() failed [amf_status_info_list]");
goto end;
}
cJSON *amf_status_info_listList = cJSON_AddArrayToObject(item, "amfStatusInfoList");
if (amf_status_info_listList == NULL) {
ogs_error("OpenAPI_amf_status_change_notification_convertToJSON() failed [amf_status_info_list]");

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_amf_status_change_subscription_data_convertToJSON(OpenAPI_amf_sta
}
item = cJSON_CreateObject();
if (!amf_status_change_subscription_data->amf_status_uri) {
ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [amf_status_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfStatusUri", amf_status_change_subscription_data->amf_status_uri) == NULL) {
ogs_error("OpenAPI_amf_status_change_subscription_data_convertToJSON() failed [amf_status_uri]");
goto end;

View File

@ -48,10 +48,6 @@ cJSON *OpenAPI_amf_status_info_convertToJSON(OpenAPI_amf_status_info_t *amf_stat
}
item = cJSON_CreateObject();
if (!amf_status_info->guami_list) {
ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [guami_list]");
goto end;
}
cJSON *guami_listList = cJSON_AddArrayToObject(item, "guamiList");
if (guami_listList == NULL) {
ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [guami_list]");
@ -70,10 +66,6 @@ cJSON *OpenAPI_amf_status_info_convertToJSON(OpenAPI_amf_status_info_t *amf_stat
}
}
if (!amf_status_info->status_change) {
ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [status_change]");
goto end;
}
if (cJSON_AddStringToObject(item, "statusChange", OpenAPI_status_change_ToString(amf_status_info->status_change)) == NULL) {
ogs_error("OpenAPI_amf_status_info_convertToJSON() failed [status_change]");
goto end;

View File

@ -43,19 +43,11 @@ cJSON *OpenAPI_amf_subscription_info_convertToJSON(OpenAPI_amf_subscription_info
}
item = cJSON_CreateObject();
if (!amf_subscription_info->amf_instance_id) {
ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [amf_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "amfInstanceId", amf_subscription_info->amf_instance_id) == NULL) {
ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [amf_instance_id]");
goto end;
}
if (!amf_subscription_info->subscription_id) {
ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [subscription_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "subscriptionId", amf_subscription_info->subscription_id) == NULL) {
ogs_error("OpenAPI_amf_subscription_info_convertToJSON() failed [subscription_id]");
goto end;

View File

@ -46,10 +46,6 @@ cJSON *OpenAPI_app_detection_info_convertToJSON(OpenAPI_app_detection_info_t *ap
}
item = cJSON_CreateObject();
if (!app_detection_info->app_id) {
ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [app_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "appId", app_detection_info->app_id) == NULL) {
ogs_error("OpenAPI_app_detection_info_convertToJSON() failed [app_id]");
goto end;

View File

@ -88,10 +88,6 @@ cJSON *OpenAPI_application_data_change_notif_convertToJSON(OpenAPI_application_d
}
}
if (!application_data_change_notif->res_uri) {
ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [res_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "resUri", application_data_change_notif->res_uri) == NULL) {
ogs_error("OpenAPI_application_data_change_notif_convertToJSON() failed [res_uri]");
goto end;

View File

@ -49,10 +49,6 @@ cJSON *OpenAPI_application_data_subs_convertToJSON(OpenAPI_application_data_subs
}
item = cJSON_CreateObject();
if (!application_data_subs->notification_uri) {
ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [notification_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "notificationUri", application_data_subs->notification_uri) == NULL) {
ogs_error("OpenAPI_application_data_subs_convertToJSON() failed [notification_uri]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_area_of_validity_convertToJSON(OpenAPI_area_of_validity_t *area_o
}
item = cJSON_CreateObject();
if (!area_of_validity->tai_list) {
ogs_error("OpenAPI_area_of_validity_convertToJSON() failed [tai_list]");
goto end;
}
cJSON *tai_listList = cJSON_AddArrayToObject(item, "taiList");
if (tai_listList == NULL) {
ogs_error("OpenAPI_area_of_validity_convertToJSON() failed [tai_list]");

View File

@ -40,28 +40,16 @@ cJSON *OpenAPI_arp_convertToJSON(OpenAPI_arp_t *arp)
}
item = cJSON_CreateObject();
if (!arp->priority_level) {
ogs_error("OpenAPI_arp_convertToJSON() failed [priority_level]");
goto end;
}
if (cJSON_AddNumberToObject(item, "priorityLevel", arp->priority_level) == NULL) {
ogs_error("OpenAPI_arp_convertToJSON() failed [priority_level]");
goto end;
}
if (!arp->preempt_cap) {
ogs_error("OpenAPI_arp_convertToJSON() failed [preempt_cap]");
goto end;
}
if (cJSON_AddStringToObject(item, "preemptCap", OpenAPI_preemption_capability_ToString(arp->preempt_cap)) == NULL) {
ogs_error("OpenAPI_arp_convertToJSON() failed [preempt_cap]");
goto end;
}
if (!arp->preempt_vuln) {
ogs_error("OpenAPI_arp_convertToJSON() failed [preempt_vuln]");
goto end;
}
if (cJSON_AddStringToObject(item, "preemptVuln", OpenAPI_preemption_vulnerability_ToString(arp->preempt_vuln)) == NULL) {
ogs_error("OpenAPI_arp_convertToJSON() failed [preempt_vuln]");
goto end;

View File

@ -51,10 +51,6 @@ cJSON *OpenAPI_assign_ebi_data_convertToJSON(OpenAPI_assign_ebi_data_t *assign_e
}
item = cJSON_CreateObject();
if (!assign_ebi_data->pdu_session_id) {
ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [pdu_session_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "pduSessionId", assign_ebi_data->pdu_session_id) == NULL) {
ogs_error("OpenAPI_assign_ebi_data_convertToJSON() failed [pdu_session_id]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_assign_ebi_error_convertToJSON(OpenAPI_assign_ebi_error_t *assign
}
item = cJSON_CreateObject();
if (!assign_ebi_error->error) {
ogs_error("OpenAPI_assign_ebi_error_convertToJSON() failed [error]");
goto end;
}
cJSON *error_local_JSON = OpenAPI_problem_details_convertToJSON(assign_ebi_error->error);
if (error_local_JSON == NULL) {
ogs_error("OpenAPI_assign_ebi_error_convertToJSON() failed [error]");
@ -55,10 +51,6 @@ cJSON *OpenAPI_assign_ebi_error_convertToJSON(OpenAPI_assign_ebi_error_t *assign
goto end;
}
if (!assign_ebi_error->failure_details) {
ogs_error("OpenAPI_assign_ebi_error_convertToJSON() failed [failure_details]");
goto end;
}
cJSON *failure_details_local_JSON = OpenAPI_assign_ebi_failed_convertToJSON(assign_ebi_error->failure_details);
if (failure_details_local_JSON == NULL) {
ogs_error("OpenAPI_assign_ebi_error_convertToJSON() failed [failure_details]");

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_assign_ebi_failed_convertToJSON(OpenAPI_assign_ebi_failed_t *assi
}
item = cJSON_CreateObject();
if (!assign_ebi_failed->pdu_session_id) {
ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [pdu_session_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "pduSessionId", assign_ebi_failed->pdu_session_id) == NULL) {
ogs_error("OpenAPI_assign_ebi_failed_convertToJSON() failed [pdu_session_id]");
goto end;

View File

@ -54,19 +54,11 @@ cJSON *OpenAPI_assigned_ebi_data_convertToJSON(OpenAPI_assigned_ebi_data_t *assi
}
item = cJSON_CreateObject();
if (!assigned_ebi_data->pdu_session_id) {
ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [pdu_session_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "pduSessionId", assigned_ebi_data->pdu_session_id) == NULL) {
ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [pdu_session_id]");
goto end;
}
if (!assigned_ebi_data->assigned_ebi_list) {
ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [assigned_ebi_list]");
goto end;
}
cJSON *assigned_ebi_listList = cJSON_AddArrayToObject(item, "assignedEbiList");
if (assigned_ebi_listList == NULL) {
ogs_error("OpenAPI_assigned_ebi_data_convertToJSON() failed [assigned_ebi_list]");

View File

@ -42,19 +42,11 @@ cJSON *OpenAPI_atom_convertToJSON(OpenAPI_atom_t *atom)
}
item = cJSON_CreateObject();
if (!atom->attr) {
ogs_error("OpenAPI_atom_convertToJSON() failed [attr]");
goto end;
}
if (cJSON_AddStringToObject(item, "attr", atom->attr) == NULL) {
ogs_error("OpenAPI_atom_convertToJSON() failed [attr]");
goto end;
}
if (!atom->value) {
ogs_error("OpenAPI_atom_convertToJSON() failed [value]");
goto end;
}
if (cJSON_AddStringToObject(item, "value", atom->value) == NULL) {
ogs_error("OpenAPI_atom_convertToJSON() failed [value]");
goto end;

View File

@ -49,10 +49,6 @@ cJSON *OpenAPI_auth_event_convertToJSON(OpenAPI_auth_event_t *auth_event)
}
item = cJSON_CreateObject();
if (!auth_event->nf_instance_id) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [nf_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "nfInstanceId", auth_event->nf_instance_id) == NULL) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [nf_instance_id]");
goto end;
@ -63,28 +59,16 @@ cJSON *OpenAPI_auth_event_convertToJSON(OpenAPI_auth_event_t *auth_event)
goto end;
}
if (!auth_event->time_stamp) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [time_stamp]");
goto end;
}
if (cJSON_AddStringToObject(item, "timeStamp", auth_event->time_stamp) == NULL) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [time_stamp]");
goto end;
}
if (!auth_event->auth_type) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [auth_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "authType", OpenAPI_auth_type_ToString(auth_event->auth_type)) == NULL) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [auth_type]");
goto end;
}
if (!auth_event->serving_network_name) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [serving_network_name]");
goto end;
}
if (cJSON_AddStringToObject(item, "servingNetworkName", auth_event->serving_network_name) == NULL) {
ogs_error("OpenAPI_auth_event_convertToJSON() failed [serving_network_name]");
goto end;

View File

@ -58,19 +58,11 @@ cJSON *OpenAPI_authentication_info_convertToJSON(OpenAPI_authentication_info_t *
}
item = cJSON_CreateObject();
if (!authentication_info->supi_or_suci) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [supi_or_suci]");
goto end;
}
if (cJSON_AddStringToObject(item, "supiOrSuci", authentication_info->supi_or_suci) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [supi_or_suci]");
goto end;
}
if (!authentication_info->serving_network_name) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [serving_network_name]");
goto end;
}
if (cJSON_AddStringToObject(item, "servingNetworkName", authentication_info->serving_network_name) == NULL) {
ogs_error("OpenAPI_authentication_info_convertToJSON() failed [serving_network_name]");
goto end;

View File

@ -61,10 +61,6 @@ cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_
}
}
if (!authentication_info_request->serving_network_name) {
ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [serving_network_name]");
goto end;
}
if (cJSON_AddStringToObject(item, "servingNetworkName", authentication_info_request->serving_network_name) == NULL) {
ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [serving_network_name]");
goto end;
@ -83,10 +79,6 @@ cJSON *OpenAPI_authentication_info_request_convertToJSON(OpenAPI_authentication_
}
}
if (!authentication_info_request->ausf_instance_id) {
ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [ausf_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "ausfInstanceId", authentication_info_request->ausf_instance_id) == NULL) {
ogs_error("OpenAPI_authentication_info_request_convertToJSON() failed [ausf_instance_id]");
goto end;

View File

@ -45,10 +45,6 @@ cJSON *OpenAPI_authentication_info_result_convertToJSON(OpenAPI_authentication_i
}
item = cJSON_CreateObject();
if (!authentication_info_result->auth_type) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [auth_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "authType", OpenAPI_auth_type_ToString(authentication_info_result->auth_type)) == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [auth_type]");
goto end;

View File

@ -66,10 +66,6 @@ cJSON *OpenAPI_authentication_subscription_convertToJSON(OpenAPI_authentication_
}
item = cJSON_CreateObject();
if (!authentication_subscription->authentication_method) {
ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [authentication_method]");
goto end;
}
if (cJSON_AddStringToObject(item, "authenticationMethod", OpenAPI_auth_method_ToString(authentication_subscription->authentication_method)) == NULL) {
ogs_error("OpenAPI_authentication_subscription_convertToJSON() failed [authentication_method]");
goto end;

View File

@ -57,19 +57,11 @@ cJSON *OpenAPI_authentication_vector_convertToJSON(OpenAPI_authentication_vector
}
item = cJSON_CreateObject();
if (!authentication_vector->av_type) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [av_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "avType", OpenAPI_av_type_ToString(authentication_vector->av_type)) == NULL) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [av_type]");
goto end;
}
if (!authentication_vector->rand) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", authentication_vector->rand) == NULL) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [rand]");
goto end;
@ -82,10 +74,6 @@ cJSON *OpenAPI_authentication_vector_convertToJSON(OpenAPI_authentication_vector
}
}
if (!authentication_vector->autn) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", authentication_vector->autn) == NULL) {
ogs_error("OpenAPI_authentication_vector_convertToJSON() failed [autn]");
goto end;

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_authorization_data_convertToJSON(OpenAPI_authorization_data_t *au
}
item = cJSON_CreateObject();
if (!authorization_data->authorization_data) {
ogs_error("OpenAPI_authorization_data_convertToJSON() failed [authorization_data]");
goto end;
}
cJSON *authorization_dataList = cJSON_AddArrayToObject(item, "authorizationData");
if (authorization_dataList == NULL) {
ogs_error("OpenAPI_authorization_data_convertToJSON() failed [authorization_data]");

View File

@ -48,19 +48,11 @@ cJSON *OpenAPI_av5_g_he_aka_convertToJSON(OpenAPI_av5_g_he_aka_t *av5_g_he_aka)
}
item = cJSON_CreateObject();
if (!av5_g_he_aka->av_type) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [av_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "avType", OpenAPI_av_type_ToString(av5_g_he_aka->av_type)) == NULL) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [av_type]");
goto end;
}
if (!av5_g_he_aka->rand) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", av5_g_he_aka->rand) == NULL) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [rand]");
goto end;
@ -73,10 +65,6 @@ cJSON *OpenAPI_av5_g_he_aka_convertToJSON(OpenAPI_av5_g_he_aka_t *av5_g_he_aka)
}
}
if (!av5_g_he_aka->autn) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", av5_g_he_aka->autn) == NULL) {
ogs_error("OpenAPI_av5_g_he_aka_convertToJSON() failed [autn]");
goto end;

View File

@ -43,28 +43,16 @@ cJSON *OpenAPI_av5g_aka_convertToJSON(OpenAPI_av5g_aka_t *av5g_aka)
}
item = cJSON_CreateObject();
if (!av5g_aka->rand) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", av5g_aka->rand) == NULL) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [rand]");
goto end;
}
if (!av5g_aka->hxres_star) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [hxres_star]");
goto end;
}
if (cJSON_AddStringToObject(item, "hxresStar", av5g_aka->hxres_star) == NULL) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [hxres_star]");
goto end;
}
if (!av5g_aka->autn) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", av5g_aka->autn) == NULL) {
ogs_error("OpenAPI_av5g_aka_convertToJSON() failed [autn]");
goto end;

View File

@ -51,19 +51,11 @@ cJSON *OpenAPI_av_eap_aka_prime_convertToJSON(OpenAPI_av_eap_aka_prime_t *av_eap
}
item = cJSON_CreateObject();
if (!av_eap_aka_prime->av_type) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [av_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "avType", OpenAPI_av_type_ToString(av_eap_aka_prime->av_type)) == NULL) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [av_type]");
goto end;
}
if (!av_eap_aka_prime->rand) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", av_eap_aka_prime->rand) == NULL) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [rand]");
goto end;
@ -76,10 +68,6 @@ cJSON *OpenAPI_av_eap_aka_prime_convertToJSON(OpenAPI_av_eap_aka_prime_t *av_eap
}
}
if (!av_eap_aka_prime->autn) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", av_eap_aka_prime->autn) == NULL) {
ogs_error("OpenAPI_av_eap_aka_prime_convertToJSON() failed [autn]");
goto end;

View File

@ -48,46 +48,26 @@ cJSON *OpenAPI_av_eps_aka_convertToJSON(OpenAPI_av_eps_aka_t *av_eps_aka)
}
item = cJSON_CreateObject();
if (!av_eps_aka->av_type) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [av_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "avType", OpenAPI_hss_av_type_ToString(av_eps_aka->av_type)) == NULL) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [av_type]");
goto end;
}
if (!av_eps_aka->rand) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", av_eps_aka->rand) == NULL) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [rand]");
goto end;
}
if (!av_eps_aka->xres) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [xres]");
goto end;
}
if (cJSON_AddStringToObject(item, "xres", av_eps_aka->xres) == NULL) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [xres]");
goto end;
}
if (!av_eps_aka->autn) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", av_eps_aka->autn) == NULL) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [autn]");
goto end;
}
if (!av_eps_aka->kasme) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [kasme]");
goto end;
}
if (cJSON_AddStringToObject(item, "kasme", av_eps_aka->kasme) == NULL) {
ogs_error("OpenAPI_av_eps_aka_convertToJSON() failed [kasme]");
goto end;

View File

@ -51,55 +51,31 @@ cJSON *OpenAPI_av_ims_gba_eap_aka_convertToJSON(OpenAPI_av_ims_gba_eap_aka_t *av
}
item = cJSON_CreateObject();
if (!av_ims_gba_eap_aka->av_type) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [av_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "avType", OpenAPI_hss_av_type_ToString(av_ims_gba_eap_aka->av_type)) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [av_type]");
goto end;
}
if (!av_ims_gba_eap_aka->rand) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [rand]");
goto end;
}
if (cJSON_AddStringToObject(item, "rand", av_ims_gba_eap_aka->rand) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [rand]");
goto end;
}
if (!av_ims_gba_eap_aka->xres) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [xres]");
goto end;
}
if (cJSON_AddStringToObject(item, "xres", av_ims_gba_eap_aka->xres) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [xres]");
goto end;
}
if (!av_ims_gba_eap_aka->autn) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [autn]");
goto end;
}
if (cJSON_AddStringToObject(item, "autn", av_ims_gba_eap_aka->autn) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [autn]");
goto end;
}
if (!av_ims_gba_eap_aka->ck) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [ck]");
goto end;
}
if (cJSON_AddStringToObject(item, "ck", av_ims_gba_eap_aka->ck) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [ck]");
goto end;
}
if (!av_ims_gba_eap_aka->ik) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [ik]");
goto end;
}
if (cJSON_AddStringToObject(item, "ik", av_ims_gba_eap_aka->ik) == NULL) {
ogs_error("OpenAPI_av_ims_gba_eap_aka_convertToJSON() failed [ik]");
goto end;

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_backup_amf_info_convertToJSON(OpenAPI_backup_amf_info_t *backup_a
}
item = cJSON_CreateObject();
if (!backup_amf_info->backup_amf) {
ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [backup_amf]");
goto end;
}
if (cJSON_AddStringToObject(item, "backupAmf", backup_amf_info->backup_amf) == NULL) {
ogs_error("OpenAPI_backup_amf_info_convertToJSON() failed [backup_amf]");
goto end;

View File

@ -57,19 +57,11 @@ cJSON *OpenAPI_bdt_data_convertToJSON(OpenAPI_bdt_data_t *bdt_data)
}
item = cJSON_CreateObject();
if (!bdt_data->asp_id) {
ogs_error("OpenAPI_bdt_data_convertToJSON() failed [asp_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "aspId", bdt_data->asp_id) == NULL) {
ogs_error("OpenAPI_bdt_data_convertToJSON() failed [asp_id]");
goto end;
}
if (!bdt_data->trans_policy) {
ogs_error("OpenAPI_bdt_data_convertToJSON() failed [trans_policy]");
goto end;
}
cJSON *trans_policy_local_JSON = OpenAPI_transfer_policy_convertToJSON(bdt_data->trans_policy);
if (trans_policy_local_JSON == NULL) {
ogs_error("OpenAPI_bdt_data_convertToJSON() failed [trans_policy]");

View File

@ -63,10 +63,6 @@ cJSON *OpenAPI_bdt_policy_data_convertToJSON(OpenAPI_bdt_policy_data_t *bdt_poli
}
}
if (!bdt_policy_data->bdt_ref_id) {
ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [bdt_ref_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "bdtRefId", bdt_policy_data->bdt_ref_id) == NULL) {
ogs_error("OpenAPI_bdt_policy_data_convertToJSON() failed [bdt_ref_id]");
goto end;

View File

@ -37,10 +37,6 @@ cJSON *OpenAPI_bdt_policy_data_patch_convertToJSON(OpenAPI_bdt_policy_data_patch
}
item = cJSON_CreateObject();
if (!bdt_policy_data_patch->bdt_ref_id) {
ogs_error("OpenAPI_bdt_policy_data_patch_convertToJSON() failed [bdt_ref_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "bdtRefId", bdt_policy_data_patch->bdt_ref_id) == NULL) {
ogs_error("OpenAPI_bdt_policy_data_patch_convertToJSON() failed [bdt_ref_id]");
goto end;

View File

@ -39,19 +39,11 @@ cJSON *OpenAPI_cag_ack_data_convertToJSON(OpenAPI_cag_ack_data_t *cag_ack_data)
}
item = cJSON_CreateObject();
if (!cag_ack_data->provisioning_time) {
ogs_error("OpenAPI_cag_ack_data_convertToJSON() failed [provisioning_time]");
goto end;
}
if (cJSON_AddStringToObject(item, "provisioningTime", cag_ack_data->provisioning_time) == NULL) {
ogs_error("OpenAPI_cag_ack_data_convertToJSON() failed [provisioning_time]");
goto end;
}
if (!cag_ack_data->ue_update_status) {
ogs_error("OpenAPI_cag_ack_data_convertToJSON() failed [ue_update_status]");
goto end;
}
if (cJSON_AddStringToObject(item, "ueUpdateStatus", OpenAPI_ue_update_status_ToString(cag_ack_data->ue_update_status)) == NULL) {
ogs_error("OpenAPI_cag_ack_data_convertToJSON() failed [ue_update_status]");
goto end;

View File

@ -45,10 +45,6 @@ cJSON *OpenAPI_cag_data_convertToJSON(OpenAPI_cag_data_t *cag_data)
}
item = cJSON_CreateObject();
if (!cag_data->cag_infos) {
ogs_error("OpenAPI_cag_data_convertToJSON() failed [cag_infos]");
goto end;
}
cJSON *cag_infos = cJSON_AddObjectToObject(item, "cagInfos");
if (cag_infos == NULL) {
ogs_error("OpenAPI_cag_data_convertToJSON() failed [cag_infos]");

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_cag_info_convertToJSON(OpenAPI_cag_info_t *cag_info)
}
item = cJSON_CreateObject();
if (!cag_info->allowed_cag_list) {
ogs_error("OpenAPI_cag_info_convertToJSON() failed [allowed_cag_list]");
goto end;
}
cJSON *allowed_cag_list = cJSON_AddArrayToObject(item, "allowedCagList");
if (allowed_cag_list == NULL) {
ogs_error("OpenAPI_cag_info_convertToJSON() failed [allowed_cag_list]");

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_candidate_for_replacement_convertToJSON(OpenAPI_candidate_for_rep
}
item = cJSON_CreateObject();
if (!candidate_for_replacement->snssai) {
ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [snssai]");
goto end;
}
cJSON *snssai_local_JSON = OpenAPI_snssai_convertToJSON(candidate_for_replacement->snssai);
if (snssai_local_JSON == NULL) {
ogs_error("OpenAPI_candidate_for_replacement_convertToJSON() failed [snssai]");

View File

@ -48,19 +48,11 @@ cJSON *OpenAPI_change_item_convertToJSON(OpenAPI_change_item_t *change_item)
}
item = cJSON_CreateObject();
if (!change_item->op) {
ogs_error("OpenAPI_change_item_convertToJSON() failed [op]");
goto end;
}
if (cJSON_AddStringToObject(item, "op", OpenAPI_change_type_ToString(change_item->op)) == NULL) {
ogs_error("OpenAPI_change_item_convertToJSON() failed [op]");
goto end;
}
if (!change_item->path) {
ogs_error("OpenAPI_change_item_convertToJSON() failed [path]");
goto end;
}
if (cJSON_AddStringToObject(item, "path", change_item->path) == NULL) {
ogs_error("OpenAPI_change_item_convertToJSON() failed [path]");
goto end;

View File

@ -62,10 +62,6 @@ cJSON *OpenAPI_charging_data_convertToJSON(OpenAPI_charging_data_t *charging_dat
}
item = cJSON_CreateObject();
if (!charging_data->chg_id) {
ogs_error("OpenAPI_charging_data_convertToJSON() failed [chg_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "chgId", charging_data->chg_id) == NULL) {
ogs_error("OpenAPI_charging_data_convertToJSON() failed [chg_id]");
goto end;

View File

@ -52,19 +52,11 @@ cJSON *OpenAPI_charging_information_convertToJSON(OpenAPI_charging_information_t
}
item = cJSON_CreateObject();
if (!charging_information->primary_chf_address) {
ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_address]");
goto end;
}
if (cJSON_AddStringToObject(item, "primaryChfAddress", charging_information->primary_chf_address) == NULL) {
ogs_error("OpenAPI_charging_information_convertToJSON() failed [primary_chf_address]");
goto end;
}
if (!charging_information->secondary_chf_address) {
ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_address]");
goto end;
}
if (cJSON_AddStringToObject(item, "secondaryChfAddress", charging_information->secondary_chf_address) == NULL) {
ogs_error("OpenAPI_charging_information_convertToJSON() failed [secondary_chf_address]");
goto end;

View File

@ -39,10 +39,6 @@ cJSON *OpenAPI_cm_info_convertToJSON(OpenAPI_cm_info_t *cm_info)
}
item = cJSON_CreateObject();
if (!cm_info->cm_state) {
ogs_error("OpenAPI_cm_info_convertToJSON() failed [cm_state]");
goto end;
}
cJSON *cm_state_local_JSON = OpenAPI_cm_state_convertToJSON(cm_info->cm_state);
if (cm_state_local_JSON == NULL) {
ogs_error("OpenAPI_cm_info_convertToJSON() failed [cm_state]");
@ -54,10 +50,6 @@ cJSON *OpenAPI_cm_info_convertToJSON(OpenAPI_cm_info_t *cm_info)
goto end;
}
if (!cm_info->access_type) {
ogs_error("OpenAPI_cm_info_convertToJSON() failed [access_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "accessType", OpenAPI_access_type_ToString(cm_info->access_type)) == NULL) {
ogs_error("OpenAPI_cm_info_convertToJSON() failed [access_type]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_cnf_convertToJSON(OpenAPI_cnf_t *cnf)
}
item = cJSON_CreateObject();
if (!cnf->cnf_units) {
ogs_error("OpenAPI_cnf_convertToJSON() failed [cnf_units]");
goto end;
}
cJSON *cnf_unitsList = cJSON_AddArrayToObject(item, "cnfUnits");
if (cnf_unitsList == NULL) {
ogs_error("OpenAPI_cnf_convertToJSON() failed [cnf_units]");

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_cnf_unit_convertToJSON(OpenAPI_cnf_unit_t *cnf_unit)
}
item = cJSON_CreateObject();
if (!cnf_unit->cnf_unit) {
ogs_error("OpenAPI_cnf_unit_convertToJSON() failed [cnf_unit]");
goto end;
}
cJSON *cnf_unitList = cJSON_AddArrayToObject(item, "cnfUnit");
if (cnf_unitList == NULL) {
ogs_error("OpenAPI_cnf_unit_convertToJSON() failed [cnf_unit]");

View File

@ -46,10 +46,6 @@ cJSON *OpenAPI_complex_query_convertToJSON(OpenAPI_complex_query_t *complex_quer
}
item = cJSON_CreateObject();
if (!complex_query->cnf_units) {
ogs_error("OpenAPI_complex_query_convertToJSON() failed [cnf_units]");
goto end;
}
cJSON *cnf_unitsList = cJSON_AddArrayToObject(item, "cnfUnits");
if (cnf_unitsList == NULL) {
ogs_error("OpenAPI_complex_query_convertToJSON() failed [cnf_units]");
@ -68,10 +64,6 @@ cJSON *OpenAPI_complex_query_convertToJSON(OpenAPI_complex_query_t *complex_quer
}
}
if (!complex_query->dnf_units) {
ogs_error("OpenAPI_complex_query_convertToJSON() failed [dnf_units]");
goto end;
}
cJSON *dnf_unitsList = cJSON_AddArrayToObject(item, "dnfUnits");
if (dnf_unitsList == NULL) {
ogs_error("OpenAPI_complex_query_convertToJSON() failed [dnf_units]");

View File

@ -47,10 +47,6 @@ cJSON *OpenAPI_condition_data_convertToJSON(OpenAPI_condition_data_t *condition_
}
item = cJSON_CreateObject();
if (!condition_data->cond_id) {
ogs_error("OpenAPI_condition_data_convertToJSON() failed [cond_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "condId", condition_data->cond_id) == NULL) {
ogs_error("OpenAPI_condition_data_convertToJSON() failed [cond_id]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_configured_snssai_convertToJSON(OpenAPI_configured_snssai_t *conf
}
item = cJSON_CreateObject();
if (!configured_snssai->configured_snssai) {
ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [configured_snssai]");
goto end;
}
cJSON *configured_snssai_local_JSON = OpenAPI_snssai_convertToJSON(configured_snssai->configured_snssai);
if (configured_snssai_local_JSON == NULL) {
ogs_error("OpenAPI_configured_snssai_convertToJSON() failed [configured_snssai]");

View File

@ -37,10 +37,6 @@ cJSON *OpenAPI_confirmation_data_convertToJSON(OpenAPI_confirmation_data_t *conf
}
item = cJSON_CreateObject();
if (!confirmation_data->res_star) {
ogs_error("OpenAPI_confirmation_data_convertToJSON() failed [res_star]");
goto end;
}
if (cJSON_AddStringToObject(item, "resStar", confirmation_data->res_star) == NULL) {
ogs_error("OpenAPI_confirmation_data_convertToJSON() failed [res_star]");
goto end;

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_confirmation_data_response_convertToJSON(OpenAPI_confirmation_dat
}
item = cJSON_CreateObject();
if (!confirmation_data_response->auth_result) {
ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [auth_result]");
goto end;
}
if (cJSON_AddStringToObject(item, "authResult", OpenAPI_auth_result_ToString(confirmation_data_response->auth_result)) == NULL) {
ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [auth_result]");
goto end;

View File

@ -85,10 +85,6 @@ cJSON *OpenAPI_data_filter_convertToJSON(OpenAPI_data_filter_t *data_filter)
}
item = cJSON_CreateObject();
if (!data_filter->data_ind) {
ogs_error("OpenAPI_data_filter_convertToJSON() failed [data_ind]");
goto end;
}
cJSON *data_ind_local_JSON = OpenAPI_data_ind_convertToJSON(data_filter->data_ind);
if (data_ind_local_JSON == NULL) {
ogs_error("OpenAPI_data_filter_convertToJSON() failed [data_ind]");

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_ddn_failure_sub_info_convertToJSON(OpenAPI_ddn_failure_sub_info_t
}
item = cJSON_CreateObject();
if (!ddn_failure_sub_info->notify_correlation_id) {
ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [notify_correlation_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "notifyCorrelationId", ddn_failure_sub_info->notify_correlation_id) == NULL) {
ogs_error("OpenAPI_ddn_failure_sub_info_convertToJSON() failed [notify_correlation_id]");
goto end;

View File

@ -52,19 +52,11 @@ cJSON *OpenAPI_default_notification_subscription_convertToJSON(OpenAPI_default_n
}
item = cJSON_CreateObject();
if (!default_notification_subscription->notification_type) {
ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [notification_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "notificationType", OpenAPI_notification_type_ToString(default_notification_subscription->notification_type)) == NULL) {
ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [notification_type]");
goto end;
}
if (!default_notification_subscription->callback_uri) {
ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [callback_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "callbackUri", default_notification_subscription->callback_uri) == NULL) {
ogs_error("OpenAPI_default_notification_subscription_convertToJSON() failed [callback_uri]");
goto end;

View File

@ -44,10 +44,6 @@ cJSON *OpenAPI_deregistration_data_convertToJSON(OpenAPI_deregistration_data_t *
}
item = cJSON_CreateObject();
if (!deregistration_data->dereg_reason) {
ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [dereg_reason]");
goto end;
}
cJSON *dereg_reason_local_JSON = OpenAPI_deregistration_reason_convertToJSON(deregistration_data->dereg_reason);
if (dereg_reason_local_JSON == NULL) {
ogs_error("OpenAPI_deregistration_data_convertToJSON() failed [dereg_reason]");

View File

@ -41,10 +41,6 @@ cJSON *OpenAPI_dnai_information_convertToJSON(OpenAPI_dnai_information_t *dnai_i
}
item = cJSON_CreateObject();
if (!dnai_information->dnai) {
ogs_error("OpenAPI_dnai_information_convertToJSON() failed [dnai]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnai", dnai_information->dnai) == NULL) {
ogs_error("OpenAPI_dnai_information_convertToJSON() failed [dnai]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_dnf_convertToJSON(OpenAPI_dnf_t *dnf)
}
item = cJSON_CreateObject();
if (!dnf->dnf_units) {
ogs_error("OpenAPI_dnf_convertToJSON() failed [dnf_units]");
goto end;
}
cJSON *dnf_unitsList = cJSON_AddArrayToObject(item, "dnfUnits");
if (dnf_unitsList == NULL) {
ogs_error("OpenAPI_dnf_convertToJSON() failed [dnf_units]");

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_dnf_unit_convertToJSON(OpenAPI_dnf_unit_t *dnf_unit)
}
item = cJSON_CreateObject();
if (!dnf_unit->dnf_unit) {
ogs_error("OpenAPI_dnf_unit_convertToJSON() failed [dnf_unit]");
goto end;
}
cJSON *dnf_unitList = cJSON_AddArrayToObject(item, "dnfUnit");
if (dnf_unitList == NULL) {
ogs_error("OpenAPI_dnf_unit_convertToJSON() failed [dnf_unit]");

View File

@ -94,10 +94,6 @@ cJSON *OpenAPI_dnn_configuration_convertToJSON(OpenAPI_dnn_configuration_t *dnn_
}
item = cJSON_CreateObject();
if (!dnn_configuration->pdu_session_types) {
ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [pdu_session_types]");
goto end;
}
cJSON *pdu_session_types_local_JSON = OpenAPI_pdu_session_types_convertToJSON(dnn_configuration->pdu_session_types);
if (pdu_session_types_local_JSON == NULL) {
ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [pdu_session_types]");
@ -109,10 +105,6 @@ cJSON *OpenAPI_dnn_configuration_convertToJSON(OpenAPI_dnn_configuration_t *dnn_
goto end;
}
if (!dnn_configuration->ssc_modes) {
ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ssc_modes]");
goto end;
}
cJSON *ssc_modes_local_JSON = OpenAPI_ssc_modes_convertToJSON(dnn_configuration->ssc_modes);
if (ssc_modes_local_JSON == NULL) {
ogs_error("OpenAPI_dnn_configuration_convertToJSON() failed [ssc_modes]");

View File

@ -55,10 +55,6 @@ cJSON *OpenAPI_dnn_info_convertToJSON(OpenAPI_dnn_info_t *dnn_info)
}
item = cJSON_CreateObject();
if (!dnn_info->dnn) {
ogs_error("OpenAPI_dnn_info_convertToJSON() failed [dnn]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnn", dnn_info->dnn) == NULL) {
ogs_error("OpenAPI_dnn_info_convertToJSON() failed [dnn]");
goto end;

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_se
}
item = cJSON_CreateObject();
if (!dnn_route_selection_descriptor->dnn) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [dnn]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnn", dnn_route_selection_descriptor->dnn) == NULL) {
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [dnn]");
goto end;

View File

@ -37,10 +37,6 @@ cJSON *OpenAPI_dnn_smf_info_item_convertToJSON(OpenAPI_dnn_smf_info_item_t *dnn_
}
item = cJSON_CreateObject();
if (!dnn_smf_info_item->dnn) {
ogs_error("OpenAPI_dnn_smf_info_item_convertToJSON() failed [dnn]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnn", dnn_smf_info_item->dnn) == NULL) {
ogs_error("OpenAPI_dnn_smf_info_item_convertToJSON() failed [dnn]");
goto end;

View File

@ -58,10 +58,6 @@ cJSON *OpenAPI_dnn_upf_info_item_convertToJSON(OpenAPI_dnn_upf_info_item_t *dnn_
}
item = cJSON_CreateObject();
if (!dnn_upf_info_item->dnn) {
ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnn]");
goto end;
}
if (cJSON_AddStringToObject(item, "dnn", dnn_upf_info_item->dnn) == NULL) {
ogs_error("OpenAPI_dnn_upf_info_item_convertToJSON() failed [dnn]");
goto end;

View File

@ -56,10 +56,6 @@ cJSON *OpenAPI_dynamic5_qi_convertToJSON(OpenAPI_dynamic5_qi_t *dynamic5_qi)
}
item = cJSON_CreateObject();
if (!dynamic5_qi->resource_type) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [resource_type]");
goto end;
}
cJSON *resource_type_local_JSON = OpenAPI_qos_resource_type_convertToJSON(dynamic5_qi->resource_type);
if (resource_type_local_JSON == NULL) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [resource_type]");
@ -71,28 +67,16 @@ cJSON *OpenAPI_dynamic5_qi_convertToJSON(OpenAPI_dynamic5_qi_t *dynamic5_qi)
goto end;
}
if (!dynamic5_qi->priority_level) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [priority_level]");
goto end;
}
if (cJSON_AddNumberToObject(item, "priorityLevel", dynamic5_qi->priority_level) == NULL) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [priority_level]");
goto end;
}
if (!dynamic5_qi->packet_delay_budget) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [packet_delay_budget]");
goto end;
}
if (cJSON_AddNumberToObject(item, "packetDelayBudget", dynamic5_qi->packet_delay_budget) == NULL) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [packet_delay_budget]");
goto end;
}
if (!dynamic5_qi->packet_err_rate) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [packet_err_rate]");
goto end;
}
if (cJSON_AddStringToObject(item, "packetErrRate", dynamic5_qi->packet_err_rate) == NULL) {
ogs_error("OpenAPI_dynamic5_qi_convertToJSON() failed [packet_err_rate]");
goto end;

View File

@ -53,10 +53,6 @@ cJSON *OpenAPI_eap_session_convertToJSON(OpenAPI_eap_session_t *eap_session)
}
item = cJSON_CreateObject();
if (!eap_session->eap_payload) {
ogs_error("OpenAPI_eap_session_convertToJSON() failed [eap_payload]");
goto end;
}
if (cJSON_AddStringToObject(item, "eapPayload", eap_session->eap_payload) == NULL) {
ogs_error("OpenAPI_eap_session_convertToJSON() failed [eap_payload]");
goto end;

View File

@ -39,19 +39,11 @@ cJSON *OpenAPI_ebi_arp_mapping_convertToJSON(OpenAPI_ebi_arp_mapping_t *ebi_arp_
}
item = cJSON_CreateObject();
if (!ebi_arp_mapping->eps_bearer_id) {
ogs_error("OpenAPI_ebi_arp_mapping_convertToJSON() failed [eps_bearer_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "epsBearerId", ebi_arp_mapping->eps_bearer_id) == NULL) {
ogs_error("OpenAPI_ebi_arp_mapping_convertToJSON() failed [eps_bearer_id]");
goto end;
}
if (!ebi_arp_mapping->arp) {
ogs_error("OpenAPI_ebi_arp_mapping_convertToJSON() failed [arp]");
goto end;
}
cJSON *arp_local_JSON = OpenAPI_arp_convertToJSON(ebi_arp_mapping->arp);
if (arp_local_JSON == NULL) {
ogs_error("OpenAPI_ebi_arp_mapping_convertToJSON() failed [arp]");

View File

@ -48,19 +48,11 @@ cJSON *OpenAPI_ec_restriction_convertToJSON(OpenAPI_ec_restriction_t *ec_restric
}
item = cJSON_CreateObject();
if (!ec_restriction->af_instance_id) {
ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [af_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "afInstanceId", ec_restriction->af_instance_id) == NULL) {
ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [af_instance_id]");
goto end;
}
if (!ec_restriction->reference_id) {
ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [reference_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "referenceId", ec_restriction->reference_id) == NULL) {
ogs_error("OpenAPI_ec_restriction_convertToJSON() failed [reference_id]");
goto end;

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_ecgi_convertToJSON(OpenAPI_ecgi_t *ecgi)
}
item = cJSON_CreateObject();
if (!ecgi->plmn_id) {
ogs_error("OpenAPI_ecgi_convertToJSON() failed [plmn_id]");
goto end;
}
cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(ecgi->plmn_id);
if (plmn_id_local_JSON == NULL) {
ogs_error("OpenAPI_ecgi_convertToJSON() failed [plmn_id]");
@ -58,10 +54,6 @@ cJSON *OpenAPI_ecgi_convertToJSON(OpenAPI_ecgi_t *ecgi)
goto end;
}
if (!ecgi->eutra_cell_id) {
ogs_error("OpenAPI_ecgi_convertToJSON() failed [eutra_cell_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "eutraCellId", ecgi->eutra_cell_id) == NULL) {
ogs_error("OpenAPI_ecgi_convertToJSON() failed [eutra_cell_id]");
goto end;

View File

@ -39,19 +39,11 @@ cJSON *OpenAPI_edrx_parameters_convertToJSON(OpenAPI_edrx_parameters_t *edrx_par
}
item = cJSON_CreateObject();
if (!edrx_parameters->rat_type) {
ogs_error("OpenAPI_edrx_parameters_convertToJSON() failed [rat_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "ratType", OpenAPI_rat_type_ToString(edrx_parameters->rat_type)) == NULL) {
ogs_error("OpenAPI_edrx_parameters_convertToJSON() failed [rat_type]");
goto end;
}
if (!edrx_parameters->edrx_value) {
ogs_error("OpenAPI_edrx_parameters_convertToJSON() failed [edrx_value]");
goto end;
}
if (cJSON_AddStringToObject(item, "edrxValue", edrx_parameters->edrx_value) == NULL) {
ogs_error("OpenAPI_edrx_parameters_convertToJSON() failed [edrx_value]");
goto end;

View File

@ -68,19 +68,11 @@ cJSON *OpenAPI_ee_subscription_convertToJSON(OpenAPI_ee_subscription_t *ee_subsc
}
item = cJSON_CreateObject();
if (!ee_subscription->callback_reference) {
ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [callback_reference]");
goto end;
}
if (cJSON_AddStringToObject(item, "callbackReference", ee_subscription->callback_reference) == NULL) {
ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [callback_reference]");
goto end;
}
if (!ee_subscription->monitoring_configurations) {
ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [monitoring_configurations]");
goto end;
}
cJSON *monitoring_configurations = cJSON_AddObjectToObject(item, "monitoringConfigurations");
if (monitoring_configurations == NULL) {
ogs_error("OpenAPI_ee_subscription_convertToJSON() failed [monitoring_configurations]");

View File

@ -50,10 +50,6 @@ cJSON *OpenAPI_ellipsoid_arc_convertToJSON(OpenAPI_ellipsoid_arc_t *ellipsoid_ar
}
item = cJSON_CreateObject();
if (!ellipsoid_arc->shape) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [shape]");
goto end;
}
cJSON *shape_local_JSON = OpenAPI_supported_gad_shapes_convertToJSON(ellipsoid_arc->shape);
if (shape_local_JSON == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [shape]");
@ -65,10 +61,6 @@ cJSON *OpenAPI_ellipsoid_arc_convertToJSON(OpenAPI_ellipsoid_arc_t *ellipsoid_ar
goto end;
}
if (!ellipsoid_arc->point) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [point]");
goto end;
}
cJSON *point_local_JSON = OpenAPI_geographical_coordinates_convertToJSON(ellipsoid_arc->point);
if (point_local_JSON == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [point]");
@ -80,46 +72,26 @@ cJSON *OpenAPI_ellipsoid_arc_convertToJSON(OpenAPI_ellipsoid_arc_t *ellipsoid_ar
goto end;
}
if (!ellipsoid_arc->inner_radius) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [inner_radius]");
goto end;
}
if (cJSON_AddNumberToObject(item, "innerRadius", ellipsoid_arc->inner_radius) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [inner_radius]");
goto end;
}
if (!ellipsoid_arc->uncertainty_radius) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [uncertainty_radius]");
goto end;
}
if (cJSON_AddNumberToObject(item, "uncertaintyRadius", ellipsoid_arc->uncertainty_radius) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [uncertainty_radius]");
goto end;
}
if (!ellipsoid_arc->offset_angle) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [offset_angle]");
goto end;
}
if (cJSON_AddNumberToObject(item, "offsetAngle", ellipsoid_arc->offset_angle) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [offset_angle]");
goto end;
}
if (!ellipsoid_arc->included_angle) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [included_angle]");
goto end;
}
if (cJSON_AddNumberToObject(item, "includedAngle", ellipsoid_arc->included_angle) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [included_angle]");
goto end;
}
if (!ellipsoid_arc->confidence) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [confidence]");
goto end;
}
if (cJSON_AddNumberToObject(item, "confidence", ellipsoid_arc->confidence) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_convertToJSON() failed [confidence]");
goto end;

View File

@ -47,10 +47,6 @@ cJSON *OpenAPI_ellipsoid_arc_all_of_convertToJSON(OpenAPI_ellipsoid_arc_all_of_t
}
item = cJSON_CreateObject();
if (!ellipsoid_arc_all_of->point) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [point]");
goto end;
}
cJSON *point_local_JSON = OpenAPI_geographical_coordinates_convertToJSON(ellipsoid_arc_all_of->point);
if (point_local_JSON == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [point]");
@ -62,46 +58,26 @@ cJSON *OpenAPI_ellipsoid_arc_all_of_convertToJSON(OpenAPI_ellipsoid_arc_all_of_t
goto end;
}
if (!ellipsoid_arc_all_of->inner_radius) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [inner_radius]");
goto end;
}
if (cJSON_AddNumberToObject(item, "innerRadius", ellipsoid_arc_all_of->inner_radius) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [inner_radius]");
goto end;
}
if (!ellipsoid_arc_all_of->uncertainty_radius) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [uncertainty_radius]");
goto end;
}
if (cJSON_AddNumberToObject(item, "uncertaintyRadius", ellipsoid_arc_all_of->uncertainty_radius) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [uncertainty_radius]");
goto end;
}
if (!ellipsoid_arc_all_of->offset_angle) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [offset_angle]");
goto end;
}
if (cJSON_AddNumberToObject(item, "offsetAngle", ellipsoid_arc_all_of->offset_angle) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [offset_angle]");
goto end;
}
if (!ellipsoid_arc_all_of->included_angle) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [included_angle]");
goto end;
}
if (cJSON_AddNumberToObject(item, "includedAngle", ellipsoid_arc_all_of->included_angle) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [included_angle]");
goto end;
}
if (!ellipsoid_arc_all_of->confidence) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [confidence]");
goto end;
}
if (cJSON_AddNumberToObject(item, "confidence", ellipsoid_arc_all_of->confidence) == NULL) {
ogs_error("OpenAPI_ellipsoid_arc_all_of_convertToJSON() failed [confidence]");
goto end;

View File

@ -40,28 +40,16 @@ cJSON *OpenAPI_eps_bearer_info_convertToJSON(OpenAPI_eps_bearer_info_t *eps_bear
}
item = cJSON_CreateObject();
if (!eps_bearer_info->ebi) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [ebi]");
goto end;
}
if (cJSON_AddNumberToObject(item, "ebi", eps_bearer_info->ebi) == NULL) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [ebi]");
goto end;
}
if (!eps_bearer_info->pgw_s8u_fteid) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [pgw_s8u_fteid]");
goto end;
}
if (cJSON_AddNumberToObject(item, "pgwS8uFteid", eps_bearer_info->pgw_s8u_fteid) == NULL) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [pgw_s8u_fteid]");
goto end;
}
if (!eps_bearer_info->bearer_level_qo_s) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [bearer_level_qo_s]");
goto end;
}
if (cJSON_AddNumberToObject(item, "bearerLevelQoS", eps_bearer_info->bearer_level_qo_s) == NULL) {
ogs_error("OpenAPI_eps_bearer_info_convertToJSON() failed [bearer_level_qo_s]");
goto end;

View File

@ -40,19 +40,11 @@ cJSON *OpenAPI_eps_iwk_pgw_convertToJSON(OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw)
}
item = cJSON_CreateObject();
if (!eps_iwk_pgw->pgw_fqdn) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [pgw_fqdn]");
goto end;
}
if (cJSON_AddStringToObject(item, "pgwFqdn", eps_iwk_pgw->pgw_fqdn) == NULL) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [pgw_fqdn]");
goto end;
}
if (!eps_iwk_pgw->smf_instance_id) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [smf_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "smfInstanceId", eps_iwk_pgw->smf_instance_id) == NULL) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [smf_instance_id]");
goto end;

View File

@ -40,10 +40,6 @@ cJSON *OpenAPI_eps_pdn_cnx_info_convertToJSON(OpenAPI_eps_pdn_cnx_info_t *eps_pd
}
item = cJSON_CreateObject();
if (!eps_pdn_cnx_info->pgw_s8c_fteid) {
ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [pgw_s8c_fteid]");
goto end;
}
if (cJSON_AddNumberToObject(item, "pgwS8cFteid", eps_pdn_cnx_info->pgw_s8c_fteid) == NULL) {
ogs_error("OpenAPI_eps_pdn_cnx_info_convertToJSON() failed [pgw_s8c_fteid]");
goto end;

View File

@ -67,10 +67,6 @@ cJSON *OpenAPI_eth_flow_description_convertToJSON(OpenAPI_eth_flow_description_t
}
}
if (!eth_flow_description->eth_type) {
ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [eth_type]");
goto end;
}
if (cJSON_AddStringToObject(item, "ethType", eth_flow_description->eth_type) == NULL) {
ogs_error("OpenAPI_eth_flow_description_convertToJSON() failed [eth_type]");
goto end;

View File

@ -59,10 +59,6 @@ cJSON *OpenAPI_eutra_location_convertToJSON(OpenAPI_eutra_location_t *eutra_loca
}
item = cJSON_CreateObject();
if (!eutra_location->tai) {
ogs_error("OpenAPI_eutra_location_convertToJSON() failed [tai]");
goto end;
}
cJSON *tai_local_JSON = OpenAPI_tai_convertToJSON(eutra_location->tai);
if (tai_local_JSON == NULL) {
ogs_error("OpenAPI_eutra_location_convertToJSON() failed [tai]");
@ -74,10 +70,6 @@ cJSON *OpenAPI_eutra_location_convertToJSON(OpenAPI_eutra_location_t *eutra_loca
goto end;
}
if (!eutra_location->ecgi) {
ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ecgi]");
goto end;
}
cJSON *ecgi_local_JSON = OpenAPI_ecgi_convertToJSON(eutra_location->ecgi);
if (ecgi_local_JSON == NULL) {
ogs_error("OpenAPI_eutra_location_convertToJSON() failed [ecgi]");

View File

@ -43,10 +43,6 @@ cJSON *OpenAPI_expected_ue_behavior_convertToJSON(OpenAPI_expected_ue_behavior_t
}
item = cJSON_CreateObject();
if (!expected_ue_behavior->exp_move_trajectory) {
ogs_error("OpenAPI_expected_ue_behavior_convertToJSON() failed [exp_move_trajectory]");
goto end;
}
cJSON *exp_move_trajectoryList = cJSON_AddArrayToObject(item, "expMoveTrajectory");
if (exp_move_trajectoryList == NULL) {
ogs_error("OpenAPI_expected_ue_behavior_convertToJSON() failed [exp_move_trajectory]");
@ -65,10 +61,6 @@ cJSON *OpenAPI_expected_ue_behavior_convertToJSON(OpenAPI_expected_ue_behavior_t
}
}
if (!expected_ue_behavior->validity_time) {
ogs_error("OpenAPI_expected_ue_behavior_convertToJSON() failed [validity_time]");
goto end;
}
if (cJSON_AddStringToObject(item, "validityTime", expected_ue_behavior->validity_time) == NULL) {
ogs_error("OpenAPI_expected_ue_behavior_convertToJSON() failed [validity_time]");
goto end;

View File

@ -70,19 +70,11 @@ cJSON *OpenAPI_expected_ue_behaviour_convertToJSON(OpenAPI_expected_ue_behaviour
}
item = cJSON_CreateObject();
if (!expected_ue_behaviour->af_instance_id) {
ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [af_instance_id]");
goto end;
}
if (cJSON_AddStringToObject(item, "afInstanceId", expected_ue_behaviour->af_instance_id) == NULL) {
ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [af_instance_id]");
goto end;
}
if (!expected_ue_behaviour->reference_id) {
ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [reference_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "referenceId", expected_ue_behaviour->reference_id) == NULL) {
ogs_error("OpenAPI_expected_ue_behaviour_convertToJSON() failed [reference_id]");
goto end;

View File

@ -49,19 +49,11 @@ cJSON *OpenAPI_exposure_data_subscription_convertToJSON(OpenAPI_exposure_data_su
}
item = cJSON_CreateObject();
if (!exposure_data_subscription->notification_uri) {
ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [notification_uri]");
goto end;
}
if (cJSON_AddStringToObject(item, "notificationUri", exposure_data_subscription->notification_uri) == NULL) {
ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [notification_uri]");
goto end;
}
if (!exposure_data_subscription->monitored_resource_uris) {
ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [monitored_resource_uris]");
goto end;
}
cJSON *monitored_resource_uris = cJSON_AddArrayToObject(item, "monitoredResourceUris");
if (monitored_resource_uris == NULL) {
ogs_error("OpenAPI_exposure_data_subscription_convertToJSON() failed [monitored_resource_uris]");

View File

@ -47,10 +47,6 @@ cJSON *OpenAPI_ext_snssai_convertToJSON(OpenAPI_ext_snssai_t *ext_snssai)
}
item = cJSON_CreateObject();
if (!ext_snssai->sst) {
ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sst]");
goto end;
}
if (cJSON_AddNumberToObject(item, "sst", ext_snssai->sst) == NULL) {
ogs_error("OpenAPI_ext_snssai_convertToJSON() failed [sst]");
goto end;

View File

@ -42,10 +42,6 @@ cJSON *OpenAPI_flow_info_convertToJSON(OpenAPI_flow_info_t *flow_info)
}
item = cJSON_CreateObject();
if (!flow_info->flow_id) {
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_id]");
goto end;
}
if (cJSON_AddNumberToObject(item, "flowId", flow_info->flow_id) == NULL) {
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_id]");
goto end;

View File

@ -39,19 +39,11 @@ cJSON *OpenAPI_g_nb_id_convertToJSON(OpenAPI_g_nb_id_t *g_nb_id)
}
item = cJSON_CreateObject();
if (!g_nb_id->bit_length) {
ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [bit_length]");
goto end;
}
if (cJSON_AddNumberToObject(item, "bitLength", g_nb_id->bit_length) == NULL) {
ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [bit_length]");
goto end;
}
if (!g_nb_id->g_nb_value) {
ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [g_nb_value]");
goto end;
}
if (cJSON_AddStringToObject(item, "gNBValue", g_nb_id->g_nb_value) == NULL) {
ogs_error("OpenAPI_g_nb_id_convertToJSON() failed [g_nb_value]");
goto end;

View File

@ -37,10 +37,6 @@ cJSON *OpenAPI_gad_shape_convertToJSON(OpenAPI_gad_shape_t *gad_shape)
}
item = cJSON_CreateObject();
if (!gad_shape->shape) {
ogs_error("OpenAPI_gad_shape_convertToJSON() failed [shape]");
goto end;
}
cJSON *shape_local_JSON = OpenAPI_supported_gad_shapes_convertToJSON(gad_shape->shape);
if (shape_local_JSON == NULL) {
ogs_error("OpenAPI_gad_shape_convertToJSON() failed [shape]");

View File

@ -58,37 +58,21 @@ cJSON *OpenAPI_gbr_qos_flow_information_convertToJSON(OpenAPI_gbr_qos_flow_infor
}
item = cJSON_CreateObject();
if (!gbr_qos_flow_information->max_fbr_dl) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_fbr_dl]");
goto end;
}
if (cJSON_AddStringToObject(item, "maxFbrDl", gbr_qos_flow_information->max_fbr_dl) == NULL) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_fbr_dl]");
goto end;
}
if (!gbr_qos_flow_information->max_fbr_ul) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_fbr_ul]");
goto end;
}
if (cJSON_AddStringToObject(item, "maxFbrUl", gbr_qos_flow_information->max_fbr_ul) == NULL) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [max_fbr_ul]");
goto end;
}
if (!gbr_qos_flow_information->gua_fbr_dl) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [gua_fbr_dl]");
goto end;
}
if (cJSON_AddStringToObject(item, "guaFbrDl", gbr_qos_flow_information->gua_fbr_dl) == NULL) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [gua_fbr_dl]");
goto end;
}
if (!gbr_qos_flow_information->gua_fbr_ul) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [gua_fbr_ul]");
goto end;
}
if (cJSON_AddStringToObject(item, "guaFbrUl", gbr_qos_flow_information->gua_fbr_ul) == NULL) {
ogs_error("OpenAPI_gbr_qos_flow_information_convertToJSON() failed [gua_fbr_ul]");
goto end;

Some files were not shown because too many files have changed in this diff Show More