Properly initializing the PDCP layer

Previously, the ue_id passed into the
init_pdcp() in  the proxy would be 41.
This is outside of the bounds of the
nas_sock_fd array and would cause a crash.
This was occuring because the node_number
in the NRUE starts at 2, not 1.
This commit is contained in:
Melissa Elkadi
2021-09-03 11:40:53 -07:00
parent 0f3340011a
commit d60dfa552a
+4 -5
View File
@@ -403,10 +403,9 @@ void init_pdcp(int ue_id) {
if (rlc_module_init(0) != 0) {
LOG_I(RLC, "Problem at RLC initiation \n");
}
if(!IS_SOFTMODEM_NOS1) {
pdcp_layer_init();
nr_pdcp_module_init(pdcp_initmask, ue_id);
}
pdcp_layer_init();
nr_pdcp_module_init(pdcp_initmask, ue_id);
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
@@ -473,7 +472,7 @@ int main( int argc, char **argv ) {
}
else
{
init_pdcp(mode_offset + node_number - 1);
init_pdcp(mode_offset + ue_id_g);
}
NB_UE_INST=1;