mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 07:08:11 +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
|
|
@ -163,6 +163,12 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON)
|
|||
}
|
||||
OpenAPI_event_id_t *event_idsItem = OpenAPI_event_id_parseFromJSON(event_ids_local_nonprimitive);
|
||||
|
||||
if (!event_idsItem) {
|
||||
ogs_error("No event_idsItem");
|
||||
OpenAPI_list_free(event_idsList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(event_idsList, event_idsItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -186,6 +192,12 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON)
|
|||
}
|
||||
OpenAPI_nwdaf_event_t *nwdaf_eventsItem = OpenAPI_nwdaf_event_parseFromJSON(nwdaf_events_local_nonprimitive);
|
||||
|
||||
if (!nwdaf_eventsItem) {
|
||||
ogs_error("No nwdaf_eventsItem");
|
||||
OpenAPI_list_free(nwdaf_eventsList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(nwdaf_eventsList, nwdaf_eventsItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -209,6 +221,12 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON)
|
|||
}
|
||||
OpenAPI_tai_t *tai_listItem = OpenAPI_tai_parseFromJSON(tai_list_local_nonprimitive);
|
||||
|
||||
if (!tai_listItem) {
|
||||
ogs_error("No tai_listItem");
|
||||
OpenAPI_list_free(tai_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(tai_listList, tai_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -232,6 +250,12 @@ OpenAPI_nwdaf_info_t *OpenAPI_nwdaf_info_parseFromJSON(cJSON *nwdaf_infoJSON)
|
|||
}
|
||||
OpenAPI_tai_range_t *tai_range_listItem = OpenAPI_tai_range_parseFromJSON(tai_range_list_local_nonprimitive);
|
||||
|
||||
if (!tai_range_listItem) {
|
||||
ogs_error("No tai_range_listItem");
|
||||
OpenAPI_list_free(tai_range_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(tai_range_listList, tai_range_listItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue