Change in osmo-ttcn3-hacks[master]: BSC_ConnectionHandler.ttcn: split up f_mo_sms() into two functions

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.org
Sun Nov 11 19:54:36 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11717


Change subject: BSC_ConnectionHandler.ttcn: split up f_mo_sms() into two functions
......................................................................

BSC_ConnectionHandler.ttcn: split up f_mo_sms() into two functions

This would allow to submit an SMS message using f_mo_sms_submit()
and wait for RP-ACK using f_mo_sms_wait_rp_ack() separately in the
follow-up changes for SMS over GSUP.

Change-Id: I5b35206286ae8add8b5bd34b0ab41ba7862c28e4
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 28 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/11717/1

diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index bf7a6d2..96f522c 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -806,17 +806,13 @@
 	}
 }
 
-/* Submit a MO-SMS over an already existing (and authenticated, ...) DTAP connection */
-function f_mo_sms(inout SmsParameters spars)
+/* Submit a MO-SMS over an already existing DTAP connection */
+function f_mo_sms_submit(inout SmsParameters spars)
 runs on BSC_ConnHdlr {
 	var template (value) TPDU_RP_DATA_MS_SGSN tp_mo;
 	var template (value) RPDU_MS_SGSN rp_mo;
 	var template (value) PDU_ML3_MS_NW l3_mo;
 
-	var template TPDU_RP_DATA_SGSN_MS tp_mt;
-	var template RPDU_SGSN_MS rp_mt;
-	var template PDU_ML3_NW_MS l3_mt;
-
 	var default d := activate(as_other_sms());
 
 	/* just in case this is routed to SMPP.. */
@@ -830,6 +826,24 @@
 	/* receive CP-ACK for CP-DATA above */
 	BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_SMS(spars.tid, c_TIF_REPL, tr_CP_ACK_MT), spars.dlci));
 
+	deactivate(d);
+	setverdict(pass);
+}
+
+/* Wait RP-ACK for MO-SMS on an already existing DTAP connection */
+function f_mo_sms_wait_rp_ack(inout SmsParameters spars)
+runs on BSC_ConnHdlr {
+	var template (value) PDU_ML3_MS_NW l3_mo;
+
+	var template TPDU_RP_DATA_SGSN_MS tp_mt;
+	var template RPDU_SGSN_MS rp_mt;
+	var template PDU_ML3_NW_MS l3_mt;
+
+	var default d := activate(as_other_sms());
+
+	/* just in case this is routed to SMPP.. */
+	f_create_smpp_expect(hex2str(spars.tp.da.tP_DA_NoPad.tP_DAValue));
+
 	if (ispresent(spars.exp_rp_err)) {
 		/* expect an RP-ERROR message from MSC with given cause */
 		rp_mt := tr_RP_ERROR_MT(spars.rp.msg_ref, spars.exp_rp_err);
@@ -847,10 +861,18 @@
 		l3_mo := ts_ML3_MO_SMS(spars.tid, c_TIF_ORIG, ts_CP_ACK_MO);
 		BSSAP.send(ts_PDU_DTAP_MO(l3_mo, spars.dlci, true));
 	}
+
 	deactivate(d);
 	setverdict(pass);
 }
 
+/* Submit and wait a MO-SMS over an already existing (and authenticated, ...) DTAP connection */
+function f_mo_sms(inout SmsParameters spars)
+runs on BSC_ConnHdlr {
+	f_mo_sms_submit(spars);
+	f_mo_sms_wait_rp_ack(spars);
+}
+
 /* receive MT-SMS delivered from the MSC/SMSC over an already existing DTAP connection */
 function f_mt_sms(inout SmsParameters spars)
 runs on BSC_ConnHdlr {

-- 
To view, visit https://gerrit.osmocom.org/11717
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: I5b35206286ae8add8b5bd34b0ab41ba7862c28e4
Gerrit-Change-Number: 11717
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/20181111/abc58442/attachment.htm>


More information about the gerrit-log mailing list