aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-11 19:04:24 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-12 12:41:18 +0200
commit201dbe04f7c3834418b2565f8b3e7b5ab48e6ba7 (patch)
treea17295a589b879d6f2c1f3b2c6af8cf3286a9ec0 /src
parent8318d9c25d53d24d7b2aa7f11f7658671ccf7b3a (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/pdch.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pdch.cpp b/src/pdch.cpp
index 807ce459..a503a555 100644
--- a/src/pdch.cpp
+++ b/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);
}