pdch: PktResReq: Avoid releasing ULC entry if expecting something else on UL
Let's only release PDCH ULC entry if it was indeed what we expected. In other case, time it out. Move the case in the switch statement to the start to easy function readibility (early return style). Change-Id: I3d8749acca8e7859295d73cce556b2083169f726
This commit is contained in:
parent
8318d9c25d
commit
201dbe04f7
16
src/pdch.cpp
16
src/pdch.cpp
|
@ -638,6 +638,14 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (item->type) {
|
switch (item->type) {
|
||||||
|
case PDCH_ULC_NODE_TBF_USF:
|
||||||
|
/* Is it actually valid for an MS to send a PKT Res Req during USF? */
|
||||||
|
ul_tbf = item->tbf_usf.ul_tbf;
|
||||||
|
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
|
||||||
|
"Unexpectedly received, waiting USF of %s\n",
|
||||||
|
fn, tbf_name(item->tbf_usf.ul_tbf));
|
||||||
|
/* Ignore it, let common path expire related ULC entry */
|
||||||
|
goto return_unref;
|
||||||
case PDCH_ULC_NODE_SBA:
|
case PDCH_ULC_NODE_SBA:
|
||||||
sba = item->sba.sba;
|
sba = item->sba.sba;
|
||||||
LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: "
|
LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE REQ: "
|
||||||
|
@ -675,14 +683,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
|
||||||
ul_tbf->n_reset(N3103);
|
ul_tbf->n_reset(N3103);
|
||||||
pdch_ulc_release_node(ulc, item);
|
pdch_ulc_release_node(ulc, item);
|
||||||
break;
|
break;
|
||||||
case PDCH_ULC_NODE_TBF_USF:
|
|
||||||
/* Is it actually valid for an MS to send a PKT Res Req during USF? */
|
|
||||||
ul_tbf = item->tbf_usf.ul_tbf;
|
|
||||||
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
|
|
||||||
"Unexpectedly received, waiting USF of %s\n",
|
|
||||||
fn, tbf_name(item->tbf_usf.ul_tbf));
|
|
||||||
pdch_ulc_release_node(ulc, item);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
OSMO_ASSERT(0);
|
OSMO_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue