[PATCH] osmo-ttcn3-hacks[master]: f_enc_IMSI_L3: Fix filler digit in *even* case

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
Wed Jan 24 21:42:45 UTC 2018


Review at  https://gerrit.osmocom.org/6041

f_enc_IMSI_L3: Fix filler digit in *even* case

We actually need to add the filler digit 'F' if the number of digits
is even.  It is absent when the number of digits is odd.

Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
---
M library/L3_Templates.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index db514a4..c603b7b 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -47,10 +47,10 @@
 	var integer len := lengthof(digits);
 	if (len rem 2 == 1) {	/* modulo remainder */
 		l3.oddevenIndicator := '1'B;
-		l3.fillerDigit := '1111'B;
+		l3.fillerDigit := omit;
 	} else {
 		l3.oddevenIndicator := '0'B;
-		l3.fillerDigit := omit;
+		l3.fillerDigit := '1111'B;
 	}
 	l3.digits := digits;
 	return l3;

-- 
To view, visit https://gerrit.osmocom.org/6041
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list