Add assert for not supporting feature

This commit is contained in:
Sukchan Lee 2020-10-02 10:52:02 -04:00
parent 8ba3d89b8d
commit 71fa610a8e
2 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,11 @@ char *ogs_nas_5gs_suci_from_mobile_identity(
(ogs_nas_5gs_mobile_identity_suci_t *)mobile_identity->buffer;
ogs_assert(mobile_identity_suci);
ogs_assert(mobile_identity_suci->h.supi_format ==
OGS_NAS_5GS_SUPI_FORMAT_IMSI);
ogs_assert(mobile_identity_suci->protection_scheme_id ==
OGS_NAS_5GS_NULL_SCHEME);
suci = ogs_msprintf("suci-%d-", mobile_identity_suci->h.supi_format);
ogs_assert(suci);

View File

@ -1304,6 +1304,8 @@ amf_ue_t *amf_ue_find_by_message(ogs_nas_5gs_message_t *message)
switch (mobile_identity_header->type) {
case OGS_NAS_5GS_MOBILE_IDENTITY_SUCI:
suci = ogs_nas_5gs_suci_from_mobile_identity(mobile_identity);
ogs_assert(suci);
amf_ue = amf_ue_find_by_suci(suci);
if (amf_ue) {
ogs_trace("[%s] known UE by SUCI", suci);