GSUP_Emulation: allow moving HLR handling to another test component

Will be used by MSC_Tests.TC_call_re_establishment_auth in
I8110a6b432de734d53b111c7b69aabca12129691
where a call from one vc_conn gets re-established in another vc_conn.

Related: SYS#5130
Change-Id: I235492185cda68f9f8e845085e3f6efe76a13501
diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn
index 51c158a..0905806 100644
--- a/library/GSUP_Emulation.ttcn
+++ b/library/GSUP_Emulation.ttcn
@@ -222,6 +222,12 @@
 			GSUP_PROC.reply(GSUPEM_register:{imsi, vc_hdlr}) to vc_hdlr;
 			}
 
+		[] GSUP_PROC.getcall(GSUPEM_change_connhdlr:{?,?}) -> param(imsi, vc_hdlr) {
+			f_imsi_table_del(imsi);
+			f_imsi_table_add(vc_hdlr, imsi);
+			GSUP_PROC.reply(GSUPEM_change_connhdlr:{imsi, vc_hdlr}) to vc_hdlr;
+			}
+
 		}
 	}
 }
@@ -240,9 +246,10 @@
 
 /* procedure based port to register for incoming calls */
 signature GSUPEM_register(in charstring imsi, in GSUP_ConnHdlr hdlr);
+signature GSUPEM_change_connhdlr(in charstring imsi, in GSUP_ConnHdlr hdlr);
 
 type port GSUPEM_PROC_PT procedure {
-	inout GSUPEM_register;
+	inout GSUPEM_register, GSUPEM_change_connhdlr;
 } with { extension "internal" };
 
 /* CreateCallback that can be used as create_cb and will use the expectation table */
@@ -302,4 +309,10 @@
 	}
 }
 
+function f_gsup_change_connhdlr(charstring imsi) runs on GSUP_ConnHdlr {
+	GSUP_PROC.call(GSUPEM_change_connhdlr:{imsi, self}) {
+		[] GSUP_PROC.getreply(GSUPEM_change_connhdlr:{?,?}) {};
+	}
+}
+
 }