Change in osmo-ttcn3-hacks[master]: BSC_ConnectionHandler.ttcn: introduce f_mt_sms_send_rp_error()

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
Tue Dec 4 21:41:05 UTC 2018


Vadim Yanitskiy has submitted this change and it was merged. ( https://gerrit.osmocom.org/11923 )

Change subject: BSC_ConnectionHandler.ttcn: introduce f_mt_sms_send_rp_error()
......................................................................

BSC_ConnectionHandler.ttcn: introduce f_mt_sms_send_rp_error()

Change-Id: I3d67a451335e1c1e1b18237fdda82260c0c969fb
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index e66a3e6..f005e02 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -925,6 +925,28 @@
 	setverdict(pass);
 }
 
+/* Send RP-ERROR for MT-SMS over an already existing DTAP connection */
+function f_mt_sms_send_rp_error(inout SmsParameters spars, uint7_t cause)
+runs on BSC_ConnHdlr {
+	var template (value) RPDU_MS_SGSN rp_mo;
+	var template (value) PDU_ML3_MS_NW l3_mo;
+	var template PDU_ML3_NW_MS l3_mt;
+
+	var default d := activate(as_other_sms());
+
+	/* send RP-ACK for RP-DATA */
+	rp_mo := ts_RP_ERROR_MO(spars.rp.msg_ref, cause);
+	l3_mo := ts_ML3_MO_SMS(spars.tid, c_TIF_REPL, ts_CP_DATA_MO(rp_mo));
+	BSSAP.send(ts_PDU_DTAP_MO(l3_mo, spars.dlci, true));
+
+	/* expect CP-ACK for CP-DATA(RP-ERROR) just sent */
+	l3_mt := tr_ML3_MT_SMS(spars.tid, c_TIF_ORIG, tr_CP_ACK_MT);
+	BSSAP.receive(tr_PDU_DTAP_MT(l3_mt, spars.dlci));
+
+	deactivate(d);
+	setverdict(pass);
+}
+
 /* Wait for a MT-SMS and send RP-ACK over an already existing
  * (and authenticated, ...) DTAP connection */
 function f_mt_sms(inout SmsParameters spars)

-- 
To view, visit https://gerrit.osmocom.org/11923
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3d67a451335e1c1e1b18237fdda82260c0c969fb
Gerrit-Change-Number: 11923
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181204/78a21d3c/attachment.htm>


More information about the gerrit-log mailing list