summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-11-12 01:46:21 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-12-03 03:18:39 +0700
commitd4cc1508dd6fc2ce2ef701c87bc77740d1af0b69 (patch)
tree4f75e14ac0630f608ca0eb082eed0a97e53839d4
parent88e23234a3fc0c083e8b6d8afbc15cf1aac86960 (diff)
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
-rw-r--r--msc/BSC_ConnectionHandler.ttcn35
1 files changed, 29 insertions, 6 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index bf7a6d2..17d9591 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -806,17 +806,13 @@ private altstep as_other_sms() runs on BSC_ConnHdlr {
}
}
-/* 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 @@ runs on BSC_ConnHdlr {
/* 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,19 @@ runs on BSC_ConnHdlr {
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 a MO-SMS, and wait for RP-ACK on an 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 {