forked from acouzens/open5gs
-Initialize enb_ue_s1ap_id to invalid value
-Use mme_ue_s1apid if enb_ue_s1ap_id is not valid when encoding ue_context_release_command
This commit is contained in:
parent
553804dd94
commit
c968067829
|
@ -1761,6 +1761,7 @@ enb_ue_t* enb_ue_add(mme_enb_t *enb)
|
||||||
index_alloc(&enb_ue_pool, &enb_ue);
|
index_alloc(&enb_ue_pool, &enb_ue);
|
||||||
d_assert(enb_ue, return NULL, "Null param");
|
d_assert(enb_ue, return NULL, "Null param");
|
||||||
|
|
||||||
|
enb_ue->enb_ue_s1ap_id = INVALID_UE_S1AP_ID;
|
||||||
enb_ue->mme_ue_s1ap_id = NEXT_ID(self.mme_ue_s1ap_id, 1, 0xffffffff);
|
enb_ue->mme_ue_s1ap_id = NEXT_ID(self.mme_ue_s1ap_id, 1, 0xffffffff);
|
||||||
enb_ue->enb = enb;
|
enb_ue->enb = enb;
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,7 @@ struct _enb_ue_t {
|
||||||
index_t index; /* An index of this node */
|
index_t index; /* An index of this node */
|
||||||
|
|
||||||
/* UE identity */
|
/* UE identity */
|
||||||
|
#define INVALID_UE_S1AP_ID 0xffffffff /* Initial value of enb_ue_s1ap_id */
|
||||||
c_uint32_t enb_ue_s1ap_id; /* eNB-UE-S1AP-ID received from eNB */
|
c_uint32_t enb_ue_s1ap_id; /* eNB-UE-S1AP-ID received from eNB */
|
||||||
c_uint32_t mme_ue_s1ap_id; /* MME-UE-S1AP-ID received from MME */
|
c_uint32_t mme_ue_s1ap_id; /* MME-UE-S1AP-ID received from MME */
|
||||||
|
|
||||||
|
|
|
@ -1029,18 +1029,21 @@ status_t s1ap_build_ue_context_release_command(
|
||||||
|
|
||||||
Cause = &ie->value.choice.Cause;
|
Cause = &ie->value.choice.Cause;
|
||||||
|
|
||||||
#if UE_S1AP_IDs_PRESENT_mME_UE_S1AP_ID
|
if (enb_ue->enb_ue_s1ap_id == INVALID_UE_S1AP_ID)
|
||||||
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID;
|
{
|
||||||
UE_S1AP_IDs->choice.mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id;
|
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID;
|
||||||
#else
|
UE_S1AP_IDs->choice.mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id;
|
||||||
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
|
}
|
||||||
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
|
else
|
||||||
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
|
{
|
||||||
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
|
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
|
||||||
enb_ue->mme_ue_s1ap_id;
|
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
|
||||||
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID =
|
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
|
||||||
enb_ue->enb_ue_s1ap_id;
|
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
|
||||||
#endif
|
enb_ue->mme_ue_s1ap_id;
|
||||||
|
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID =
|
||||||
|
enb_ue->enb_ue_s1ap_id;
|
||||||
|
}
|
||||||
|
|
||||||
Cause->present = group;
|
Cause->present = group;
|
||||||
Cause->choice.radioNetwork = cause;
|
Cause->choice.radioNetwork = cause;
|
||||||
|
|
Loading…
Reference in New Issue