diff options
-rw-r--r-- | src/tbf_dl.cpp | 13 | ||||
-rw-r--r-- | tests/tbf/TbfTest.err | 20 |
2 files changed, 18 insertions, 15 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 1827469b..a55f179e 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -181,7 +181,7 @@ static int tbf_new_dl_assignment(struct gprs_rlcmac_bts *bts, */ int gprs_rlcmac_dl_tbf::handle(struct gprs_rlcmac_bts *bts, const uint32_t tlli, const uint32_t tlli_old, const char *imsi, - const uint8_t ms_class, uint8_t egprs_ms_class, + uint8_t ms_class, uint8_t egprs_ms_class, const uint16_t delay_csec, const uint8_t *data, const uint16_t len) { @@ -191,12 +191,15 @@ int gprs_rlcmac_dl_tbf::handle(struct gprs_rlcmac_bts *bts, /* check for existing TBF */ ms = bts->bts->ms_store().get_ms(tlli, tlli_old, imsi); - if (ms) + if (ms) { dl_tbf = ms->dl_tbf(); - /* Work-around to get EGPRS MS class */ - if (ms && !egprs_ms_class) - egprs_ms_class = ms->egprs_ms_class(); + /* If we known the GPRS/EGPRS MS class, use it */ + if (ms->ms_class() || ms->egprs_ms_class()) { + ms_class = ms->ms_class(); + egprs_ms_class = ms->egprs_ms_class(); + } + } if (ms && strlen(ms->imsi()) == 0) { ms_old = bts->bts->ms_store().get_ms(0, 0, imsi); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index a93d959b..36410149 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1532,8 +1532,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 0 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)', TA=7 Got MS: TLLI = 0xf1223344, TA = 7 ********** TBF starts here ********** -Allocating DL TBF: MS_CLASS=0/0 -Slot Allocation (Algorithm A) for class 0 +Allocating DL TBF: MS_CLASS=1/0 +Slot Allocation (Algorithm A) for class 1 - Skipping TS 0, because not enabled - Skipping TS 1, because not enabled - Skipping TS 2, because not enabled @@ -1614,8 +1614,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 0 - No gaps in received block, last block: BSN=0 CV=15 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)', TA=7 ********** TBF starts here ********** -Allocating DL TBF: MS_CLASS=0/0 -Slot Allocation (Algorithm A) for class 0 +Allocating DL TBF: MS_CLASS=1/0 +Slot Allocation (Algorithm A) for class 1 - Skipping TS 0, because not enabled - Skipping TS 1, because not enabled - Skipping TS 2, because not enabled @@ -1814,8 +1814,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 0 - No gaps in received block, last block: BSN=0 CV=15 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)', TA=7 ********** TBF starts here ********** -Allocating DL TBF: MS_CLASS=0/0 -Slot Allocation (Algorithm A) for class 0 +Allocating DL TBF: MS_CLASS=1/0 +Slot Allocation (Algorithm A) for class 1 - Skipping TS 0, because not enabled - Skipping TS 1, because not enabled - Skipping TS 2, because not enabled @@ -1983,8 +1983,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 0 - No gaps in received block, last block: BSN=0 CV=15 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)', TA=7 ********** TBF starts here ********** -Allocating DL TBF: MS_CLASS=0/0 -Slot Allocation (Algorithm A) for class 0 +Allocating DL TBF: MS_CLASS=1/0 +Slot Allocation (Algorithm A) for class 1 - Skipping TS 0, because not enabled - Skipping TS 1, because not enabled - Skipping TS 2, because not enabled @@ -2129,8 +2129,8 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): data_length=20, data=00 00 00 00 0 - No gaps in received block, last block: BSN=0 CV=15 Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW)', TA=7 ********** TBF starts here ********** -Allocating DL TBF: MS_CLASS=0/0 -Slot Allocation (Algorithm A) for class 0 +Allocating DL TBF: MS_CLASS=1/0 +Slot Allocation (Algorithm A) for class 1 - Skipping TS 0, because not enabled - Skipping TS 1, because not enabled - Skipping TS 2, because not enabled |