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
changes/48/25748/2
Pau Espin 1 year ago
parent 8318d9c25d
commit 201dbe04f7
  1. 16
      src/pdch.cpp

@ -638,6 +638,14 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
}
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:
sba = item->sba.sba;
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);
pdch_ulc_release_node(ulc, item);
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:
OSMO_ASSERT(0);
}

Loading…
Cancel
Save