summaryrefslogtreecommitdiffstats
path: root/bts/BTS_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-26 17:37:47 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-27 22:32:54 +0100
commitc3a3f4526822b0b2304a058e6a7e49e5bd741ff4 (patch)
tree1fc14dc0a279d677b9fafe727261c031cf5b5363 /bts/BTS_Tests.ttcn
parent54a2a2dcd205b7a3a04dad18aa25702ee992fff4 (diff)
Add new f_timer_safe_restart() function for warning-safe restart
TITAN will print warnings if a still-running timer is res-started. It will also warn if a not-started timer is stopped, so we need a conditional stop + start if we want to avoid any warnings in a convenient way. Change-Id: Iee83b4905cce3a84eb007ffd189b55f4b54f7cb6
Diffstat (limited to 'bts/BTS_Tests.ttcn')
-rw-r--r--bts/BTS_Tests.ttcn5
1 files changed, 2 insertions, 3 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 9cb0f72..8800139 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -544,8 +544,7 @@ testcase TC_rach_count() runs on test_CT {
alt {
[] RSL_CCHAN.receive(tr_RSL_UD(tr_RSL_CHAN_RQD(?,?))) {
rsl_chrqd := rsl_chrqd + 1;
- T.stop;
- T.start;
+ f_timer_safe_restart(T);
repeat;
}
[] RSL_CCHAN.receive { repeat; }
@@ -732,7 +731,7 @@ altstep as_meas_res() runs on ConnHdlr {
/* increment counter of next to-be-expected meas rep */
g_next_meas_res_nr := (g_next_meas_res_nr + 1) mod 256;
/* Re-start the timer expecting the next MEAS RES */
- g_Tmeas_exp.start;
+ f_timer_safe_restart(g_Tmeas_exp);
repeat;
}
[] RSL.receive(tr_RSL_MEAS_RES(g_chan_nr, g_next_meas_res_nr)) -> value rsl {