Change in osmo-ttcn3-hacks[master]: NS_Emulation: factor-out as_ns_common_status() altstep

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Feb 13 15:52:44 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22898 )

Change subject: NS_Emulation: factor-out as_ns_common_status() altstep
......................................................................

NS_Emulation: factor-out as_ns_common_status() altstep

This is a new altstep which groups all handling of NsStatusInd.
Right now it's only used from one place, but upcoming patches
will re-use it elsewhere.

Change-Id: I4e8e7d19c764cc977beb84a6859c9ce73518b653
---
M library/NS_Emulation.ttcnpp
1 file changed, 10 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 24c9941..1b9b1df 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -352,13 +352,8 @@
 		return res;
 	}
 
-	private altstep as_ns_common() runs on NS_CT {
+	private altstep as_ns_common_status() runs on NS_CT {
 		var NsStatusIndication rx_nssi;
-		var NsUnitdataIndication rx_nsudi;
-		var NsUnitdataRequest rx_nsudr;
-		var NsDisableVcRequest rx_disar;
-		var NsEnableVcRequest rx_enar;
-		/* pass from NS-VCs up to user */
 		[] NSVC.receive(tr_NsStsInd(g_config.nsei, ?, ?, NSVC_S_ALIVE_UNBLOCKED)) -> value rx_nssi {
 			/* check if this one is the first to be unblocked */
 			var integer num_nsvc_unblocked := f_count_nsvcs_in_state(NSVC_S_ALIVE_UNBLOCKED);
@@ -385,6 +380,15 @@
 			Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
 					log2str("Received NsStatusInd for invalid NSEI: ", rx_nssi));
 			}
+	}
+
+	private altstep as_ns_common() runs on NS_CT {
+		var NsUnitdataIndication rx_nsudi;
+		var NsUnitdataRequest rx_nsudr;
+		var NsDisableVcRequest rx_disar;
+		var NsEnableVcRequest rx_enar;
+		/* pass from NS-VCs up to user */
+		[] as_ns_common_status();
 		[] NSVC.receive(tr_NsUdInd(g_config.nsei, ?, ?)) -> value rx_nsudi {
 			NS_SP.send(rx_nsudi);
 			}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22898
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I4e8e7d19c764cc977beb84a6859c9ce73518b653
Gerrit-Change-Number: 22898
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210213/eee36872/attachment.htm>


More information about the gerrit-log mailing list