aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-03-29 13:05:57 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-03-29 13:13:56 +0200
commit64dda770c3035b7d5e2549eef8e8c4ce86ab34c4 (patch)
tree719dbd8733d2c520622ef7c63b2b36f9ba6899b4
parent218789e8338af397af755dd5bf0ec1fd3aaf67c3 (diff)
Add ss7 instances to osmo_ss7_instances in creation order2022q1
Otherwise when configuring ss7 instances in numerical order in the VTY and then printing the VTY configuration they end up ordered this way: cs7 instance 2 cs7 instance 1 cs7 instance 0 Related: SYS#5912 Change-Id: Id4d0a20cc5b0811b505b2d1051d496f8bd17d54c
-rw-r--r--src/osmo_ss7.c2
-rw-r--r--tests/vty/ss7_asp_test.vty8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 99536d3..a4af727 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -399,7 +399,7 @@ osmo_ss7_instance_find_or_create(void *ctx, uint32_t id)
inst->cfg.pc_fmt.component_len[1] = 8;
inst->cfg.pc_fmt.component_len[2] = 3;
- llist_add(&inst->list, &osmo_ss7_instances);
+ llist_add_tail(&inst->list, &osmo_ss7_instances);
INIT_LLIST_HEAD(&inst->cfg.sccp_address_book);
diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty
index bfbb77e..09be45b 100644
--- a/tests/vty/ss7_asp_test.vty
+++ b/tests/vty/ss7_asp_test.vty
@@ -337,10 +337,6 @@ my-ass AS_DOWN 0 3.2.1
ss7_asp_vty_test(config)# show running-config
...
-cs7 instance 1
- sccp-address bar
- routing-indicator PC
- point-code 1.2.3
cs7 instance 0
asp my-asp 12345 54321 m3ua
local-ip 127.0.0.100
@@ -351,6 +347,10 @@ cs7 instance 0
sccp-address foo
routing-indicator PC
point-code 1.2.3
+cs7 instance 1
+ sccp-address bar
+ routing-indicator PC
+ point-code 1.2.3
end
ss7_asp_vty_test(config)# do show cs7 instance 0 users