forked from acouzens/open5gs
[SBI] UDR stores PEI instead of PCF
This commit is contained in:
parent
d33d67b2af
commit
af67b2486b
|
@ -75,6 +75,7 @@ ogs_sbi_request_t *amf_nudm_uecm_build_registration(
|
|||
ogs_error("No rat_type");
|
||||
goto end;
|
||||
}
|
||||
Amf3GppAccessRegistration.pei = amf_ue->pei;
|
||||
|
||||
message.Amf3GppAccessRegistration = &Amf3GppAccessRegistration;
|
||||
|
||||
|
|
|
@ -112,26 +112,9 @@ bool pcf_npcf_am_policy_contrtol_handle_create(pcf_ue_t *pcf_ue,
|
|||
pcf_ue->access_type = PolicyAssociationRequest->access_type;
|
||||
|
||||
if (PolicyAssociationRequest->pei) {
|
||||
char *type = NULL, *value = NULL;
|
||||
if (pcf_ue->pei)
|
||||
ogs_free(pcf_ue->pei);
|
||||
pcf_ue->pei = ogs_strdup(PolicyAssociationRequest->pei);
|
||||
|
||||
type = ogs_id_get_type(pcf_ue->pei);
|
||||
ogs_assert(type);
|
||||
value = ogs_id_get_value(pcf_ue->pei);
|
||||
ogs_assert(value);
|
||||
|
||||
if (strcmp(type, "imeisv") == 0) {
|
||||
ogs_assert(OGS_OK == ogs_dbi_update_imeisv(pcf_ue->supi, value));
|
||||
} else {
|
||||
ogs_fatal("Unknown Type = %s", type);
|
||||
ogs_assert_if_reached();
|
||||
}
|
||||
|
||||
|
||||
ogs_free(type);
|
||||
ogs_free(value);
|
||||
}
|
||||
|
||||
Guami = PolicyAssociationRequest->guami;
|
||||
|
|
|
@ -294,6 +294,30 @@ bool udr_nudr_dr_handle_subscription_context(
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Amf3GppAccessRegistration->pei) {
|
||||
char *type = NULL, *value = NULL;
|
||||
char *pei = NULL;
|
||||
|
||||
pei = ogs_strdup(Amf3GppAccessRegistration->pei);
|
||||
ogs_assert(pei);
|
||||
|
||||
type = ogs_id_get_type(pei);
|
||||
ogs_assert(type);
|
||||
value = ogs_id_get_value(pei);
|
||||
ogs_assert(value);
|
||||
|
||||
if (strcmp(type, "imeisv") == 0) {
|
||||
ogs_assert(OGS_OK == ogs_dbi_update_imeisv(supi, value));
|
||||
} else {
|
||||
ogs_fatal("Unknown Type = %s", type);
|
||||
ogs_assert_if_reached();
|
||||
}
|
||||
|
||||
ogs_free(pei);
|
||||
ogs_free(type);
|
||||
ogs_free(value);
|
||||
}
|
||||
|
||||
memset(&sendmsg, 0, sizeof(sendmsg));
|
||||
|
||||
response = ogs_sbi_build_response(
|
||||
|
|
|
@ -373,19 +373,19 @@ static void ogs_nas_eps_message_test9(abts_case *tc, void *data)
|
|||
ABTS_INT_EQUAL(tc, 31, gprs_timer.value);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*32);
|
||||
ABTS_INT_EQUAL(tc, OGS_ERROR, rv);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*10*4);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*6*8);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_INT_EQUAL(tc, OGS_NAS_GPRS_TIMER_UNIT_MULTIPLES_OF_DECI_HH,
|
||||
gprs_timer.unit);
|
||||
ABTS_INT_EQUAL(tc, 4, gprs_timer.value);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*10*4+1);
|
||||
ABTS_INT_EQUAL(tc, 8, gprs_timer.value);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*6*8+1);
|
||||
ABTS_INT_EQUAL(tc, OGS_ERROR, rv);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*10*31);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*6*31);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
ABTS_INT_EQUAL(tc, OGS_NAS_GPRS_TIMER_UNIT_MULTIPLES_OF_DECI_HH,
|
||||
gprs_timer.unit);
|
||||
ABTS_INT_EQUAL(tc, 31, gprs_timer.value);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*10*32);
|
||||
rv = ogs_nas_gprs_timer_from_sec(&gprs_timer, 60*6*32);
|
||||
ABTS_INT_EQUAL(tc, OGS_ERROR, rv);
|
||||
|
||||
rv = ogs_nas_gprs_timer_3_from_sec(&gprs_timer, 1);
|
||||
|
|
Loading…
Reference in New Issue