diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-21 18:19:29 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-21 19:02:18 +0200 |
commit | e91bd3babd5c04a154f296607b401a5050dcba31 (patch) | |
tree | db0b3ed52841b8ce10f0d8e28f5adc3cf0f72013 /src | |
parent | b139598b1c5bd271675386be77370899b5707d61 (diff) |
tbf: Do not kill DL TBF on Packet Resource Request
Currently all active TBF of an MS are killed if a Packet Resource
Request is received from the MS. In general this happens after a RACH
request. This does not happen after a resource request that has been
included into a Downlink Ack/Nack.
Sometimes an UL TBF is requested by an MS via RACH while a DL TBF is
running for instance to send a TCP Ack. This can happen, if a former
request via PACCH did not work.
This commit removes the killing of the DL TBF from
gprs_rlcmac_pdch::rcv_resource_request().
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r-- | src/bts.cpp | 13 | ||||
-rw-r--r-- | src/tbf.cpp | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 5b62a183..141431a5 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -941,14 +941,11 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request, ul_tbf = NULL; } - if (dl_tbf) { - LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " - "TLLI=0x%08x while %s still exists. " - "Killing pending DL TBF\n", tlli, - tbf_name(dl_tbf)); - tbf_free(dl_tbf); - dl_tbf = NULL; - } + if (dl_tbf) + LOGP(DRLCMACUL, LOGL_INFO, "Got RACH from " + "TLLI=0x%08x while %s still exists.\n", + tlli, tbf_name(dl_tbf)); + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet resource request of single " "block, so we provide one:\n"); diff --git a/src/tbf.cpp b/src/tbf.cpp index 457fe24e..2e6da026 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -887,6 +887,8 @@ int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len) } old_ms = bts->ms_by_tlli(new_tlli); + /* Keep the old MS object for the update_ms() */ + GprsMs::Guard guard(old_ms); if (old_ms) { /* Get them before calling set_ms() */ dl_tbf = old_ms->dl_tbf(); @@ -897,7 +899,7 @@ int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len) /* there might be an active and valid downlink TBF */ if (!ms()->dl_tbf() && dl_tbf) - /* Move it to the current MS */ + /* Move it to the current MS (see the guard above) */ dl_tbf->set_ms(ms()); } |