Commit d2a0f3c8 authored by laurent's avatar laurent Committed by Sakthivel Velumani

fix rnti/ue_id for ue

parent 7b52c6cd
......@@ -481,7 +481,7 @@ static void *ue_tun_read_thread(void *_)
ctxt.subframe = 0;
ctxt.eNB_index = 0;
ctxt.brOption = 0;
ctxt.rnti = 0;
ctxt.rnti = ue_id;
bool dc = SDAP_HDR_UL_DATA_PDU;
extern uint8_t nas_qfi;
......@@ -1048,8 +1048,8 @@ void nr_pdcp_add_srbs(eNB_flag_t enb_flag, rnti_t rnti,
security_modeP & 0x0f, (security_modeP >> 4) & 0x0f,
kRRCenc, kRRCint);
}
}
LOG_W(PDCP, "nr_pdcp_add_srbs() with void list\n");
} else
LOG_W(PDCP, "nr_pdcp_add_srbs() with void list\n");
if (kRRCenc)
free(kRRCenc);
if (kRRCint)
......
......@@ -543,7 +543,7 @@ rb_found:
memcpy(req->buffer,buf,size);
req->length=size;
req->offset=0;
req->ue_id=ue->ue_id;
req->ue_id=ue->rnti;
req->bearer_id=rb_id;
LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
extern instance_t DUuniqInstance;
......
......@@ -972,11 +972,8 @@ uint8_t do_RRCReject(uint8_t Mod_id,
buffer,
100);
if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"RRCReject Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
......@@ -1770,13 +1767,11 @@ int do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
(void *)&dl_ccch_msg,
buffer,
1000);
if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
LOG_D(NR_RRC,"RRCSetup Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8);
return((enc_rval.encoded+7)/8);
......@@ -1819,12 +1814,9 @@ uint8_t do_NR_SecurityModeCommand(
buffer,
100);
if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded >0 , "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"[gNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id,
ctxt_pP->rnti,
......@@ -1890,6 +1882,9 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
(void *)sa_band_filter,
req_freq_buf,
1024);
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_NR_UE_CapabilityRequestFilterNR, (void *)sa_band_filter);
......@@ -1914,12 +1909,9 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
buffer,
100);
if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"[gNB %d] NR UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id,
ctxt_pP->rnti,
......@@ -1965,11 +1957,8 @@ uint8_t do_NR_RRCRelease(uint8_t *buffer,
(void *)&dl_dcch_msg,
buffer,
buffer_size);
if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return((enc_rval.encoded+7)/8);
}
......@@ -2050,11 +2039,8 @@ int16_t do_RRCReconfiguration(
(void *)cellGroupConfig,
masterCellGroup_buf,
1000);
if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) cellGroupConfig);
}
......@@ -2076,11 +2062,8 @@ int16_t do_RRCReconfiguration(
buffer,
buffer_size);
if(enc_rval.encoded == -1) {
LOG_I(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded >0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"[gNB %d] RRCReconfiguration for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id,
......@@ -2491,11 +2474,8 @@ NR_SRB_ToAddModList_t **SRB_configList
buffer,
100);
if(enc_rval.encoded == -1) {
LOG_E(NR_RRC, "[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
AssertFatal(enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_D(NR_RRC,"RRCReestablishment Encoded %u bits (%u bytes)\n",
(uint32_t)enc_rval.encoded, (uint32_t)(enc_rval.encoded+7)/8);
......
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