[MERGED] 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 22:00:31 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: f_enc_IMSI_L3: Fix filler digit in *even* case
......................................................................


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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list