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
|
|
@ -217,6 +217,12 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse
|
|||
}
|
||||
OpenAPI_subscribed_snssai_t *subscribed_nssaiItem = OpenAPI_subscribed_snssai_parseFromJSON(subscribed_nssai_local_nonprimitive);
|
||||
|
||||
if (!subscribed_nssaiItem) {
|
||||
ogs_error("No subscribed_nssaiItem");
|
||||
OpenAPI_list_free(subscribed_nssaiList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(subscribed_nssaiList, subscribed_nssaiItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -254,6 +260,12 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse
|
|||
}
|
||||
OpenAPI_snssai_t *s_nssai_for_mappingItem = OpenAPI_snssai_parseFromJSON(s_nssai_for_mapping_local_nonprimitive);
|
||||
|
||||
if (!s_nssai_for_mappingItem) {
|
||||
ogs_error("No s_nssai_for_mappingItem");
|
||||
OpenAPI_list_free(s_nssai_for_mappingList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(s_nssai_for_mappingList, s_nssai_for_mappingItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -277,6 +289,12 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse
|
|||
}
|
||||
OpenAPI_snssai_t *requested_nssaiItem = OpenAPI_snssai_parseFromJSON(requested_nssai_local_nonprimitive);
|
||||
|
||||
if (!requested_nssaiItem) {
|
||||
ogs_error("No requested_nssaiItem");
|
||||
OpenAPI_list_free(requested_nssaiList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(requested_nssaiList, requested_nssaiItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -309,6 +327,12 @@ OpenAPI_slice_info_for_registration_t *OpenAPI_slice_info_for_registration_parse
|
|||
}
|
||||
OpenAPI_mapping_of_snssai_t *mapping_of_nssaiItem = OpenAPI_mapping_of_snssai_parseFromJSON(mapping_of_nssai_local_nonprimitive);
|
||||
|
||||
if (!mapping_of_nssaiItem) {
|
||||
ogs_error("No mapping_of_nssaiItem");
|
||||
OpenAPI_list_free(mapping_of_nssaiList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(mapping_of_nssaiList, mapping_of_nssaiItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue