summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-27 15:22:06 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-08-09 13:54:44 +0200
commit037d46abc181d5a763f2171a5e08154eb163fd0c (patch)
treea4f37de6986ab9390e05ddcdd0a21fbdd51491af
parent603e065f43a9b0a6d9d92584ba458fefee32b516 (diff)
fix osmo_sccp_addr_dump(): actually print RI
Adjust xua_test accordingly. Change-Id: I93e0aa706867e7b1de7f7a6071e3c8af89772af0
-rw-r--r--src/sccp_helpers.c2
-rw-r--r--tests/xua/xua_test.ok12
2 files changed, 7 insertions, 7 deletions
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 @@ char *osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr)
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