tbf: Drop unneeded method set_tlli_from_ul
Since commit 322456ed47
(and previous
one), it is expected that a tbf object ALWAYS has a MS object referend
to it, even if it's a temporary copy which will later be merged when
TLLI/IMSI is retrieved and it is found that several MS objects relate to
the same MS.
The purpose of set_tlli_from_ul was mainly to update TBF's ms() to
old_ms before going through usual tbf->update_ms() path. That's not
really needed since ms() is already always set and TBFs for old_ms are
already freed in update_ms() and children function.
Change-Id: Ie8795e7a02032336e53febb65c11f9150c36d2a0
This commit is contained in:
parent
cbf05f5146
commit
d21e961a8b
46
src/tbf.cpp
46
src/tbf.cpp
|
@ -392,9 +392,6 @@ void gprs_rlcmac_tbf::merge_and_clear_ms(GprsMs *old_ms)
|
|||
|
||||
void gprs_rlcmac_tbf::update_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir)
|
||||
{
|
||||
if (!ms())
|
||||
return;
|
||||
|
||||
if (!tlli)
|
||||
return;
|
||||
|
||||
|
@ -1439,49 +1436,6 @@ int gprs_rlcmac_tbf::establish_dl_tbf_on_pacch()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int gprs_rlcmac_tbf::set_tlli_from_ul(uint32_t new_tlli)
|
||||
{
|
||||
struct gprs_rlcmac_tbf *dl_tbf = NULL;
|
||||
struct gprs_rlcmac_tbf *ul_tbf = NULL;
|
||||
GprsMs *old_ms;
|
||||
|
||||
OSMO_ASSERT(direction == GPRS_RLCMAC_UL_TBF);
|
||||
|
||||
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();
|
||||
ul_tbf = old_ms->ul_tbf();
|
||||
|
||||
if (!ms())
|
||||
set_ms(old_ms);
|
||||
}
|
||||
|
||||
if (dl_tbf && dl_tbf->ms() != ms()) {
|
||||
LOGPTBFUL(dl_tbf, LOGL_NOTICE,
|
||||
"Got RACH from TLLI=0x%08x while TBF still exists: killing pending DL TBF\n", new_tlli);
|
||||
tbf_free(dl_tbf);
|
||||
dl_tbf = NULL;
|
||||
}
|
||||
if (ul_tbf && ul_tbf->ms() != ms()) {
|
||||
LOGPTBFUL(ul_tbf, LOGL_NOTICE,
|
||||
"Got RACH from TLLI=0x%08x while TBF still exists: killing pending UL TBF\n", new_tlli);
|
||||
tbf_free(ul_tbf);
|
||||
ul_tbf = NULL;
|
||||
}
|
||||
|
||||
/* The TLLI has been taken from an UL message */
|
||||
update_ms(new_tlli, GPRS_RLCMAC_UL_TBF);
|
||||
|
||||
#if 0 /* REMOVEME ??? */
|
||||
if (ms()->need_dl_tbf())
|
||||
establish_dl_tbf_on_pacch();
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *tbf_name(gprs_rlcmac_tbf *tbf)
|
||||
{
|
||||
return tbf ? tbf->name() : "(no TBF)";
|
||||
|
|
|
@ -319,7 +319,6 @@ struct gprs_rlcmac_tbf {
|
|||
protected:
|
||||
gprs_rlcmac_bts *bts_data() const;
|
||||
void enable_egprs();
|
||||
int set_tlli_from_ul(uint32_t new_tlli);
|
||||
void merge_and_clear_ms(GprsMs *old_ms);
|
||||
|
||||
gprs_llc_queue *llc_queue();
|
||||
|
|
|
@ -151,8 +151,6 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts,
|
|||
ul_tbf = ms->ul_tbf();
|
||||
ta = ms->ta();
|
||||
|
||||
/* TODO: if (!ms) create MS before tbf_alloc is called? */
|
||||
|
||||
if (ul_tbf && ul_tbf->m_contention_resolution_done
|
||||
&& !ul_tbf->m_final_ack_sent) {
|
||||
use_trx = ul_tbf->trx->trx_no;
|
||||
|
|
|
@ -305,7 +305,7 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
|
|||
LOGPTBFUL(this, LOGL_INFO,
|
||||
"Decoded premier TLLI=0x%08x of UL DATA TFI=%d.\n",
|
||||
new_tlli, rlc->tfi);
|
||||
set_tlli_from_ul(new_tlli);
|
||||
update_ms(new_tlli, GPRS_RLCMAC_UL_TBF);
|
||||
} else if (new_tlli && new_tlli != tlli()) {
|
||||
LOGPTBFUL(this, LOGL_NOTICE,
|
||||
"TLLI mismatch on UL DATA TFI=%d. (Ignoring due to contention resolution)\n",
|
||||
|
|
|
@ -2079,7 +2079,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Got CS-1 RLC data block: CV=0, BSN=
|
|||
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) BSN 0 storing in window (0..63)
|
||||
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) Decoded premier TLLI=0xf1223344 of UL DATA TFI=0.
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) Got RACH from TLLI=0xf1223344 while TBF still exists: killing pending DL TBF
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) free
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) stopping timer T0 [freeing TBF]
|
||||
|
@ -2089,8 +2088,8 @@ Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344
|
|||
Modifying MS object, TLLI = 0x00000000, IMSI '' -> '0011223344'
|
||||
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
|
||||
Clearing MS object, TLLI: 0xf1223344, IMSI: '0011223344'
|
||||
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
|
||||
Destroying MS object, TLLI = 0x00000000
|
||||
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Assembling frames: (len=20)
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Frame 1 starts at offset 4, length=16, is_complete=1
|
||||
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16
|
||||
|
|
Loading…
Reference in New Issue