aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-10-07 15:55:25 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-12-18 10:03:05 +0100
commit3a7eb6b80f3f36768ec6a2d9aca916e0afb3529d (patch)
treeaf438882e226c9bfba095666e25be94f7a2d3f4b
parent0c9b50c4986d13518d0b3c2e1230b9ea79ad2c16 (diff)
Fix: Drop ongoing UL TBF, if another UL TBF is established for same TLLI
This happens, if the mobile looses coverage and establishes a subsequent uplink TBF.
-rw-r--r--src/gprs_rlcmac_data.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp
index dca3f0c..5e7caf0 100644
--- a/src/gprs_rlcmac_data.cpp
+++ b/src/gprs_rlcmac_data.cpp
@@ -847,7 +847,7 @@ int gprs_rlcmac_rcv_data_block_acknowledged(uint8_t trx, uint8_t ts,
/* get TLLI */
if (!tbf->tlli_valid) {
- struct gprs_rlcmac_tbf *dl_tbf;
+ struct gprs_rlcmac_tbf *dl_tbf, *ul_tbf;
/* no TLLI yet */
if (!rh->ti) {
@@ -861,7 +861,6 @@ int gprs_rlcmac_rcv_data_block_acknowledged(uint8_t trx, uint8_t ts,
"of UL DATA TBF=%d.\n", rh->tfi);
return 0;
}
- tbf->tlli_valid = 1;
LOGP(DRLCMACUL, LOGL_INFO, "Decoded premier TLLI=0x%08x of "
"UL DATA TBF=%d.\n", tbf->tlli, rh->tfi);
if ((dl_tbf = tbf_by_tlli(tbf->tlli, GPRS_RLCMAC_DL_TBF))) {
@@ -871,6 +870,17 @@ int gprs_rlcmac_rcv_data_block_acknowledged(uint8_t trx, uint8_t ts,
dl_tbf->tfi);
tbf_free(dl_tbf);
}
+ /* tbf_by_tlli will not find your TLLI, because it is not
+ * yet marked valid */
+ if ((ul_tbf = tbf_by_tlli(tbf->tlli, GPRS_RLCMAC_UL_TBF))) {
+ LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from "
+ "TLLI=0x%08x while UL TBF=%d still exists. "
+ "Killing pending UL TBF\n", tbf->tlli,
+ ul_tbf->tfi);
+ tbf_free(ul_tbf);
+ }
+ /* mark TLLI valid now */
+ tbf->tlli_valid = 1;
/* already have TLLI, but we stille get another one */
} else if (rh->ti) {
uint32_t tlli;