neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34416?usp=email )
Change subject: sip: pass CallPars into f_TC_*() ...................................................................... sip: pass CallPars into f_TC_*() Move composition of CallPars out of all f_* functions into their TC_* functions, so that future tests can reuse the f_* functions with different CallPars. An upcoming patch wants to call f_TC_mo_success_rel_sip() with different CallPars. Change-Id: Icdcaa7a8a0fadcd6f5715ad052e286b904ded570 --- M sip/SIP_Tests.ttcn 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/34416/1 diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 3ee244e..fe6600b 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -412,7 +412,7 @@ /* Successful MT Call, which is subsequently released by SIP side */ private function f_TC_mt_success_rel_sip(charstring id) runs on ConnHdlr { - var CallPars cp := valueof(t_CallPars(false)); + var CallPars cp := g_pars.g_cp; f_CallPars_compute(cp); cp.comp.sip_body := "v=0\r\no=Osmocom 0 0 IN IP4 1.1.1.1\r\ns=GSM Call\r\nc=IN " & f_mgcp_addr2addrtype(cp.sip_rtp_addr) & " " & cp.sip_rtp_addr & @@ -431,6 +431,7 @@ var ConnHdlr vc_conn; f_init(); pars := valueof(t_Pars); + pars.g_cp := valueof(t_CallPars(false)); vc_conn := f_start_handler(refers(f_TC_mt_success_rel_sip), pars); vc_conn.done; } @@ -475,7 +476,7 @@ /* Successful MO Call, which is subsequently released by SIP side */ private function f_TC_mo_success_rel_sip(charstring id) runs on ConnHdlr { - var CallPars cp := valueof(t_CallPars(true)); + var CallPars cp := g_pars.g_cp; f_CallPars_compute(cp); cp.comp.sip_body := "v=0\r\no=Osmocom 0 0 IN IP4 1.1.1.1\r\ns=GSM Call\r\nc=IN " & f_mgcp_addr2addrtype(cp.sip_rtp_addr) & " " & cp.sip_rtp_addr & @@ -494,13 +495,14 @@ var ConnHdlr vc_conn; f_init(); pars := valueof(t_Pars); + pars.g_cp := valueof(t_CallPars(is_mo := true)); vc_conn := f_start_handler(refers(f_TC_mo_success_rel_sip), pars); vc_conn.done; } /* SETUP followed by DISC results in lingering B-leg (OS#3518)*/ private function f_TC_mo_setup_disc_late_rtp(charstring id) runs on ConnHdlr { - var CallPars cp := valueof(t_CallPars(true)); + var CallPars cp := g_pars.g_cp; f_CallPars_compute(cp); cp.comp.sip_body := "v=0\r\no=Osmocom 0 0 IN IP4 1.1.1.1\r\ns=GSM Call\r\nc=IN " & f_mgcp_addr2addrtype(cp.sip_rtp_addr) & " " & cp.sip_rtp_addr & @@ -548,6 +550,7 @@ var ConnHdlr vc_conn; f_init(); pars := valueof(t_Pars); + pars.g_cp := valueof(t_CallPars(is_mo := true)); vc_conn := f_start_handler(refers(f_TC_mo_setup_disc_late_rtp), pars); vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34416?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Icdcaa7a8a0fadcd6f5715ad052e286b904ded570 Gerrit-Change-Number: 34416 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofm...@sysmocom.de> Gerrit-MessageType: newchange