aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf/TbfTest.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-22 17:58:17 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:38 +0100
commit8eb17143f2b3ab5d96c46d698722de9dc83ac5f4 (patch)
tree7324884088fcd6dab85b32787e2f99c538f91ee8 /tests/tbf/TbfTest.cpp
parent81a04f7d79ab290028074cfa626498abfdb09937 (diff)
tbf: Add and use tbf->poll_ts
Currently tbf->control_ts is used to look up an incoming poll response. Since that may eventually change, poll timeouts could theoretically happen in that case. Store the real poll TS in tbf->poll_ts at all places where tbf->poll_fn is set. Do not use tbf->control_ts to look up outstanding polls. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/tbf/TbfTest.cpp')
-rw-r--r--tests/tbf/TbfTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index d2b4cfc9..0ff4f98c 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -605,6 +605,7 @@ static void send_control_ack(gprs_rlcmac_tbf *tbf)
RlcMacUplink_t ulreq = {0};
OSMO_ASSERT(tbf->poll_fn != 0);
+ OSMO_ASSERT(tbf->is_control_ts(tbf->poll_ts));
ulreq.u.MESSAGE_TYPE = MT_PACKET_CONTROL_ACK;
Packet_Control_Acknowledgement_t *ctrl_ack =
@@ -612,7 +613,7 @@ static void send_control_ack(gprs_rlcmac_tbf *tbf)
ctrl_ack->PayloadType = GPRS_RLCMAC_CONTROL_BLOCK;
ctrl_ack->TLLI = tbf->tlli();
- send_ul_mac_block(tbf->bts, tbf->trx->trx_no, tbf->control_ts,
+ send_ul_mac_block(tbf->bts, tbf->trx->trx_no, tbf->poll_ts,
&ulreq, tbf->poll_fn);
}
@@ -1043,7 +1044,7 @@ static void test_tbf_dl_reuse()
ack->DOWNLINK_TFI = dl_tbf1->tfi();
ack->Ack_Nack_Description.FINAL_ACK_INDICATION = 1;
- send_ul_mac_block(&the_bts, 0, ts_no, &ulreq, dl_tbf1->poll_fn);
+ send_ul_mac_block(&the_bts, 0, dl_tbf1->poll_ts, &ulreq, dl_tbf1->poll_fn);
OSMO_ASSERT(dl_tbf1->state_is(GPRS_RLCMAC_WAIT_RELEASE));