diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-09-27 09:21:52 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2012-09-27 09:21:52 +0200 |
commit | 99a107dbeef03b2e80aff82023cdfc5c10109b5b (patch) | |
tree | 3b43469e9c18d2b2b5f7121375456fd32508ac51 /src/gprs_rlcmac_data.cpp | |
parent | 80be275710844e6791bee32f7d348f5e0aaa082f (diff) |
Free existing UL/DL TBF, if RACH has been received from MS
In this case the mobile has lost existing flows, so it make sense to free
them. The TFI(s) can be re-used immidiately, because they are not
associated by MS anymore.
Diffstat (limited to 'src/gprs_rlcmac_data.cpp')
-rw-r--r-- | src/gprs_rlcmac_data.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp index b6d50622..dedf98a8 100644 --- a/src/gprs_rlcmac_data.cpp +++ b/src/gprs_rlcmac_data.cpp @@ -380,8 +380,25 @@ int gprs_rlcmac_rcv_control_block(bitvec *rlc_block, uint8_t trx, uint8_t ts, if (ul_control_block->u.Packet_Resource_Request.ID.UnionType) { tlli = ul_control_block->u.Packet_Resource_Request.ID.u.TLLI; tbf = tbf_by_tlli(tlli, GPRS_RLCMAC_UL_TBF); + if (tbf) { + LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " + "TLLI=0x%08x while UL TBF=%d still " + "exists. Killing pending DL TBF\n", + tlli, tbf->tfi); + tbf_free(tbf); + tbf = NULL; + } if (!tbf) { uint8_t ms_class = 0; + struct gprs_rlcmac_tbf *dl_tbf; + + if ((dl_tbf = tbf_by_tlli(tlli, GPRS_RLCMAC_DL_TBF))) { + LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " + "TLLI=0x%08x while DL TBF=%d still exists. " + "Killing pending DL TBF\n", tlli, + dl_tbf->tfi); + tbf_free(dl_tbf); + } LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet ressource request of single " "block, so we provide one:\n"); |