mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 15:24:14 +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
|
|
@ -488,6 +488,12 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
OpenAPI_configured_snssai_t *configured_nssaiItem = OpenAPI_configured_snssai_parseFromJSON(configured_nssai_local_nonprimitive);
|
||||
|
||||
if (!configured_nssaiItem) {
|
||||
ogs_error("No configured_nssaiItem");
|
||||
OpenAPI_list_free(configured_nssaiList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(configured_nssaiList, configured_nssaiItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -511,6 +517,12 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_plmnItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_plmn_local_nonprimitive);
|
||||
|
||||
if (!rejected_nssai_in_plmnItem) {
|
||||
ogs_error("No rejected_nssai_in_plmnItem");
|
||||
OpenAPI_list_free(rejected_nssai_in_plmnList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(rejected_nssai_in_plmnList, rejected_nssai_in_plmnItem);
|
||||
}
|
||||
}
|
||||
|
|
@ -534,6 +546,12 @@ OpenAPI_registration_context_container_t *OpenAPI_registration_context_container
|
|||
}
|
||||
OpenAPI_snssai_t *rejected_nssai_in_taItem = OpenAPI_snssai_parseFromJSON(rejected_nssai_in_ta_local_nonprimitive);
|
||||
|
||||
if (!rejected_nssai_in_taItem) {
|
||||
ogs_error("No rejected_nssai_in_taItem");
|
||||
OpenAPI_list_free(rejected_nssai_in_taList);
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(rejected_nssai_in_taList, rejected_nssai_in_taItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue