mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 21:30:10 +00:00
[SBI] fix crash when no mandatory item (#1350)
NRF crashed if NFService does not have a versions. Versions are mandatory, we've modified the SBI interface for the safety.
This commit is contained in:
parent
acfcbda8fa
commit
900e888dc1
219 changed files with 2474 additions and 0 deletions
|
|
@ -1107,6 +1107,12 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON)
|
|||
}
|
||||
OpenAPI_area_t *forbidden_area_listItem = OpenAPI_area_parseFromJSON(forbidden_area_list_local_nonprimitive);
|
||||
|
||||
if (!forbidden_area_listItem) {
|
||||
ogs_error("No forbidden_area_listItem");
|
||||
OpenAPI_list_free(forbidden_area_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(forbidden_area_listList, forbidden_area_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -1159,6 +1165,12 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON)
|
|||
}
|
||||
OpenAPI_ext_amf_event_subscription_t *event_subscription_listItem = OpenAPI_ext_amf_event_subscription_parseFromJSON(event_subscription_list_local_nonprimitive);
|
||||
|
||||
if (!event_subscription_listItem) {
|
||||
ogs_error("No event_subscription_listItem");
|
||||
OpenAPI_list_free(event_subscription_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(event_subscription_listList, event_subscription_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -1182,6 +1194,12 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON)
|
|||
}
|
||||
OpenAPI_mm_context_t *mm_context_listItem = OpenAPI_mm_context_parseFromJSON(mm_context_list_local_nonprimitive);
|
||||
|
||||
if (!mm_context_listItem) {
|
||||
ogs_error("No mm_context_listItem");
|
||||
OpenAPI_list_free(mm_context_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(mm_context_listList, mm_context_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -1205,6 +1223,12 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON)
|
|||
}
|
||||
OpenAPI_pdu_session_context_t *session_context_listItem = OpenAPI_pdu_session_context_parseFromJSON(session_context_list_local_nonprimitive);
|
||||
|
||||
if (!session_context_listItem) {
|
||||
ogs_error("No session_context_listItem");
|
||||
OpenAPI_list_free(session_context_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(session_context_listList, session_context_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -1286,6 +1310,12 @@ OpenAPI_ue_context_t *OpenAPI_ue_context_parseFromJSON(cJSON *ue_contextJSON)
|
|||
}
|
||||
OpenAPI_small_data_rate_status_info_t *small_data_rate_status_infosItem = OpenAPI_small_data_rate_status_info_parseFromJSON(small_data_rate_status_infos_local_nonprimitive);
|
||||
|
||||
if (!small_data_rate_status_infosItem) {
|
||||
ogs_error("No small_data_rate_status_infosItem");
|
||||
OpenAPI_list_free(small_data_rate_status_infosList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(small_data_rate_status_infosList, small_data_rate_status_infosItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue