mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +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
|
|
@ -240,6 +240,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON)
|
|||
}
|
||||
OpenAPI_amf_event_area_t *area_listItem = OpenAPI_amf_event_area_parseFromJSON(area_list_local_nonprimitive);
|
||||
|
||||
if (!area_listItem) {
|
||||
ogs_error("No area_listItem");
|
||||
OpenAPI_list_free(area_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(area_listList, area_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -263,6 +269,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON)
|
|||
}
|
||||
OpenAPI_location_filter_t *location_filter_listItem = OpenAPI_location_filter_parseFromJSON(location_filter_list_local_nonprimitive);
|
||||
|
||||
if (!location_filter_listItem) {
|
||||
ogs_error("No location_filter_listItem");
|
||||
OpenAPI_list_free(location_filter_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(location_filter_listList, location_filter_listItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -295,6 +307,12 @@ OpenAPI_amf_event_t *OpenAPI_amf_event_parseFromJSON(cJSON *amf_eventJSON)
|
|||
}
|
||||
OpenAPI_traffic_descriptor_t *traffic_descriptor_listItem = OpenAPI_traffic_descriptor_parseFromJSON(traffic_descriptor_list_local_nonprimitive);
|
||||
|
||||
if (!traffic_descriptor_listItem) {
|
||||
ogs_error("No traffic_descriptor_listItem");
|
||||
OpenAPI_list_free(traffic_descriptor_listList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(traffic_descriptor_listList, traffic_descriptor_listItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue