bts: Simplify rcv_resource_request, remove logically dead code
tbf = find if (tbf) { tbf_free(tbf); tbf = NULL; } if (!tbf) { code... } Remove the if (!tbf) and indention as the tbf is always to be NULL.
This commit is contained in:
parent
8021644e9d
commit
6b88cddc21
12
src/bts.cpp
12
src/bts.cpp
|
@ -1019,6 +1019,10 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
|||
|
||||
if (request->ID.UnionType) {
|
||||
uint32_t tlli = request->ID.u.TLLI;
|
||||
uint8_t ms_class = 0;
|
||||
struct gprs_rlcmac_tbf *dl_tbf;
|
||||
uint8_t ta;
|
||||
|
||||
tbf = bts()->tbf_by_tlli(tlli, GPRS_RLCMAC_UL_TBF);
|
||||
if (tbf) {
|
||||
LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from "
|
||||
|
@ -1028,10 +1032,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
|||
tbf_free(tbf);
|
||||
tbf = NULL;
|
||||
}
|
||||
if (!tbf) {
|
||||
uint8_t ms_class = 0;
|
||||
struct gprs_rlcmac_tbf *dl_tbf;
|
||||
uint8_t ta;
|
||||
|
||||
if ((dl_tbf = bts()->tbf_by_tlli(tlli, GPRS_RLCMAC_DL_TBF))) {
|
||||
LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from "
|
||||
|
@ -1074,7 +1074,7 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
|||
debug_diagram(bts->bts, tbf->diag, "Res. REQ");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (request->ID.u.Global_TFI.UnionType) {
|
||||
int8_t tfi = request->ID.u.Global_TFI.u.DOWNLINK_TFI;
|
||||
tbf = bts()->tbf_by_tfi(tfi, trx_no(), GPRS_RLCMAC_DL_TBF);
|
||||
|
@ -1090,7 +1090,7 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGP(DRLCMAC, LOGL_ERROR, "RX: [PCU <- BTS] %s TFI: %u TLLI: 0x%08x FIXME: Packet resource request\n", (tbf->direction == GPRS_RLCMAC_UL_TBF) ? "UL" : "DL", tbf->tfi, tbf->tlli);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue