Change in osmo-ttcn3-hacks[master]: bts: move f_pad_oct() to Osmocom_Types as it's generally useful

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 30 13:45:08 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14277


Change subject: bts: move f_pad_oct() to Osmocom_Types as it's generally useful
......................................................................

bts: move f_pad_oct() to Osmocom_Types as it's generally useful

Change-Id: I4df99e5612c67006eb2998529425956fb4a664af
---
M bts/BTS_Tests.ttcn
M library/Osmocom_Types.ttcn
2 files changed, 8 insertions(+), 8 deletions(-)



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

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0506e64..5481838 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3676,14 +3676,6 @@
 	setverdict(pass);
 }
 
-private function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring {
-	var integer strlen := lengthof(str);
-	for (var integer i := 0; i < len-strlen; i := i+1) {
-		str := str & pad;
-	}
-	return str;
-}
-
 /* Send PAGING via RSL, expect it to shw up on PCU socket */
 testcase TC_pcu_paging_from_rsl() runs on test_CT {
 	f_init_pcu_test();
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index ffd5df5..046a9ea 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -162,5 +162,13 @@
 	return ret;
 }
 
+function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring {
+	var integer strlen := lengthof(str);
+	for (var integer i := 0; i < len-strlen; i := i+1) {
+		str := str & pad;
+	}
+	return str;
+}
+
 
 } with { encode "RAW"; variant "FIELDORDER(msb)" }

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4df99e5612c67006eb2998529425956fb4a664af
Gerrit-Change-Number: 14277
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190530/d5cc0e0b/attachment.htm>


More information about the gerrit-log mailing list