From c3a3f4526822b0b2304a058e6a7e49e5bd741ff4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 26 Feb 2018 17:37:47 +0100 Subject: 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 --- bts/BTS_Tests.ttcn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bts/BTS_Tests.ttcn') diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 9cb0f721..88001392 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 { -- cgit v1.2.3