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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11578
Change subject: hlr/HLR_EUSE.ttcn: remove redundant code from f_main_mo()
......................................................................
hlr/HLR_EUSE.ttcn: remove redundant code from f_main_mo()
There is no need to pass session state from f_main_mo() to a
choosen EUSE handler (e.g. f_ss_echo), because a handler
itself is capable to extract the session state IE.
Change-Id: I1054baf3e7dafd05b797610b586e6202740f07b6
---
M hlr/HLR_EUSE.ttcn
1 file changed, 9 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/78/11578/1
diff --git a/hlr/HLR_EUSE.ttcn b/hlr/HLR_EUSE.ttcn
index 1e7574b..93eb8f4 100644
--- a/hlr/HLR_EUSE.ttcn
+++ b/hlr/HLR_EUSE.ttcn
@@ -50,14 +50,17 @@
}
}
-type function f_euse_cb(GSUP_SessionState ss_state, GSUP_PDU rx_pdu) return GSUP_PDU;
+type function f_euse_cb(GSUP_PDU rx_pdu) return GSUP_PDU;
-function f_ss_echo_continue(GSUP_SessionState ss_state, GSUP_PDU rx_pdu) return GSUP_PDU {
+function f_ss_echo_continue(GSUP_PDU rx_pdu) return GSUP_PDU {
var GSUP_SessionState ss_next_state;
- var GSUP_IeValue ss_ie;
+ var GSUP_IeValue ss_ie, state_ie;
var SS_FacilityInformation dec_fac, rsp_fac;
var octetstring ss_rsp;
+ f_gsup_find_ie(rx_pdu, OSMO_GSUP_SS_INFO_IE, state_ie);
+ var GSUP_SessionState ss_state := state_ie.session_state;
+
f_gsup_find_ie(rx_pdu, OSMO_GSUP_SS_INFO_IE, ss_ie);
dec_fac := dec_SS_FacilityInformation(ss_ie.ss_info);
log("dec_fac: ", dec_fac);
@@ -74,7 +77,7 @@
ss_next_state, ss_rsp));
}
-function f_ss_echo(GSUP_SessionState ss_state, GSUP_PDU rx_pdu) return GSUP_PDU {
+function f_ss_echo(GSUP_PDU rx_pdu) return GSUP_PDU {
var GSUP_IeValue ss_ie;
var SS_FacilityInformation dec_fac, rsp_fac;
var octetstring ss_rsp;
@@ -100,15 +103,8 @@
while (true) {
alt {
- [] EUSE.receive(tr_GSUP_PROC_SS_REQ(?, ?, OSMO_GSUP_SESSION_STATE_BEGIN)) -> value rx_pdu {
- EUSE.send(cb_fn.apply(OSMO_GSUP_SESSION_STATE_BEGIN, rx_pdu));
- }
- [] EUSE.receive(tr_GSUP_PROC_SS_REQ(?, ?, OSMO_GSUP_SESSION_STATE_CONTINUE)) -> value rx_pdu {
- EUSE.send(cb_fn.apply(OSMO_GSUP_SESSION_STATE_CONTINUE, rx_pdu));
- }
-
- [] EUSE.receive(tr_GSUP_PROC_SS_REQ(?, ?, OSMO_GSUP_SESSION_STATE_END)) -> value rx_pdu {
- EUSE.send(cb_fn.apply(OSMO_GSUP_SESSION_STATE_END, rx_pdu));
+ [] EUSE.receive(tr_GSUP_PROC_SS_REQ(?, ?, ?)) -> value rx_pdu {
+ EUSE.send(cb_fn.apply(rx_pdu));
}
--
To view, visit https://gerrit.osmocom.org/11578
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1054baf3e7dafd05b797610b586e6202740f07b6
Gerrit-Change-Number: 11578
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181104/f0f91aea/attachment.htm>