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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22520 )
Change subject: IPA_Emulation: Support keeping server alive after first client disconnects
......................................................................
IPA_Emulation: Support keeping server alive after first client disconnects
Change-Id: I4c133a889df0a5a060b5c52a1ca40fa9b8695c2e
---
M library/IPA_Emulation.ttcnpp
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/22520/1
diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 60c6061..906664f 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -240,6 +240,9 @@
var IpaMode g_mode;
var boolean g_ccm_enabled;
var IpaInitBehavior g_init_behavior;
+ /* Shall we stop the component once the client disconnects, or keep
+ * running to let next user in ? */
+ var boolean g_server_stop_on_ipa_ev_down := true;
var IPA_CCM_Parameters g_ccm_pars := c_IPA_default_ccm_pars;
}
@@ -549,11 +552,13 @@
/* main function to use for a server-side IPA implementation */
function main_server(charstring local_host, IPL4asp_Types.PortNumber local_port,
boolean ccm_enabled := true,
- IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET)
+ IpaInitBehavior init_behavior := IPA_INIT_SEND_IPA_ID_GET,
+ boolean server_stop_on_ipa_ev_down := true)
runs on IPA_Emulation_CT {
g_mode := IPA_MODE_SERVER;
g_ccm_enabled := ccm_enabled;
g_init_behavior := init_behavior;
+ g_server_stop_on_ipa_ev_down := server_stop_on_ipa_ev_down;
f_bind(local_host, local_port);
ScanEvents();
}
@@ -761,7 +766,9 @@
log("IPA: Closed");
g_self_conn_id := -1;
f_send_IPA_EVT(ts_ASP_IPA_EV(ASP_IPA_EVENT_DOWN, asp_evt.connClosed.connId));
- self.stop;
+ if (g_mode != IPA_MODE_SERVER or g_server_stop_on_ipa_ev_down) {
+ self.stop;
+ }
}
[] IPA_PORT.receive(Socket_API_Definitions.PortEvent:{result:={errorCode:=ERROR_SOCKET, connId:=?, os_error_code:=?, os_error_text:=?}}) -> value port_evt {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22520
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: I4c133a889df0a5a060b5c52a1ca40fa9b8695c2e
Gerrit-Change-Number: 22520
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210128/02843c9f/attachment.htm>