This commit is contained in:
Sukchan Lee 2018-04-20 09:06:50 +02:00
commit ee3c2d29bf
4 changed files with 20 additions and 13 deletions

View File

@ -1761,6 +1761,7 @@ enb_ue_t* enb_ue_add(mme_enb_t *enb)
index_alloc(&enb_ue_pool, &enb_ue);
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->enb = enb;

View File

@ -160,6 +160,7 @@ struct _enb_ue_t {
index_t index; /* An index of this node */
/* 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 mme_ue_s1ap_id; /* MME-UE-S1AP-ID received from MME */

View File

@ -181,7 +181,9 @@ void mme_state_operational(fsm_t *s, event_t *e)
if (rv != CORE_OK)
{
d_print_hex(pkbuf->payload, pkbuf->len);
d_assert(0, pkbuf_free(pkbuf); break, "Can't decode S1AP_PDU");
d_assert(0,
s1ap_free_pdu(&message); pkbuf_free(pkbuf); break,
"Can't decode S1AP_PDU");
}
event_set_param1(e, (c_uintptr_t)enb->index);

View File

@ -1029,18 +1029,21 @@ status_t s1ap_build_ue_context_release_command(
Cause = &ie->value.choice.Cause;
#if UE_S1AP_IDs_PRESENT_mME_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;
#else
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
enb_ue->mme_ue_s1ap_id;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID =
enb_ue->enb_ue_s1ap_id;
#endif
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;
}
else
{
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
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->choice.radioNetwork = cause;