Change in osmo-ttcn3-hacks[master]: SCCP_Templates: Allow templates as Called/CallingPartyAddress in UDT

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
Thu May 13 19:58:43 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24231 )


Change subject: SCCP_Templates: Allow templates as Called/CallingPartyAddress in UDT
......................................................................

SCCP_Templates: Allow templates as Called/CallingPartyAddress in UDT

Change-Id: I8d9f782ed3f4e6363f5370deb73bd2694b4c5d6a
---
M library/SCCP_Templates.ttcn
1 file changed, 12 insertions(+), 3 deletions(-)



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

diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index 9936dd0..55bf745 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -113,6 +113,15 @@
 	}
 }
 
+private function tr_Addr(template SCCP_PAR_Address addr := *)
+return template (present) SCCP_param_CPartyAddressEnc {
+	if (istemplatekind(addr, "?")) {
+		return ?;
+	} else {
+		return ConvertASPAddressToEncodedAddress_itu(valueof(addr));
+	}
+}
+
 template (value) PDU_SCCP ts_SCCP_UDT(SCCP_PAR_Address calling, SCCP_PAR_Address called,
 				      template (value) octetstring data,
 				      template (value) BIT4 msg_hdl := '0000'B) := {
@@ -131,7 +140,7 @@
 	}
 }
 
-template PDU_SCCP tr_SCCP_UDT(SCCP_PAR_Address calling, SCCP_PAR_Address called,
+template PDU_SCCP tr_SCCP_UDT(template (present) SCCP_PAR_Address calling, template (present) SCCP_PAR_Address called,
 			      template octetstring data := ?,
 			      template BIT4 msg_hdl := '0000'B) := {
 	unitdata := {
@@ -140,8 +149,8 @@
 		pointer1 := ?,
 		pointer2 := ?,
 		pointer3 := ?,
-		calledPAddress := ConvertASPAddressToEncodedAddress_itu(called),
-		callingPAddress := ConvertASPAddressToEncodedAddress_itu(calling),
+		calledPAddress := tr_Addr(called),
+		callingPAddress := tr_Addr(calling),
 		data := {
 			paramLength := ?,
 			data := data

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24231
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: I8d9f782ed3f4e6363f5370deb73bd2694b4c5d6a
Gerrit-Change-Number: 24231
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210513/fe3bc7c6/attachment.htm>


More information about the gerrit-log mailing list