Commit 19a51f67 authored by francescomani's avatar francescomani

flag for detach after RRCrelease at UE

parent 851cf969
......@@ -311,6 +311,7 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst)
rrc->dl_bwp_id = 0;
rrc->ul_bwp_id = 0;
rrc->as_security_activated = false;
rrc->detach_after_release = false;
FILE *f = NULL;
if (uecap_file)
......@@ -1627,6 +1628,8 @@ static int nr_rrc_ue_decode_dcch(NR_UE_RRC_INST_t *rrc,
LOG_I(NR_RRC, "[UE %ld] Received RRC Release (gNB %d)\n", rrc->ue_id, gNB_indexP);
// TODO properly implement procedures in 5.3.8.3 of 38.331
NR_Release_Cause_t cause = OTHER;
if (rrc->detach_after_release)
rrc->nrRrcState = RRC_STATE_DETACH_NR;
nr_rrc_going_to_IDLE(rrc, cause, dl_dcch_msg->message.choice.c1->choice.rrcRelease);
break;
......@@ -1785,7 +1788,9 @@ void *rrc_nrue(void *notUsed)
break;
case NAS_DETACH_REQ:
if (!NAS_DETACH_REQ(msg_p).wait_release) {
if (NAS_DETACH_REQ(msg_p).wait_release)
rrc->detach_after_release = true;
else {
rrc->nrRrcState = RRC_STATE_DETACH_NR;
NR_Release_Cause_t release_cause = OTHER;
nr_rrc_going_to_IDLE(rrc, release_cause, NULL);
......
......@@ -216,6 +216,7 @@ typedef struct NR_UE_RRC_INST_s {
e_NR_IntegrityProtAlgorithm integrityProtAlgorithm;
long keyToUse;
bool as_security_activated;
bool detach_after_release;
long selected_plmn_identity;
Rrc_State_NR_t nrRrcState;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment