summaryrefslogtreecommitdiffstats
path: root/library/IuUP_Emulation.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/IuUP_Emulation.ttcn')
-rw-r--r--library/IuUP_Emulation.ttcn5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn
index 77cd739..752b897 100644
--- a/library/IuUP_Emulation.ttcn
+++ b/library/IuUP_Emulation.ttcn
@@ -80,6 +80,7 @@ function f_IuUP_Em_rx_decaps(inout IuUP_Entity st, octetstring inp) return octet
return pdu.type_0.payload;
} else {
setverdict(fail, "PDU Type 0 received but 1 configured");
+ mtc.stop;
}
} else if (ischosen(pdu.type_1)) {
if (st.cfg.data_pdu_type_0 == false) {
@@ -88,11 +89,13 @@ function f_IuUP_Em_rx_decaps(inout IuUP_Entity st, octetstring inp) return octet
return pdu.type_1.payload;
} else {
setverdict(fail, "PDU Type 1 received but 0 configured");
+ mtc.stop;
}
} else if (ischosen(pdu.type_14)) {
if (match(pdu, tr_IuUP_INIT)) {
if (st.cfg.active_init == true) {
setverdict(fail, "INIT received in ACTIVE role");
+ mtc.stop;
} else {
/* store an INIT_ACK to be transmitted later */
st.pending_tx_pdu := valueof(ts_IuUP_INIT_ACK(pdu.type_14.frame_nr,
@@ -104,11 +107,13 @@ function f_IuUP_Em_rx_decaps(inout IuUP_Entity st, octetstring inp) return octet
st.state := ST_DATA_TRANSFER_READY;
} else {
setverdict(fail, "INIT_ACK received in PASSIVE role");
+ mtc.stop;
}
}
return ''O;
} else {
setverdict(fail, "Impossible IuUP PDU decoded from ", inp);
+ mtc.stop;
}
self.stop;
}