[PATCH] libosmo-sccp[master]: fix osmo_sccp_addr_dump(): actually print RI

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Jul 27 13:50:05 UTC 2017


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

fix osmo_sccp_addr_dump(): actually print RI

Adjust xua_test accordingly.

Change-Id: I93e0aa706867e7b1de7f7a6071e3c8af89772af0
---
M src/sccp_helpers.c
M tests/xua/xua_test.ok
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/64/3364/1

diff --git a/src/sccp_helpers.c b/src/sccp_helpers.c
index 471c9cb..db562db 100644
--- a/src/sccp_helpers.c
+++ b/src/sccp_helpers.c
@@ -282,7 +282,7 @@
 
 	buf[0] = '\0';
 
-	append_to_buf(buf, &comma, "RI=7");
+	append_to_buf(buf, &comma, "RI=%d", addr->ri);
 
 	if (addr->presence & OSMO_SCCP_ADDR_T_PC)
 		append_to_buf(buf, &comma, "PC=%u", addr->pc);
diff --git a/tests/xua/xua_test.ok b/tests/xua/xua_test.ok
index ca8572a..12d817d 100644
--- a/tests/xua/xua_test.ok
+++ b/tests/xua/xua_test.ok
@@ -1,14 +1,14 @@
 digits='01234567' (8)
 digits='0123456' (7)
 sccp_addr_parse test case 0
-expected: RI=7,SSN=6,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919969679389)
-parsed:   RI=7,SSN=6,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919969679389)
+expected: RI=1,SSN=6,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919969679389)
+parsed:   RI=1,SSN=6,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919969679389)
 sccp_addr_parse test case 1
-expected: RI=7,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992)
-parsed:   RI=7,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992)
+expected: RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992)
+parsed:   RI=1,SSN=8,GTI=4,GT=(TT=0,NPL=1,NAI=4,DIG=919869299992)
 sccp_addr_parse test case 2
-expected: RI=7,SSN=254,GTI=0
-parsed:   RI=7,SSN=254,GTI=0
+expected: RI=2,SSN=254,GTI=0
+parsed:   RI=2,SSN=254,GTI=0
 Testing Decoded GT -> SUA encoding
 IN: TT=0,NPL=1,NAI=4,DIG=919969679389
     0400000001000000040000003931393936393637393338390000000000000000000000000000000000000000

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93e0aa706867e7b1de7f7a6071e3c8af89772af0
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list