Removed OAI exit in mac_rlc_data_req when no RB is present
- this prevents crashes when the function is called for LCIDs that have no RB - and simply print error message and return 0 when no RB is found
This commit is contained in:
@@ -208,7 +208,10 @@ tbs_size_t mac_rlc_data_req(
|
|||||||
switch (channel_idP) {
|
switch (channel_idP) {
|
||||||
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
|
case 1 ... 3: rb = ue->srb[channel_idP - 1]; break;
|
||||||
case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
|
case 4 ... 8: rb = ue->drb[channel_idP - 4]; break;
|
||||||
default: rb = NULL; break;
|
default:
|
||||||
|
rb = NULL;
|
||||||
|
LOG_E(RLC, "In %s:%d:%s: data request for unknown RB with LCID 0x%02x !\n", __FILE__, __LINE__, __FUNCTION__, channel_idP);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rb != NULL) {
|
if (rb != NULL) {
|
||||||
@@ -216,8 +219,6 @@ tbs_size_t mac_rlc_data_req(
|
|||||||
maxsize = tb_sizeP;
|
maxsize = tb_sizeP;
|
||||||
ret = rb->generate_pdu(rb, buffer_pP, maxsize);
|
ret = rb->generate_pdu(rb, buffer_pP, maxsize);
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RLC, "%s:%d:%s: fatal: data req for unknown RB, channel_idP: %d\n", __FILE__, __LINE__, __FUNCTION__, channel_idP);
|
|
||||||
exit(1);
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user