This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25066 ) Change subject: MGCP_Emulation: allow moving ep handling to another test component ...................................................................... MGCP_Emulation: allow moving ep handling to another test component Will be used by MSC_Tests.TC_call_re_establishment in Ifdff5573eeb3b3d41e8599b9b0228411d2576864, where a call from one vc_conn gets re-established in another vc_conn. Related: SYS#5130 Change-Id: Id46035e53c2870e1fdef1335dce42b2020f7cd54 --- M library/MGCP_Emulation.ttcn 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/25066/1 diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn index 8ccc085..777aff4 100644 --- a/library/MGCP_Emulation.ttcn +++ b/library/MGCP_Emulation.ttcn @@ -193,6 +193,19 @@ mtc.stop; } +private function f_ep_table_steal(MGCP_ConnHdlr comp_ref, MgcpEndpoint ep) +runs on MGCP_Emulation_CT { + var integer i; + for (i := 0; i < sizeof(MgcpEndpointTable); i := i+1) { + if (MgcpEndpointTable[i].endpoint == ep) { + MgcpEndpointTable[i].comp_ref := comp_ref; + log("MGCP_Emulation_CT: MgcpEndpointTable[", i, "] now sends to ", comp_ref); + return; + } + } + setverdict(fail, "MGCP Endpoint Table: Couldn't find entry to steal"); + mtc.stop; +} /* Check if the given transaction ID is a pending CRCX. If yes, return true + remove */ private function f_trans_id_was_pending(MgcpTransId trans_id) @@ -349,6 +362,10 @@ f_ep_table_del(vc_conn, ep); MGCP_PROC.reply(MGCPEM_delete_ep:{ep, vc_conn}) to vc_conn; } + [] MGCP_PROC.getcall(MGCPEM_steal_ep:{?,?}) -> param(ep, vc_conn) { + f_ep_table_steal(vc_conn, ep); + MGCP_PROC.reply(MGCPEM_steal_ep:{ep, vc_conn}) to vc_conn; + } } } @@ -370,9 +387,10 @@ signature MGCPEM_register(in ExpectCriteria cmd, in MGCP_ConnHdlr hdlr); signature MGCPEM_delete_ep(in MgcpEndpoint ep, in MGCP_ConnHdlr hdlr); +signature MGCPEM_steal_ep(in MgcpEndpoint ep, in MGCP_ConnHdlr hdlr); type port MGCPEM_PROC_PT procedure { - inout MGCPEM_register, MGCPEM_delete_ep; + inout MGCPEM_register, MGCPEM_delete_ep, MGCPEM_steal_ep; } with { extension "internal" }; function f_get_mgcp_by_crit(ExpectCriteria crit) @@ -462,6 +480,13 @@ } } +/* Move MGCP handling for a given MGW endpoint to a different MGCP_ConnHdlr component. */ +function f_create_mgcp_steal_ep(MgcpEndpoint ep) runs on MGCP_ConnHdlr { + MGCP_PROC.call(MGCPEM_steal_ep:{ep, self}) { + [] MGCP_PROC.getreply(MGCPEM_steal_ep:{?,?}) {}; + } +} + private function f_expect_table_init() runs on MGCP_Emulation_CT { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25066 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: Id46035e53c2870e1fdef1335dce42b2020f7cd54 Gerrit-Change-Number: 25066 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/2f58d522/attachment.htm>