libosmo-sccp[master]: vty: move sccp_addressbook from _sg to _asp

2017-07-03 Thread Neels Hofmeyr

Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/3103/2//COMMIT_MSG
Commit Message:

Line 11: in osmo_ss7_vty_init_asp()
would be good to name a reason why it should: we understand _sg to mean 
signalling gateway, but we also want to use the address book in application 
server processes like BSC and MSC.


https://gerrit.osmocom.org/#/c/3103/2/src/osmo_ss7_vty.c
File src/osmo_ss7_vty.c:

Line 1672:  vty_init_shared();
now the _sg does not have an address book anymore? That can't be right.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] libosmo-sccp[master]: vty: move sccp_addressbook from _sg to _asp

2017-07-03 Thread dexter

vty: move sccp_addressbook from _sg to _asp

The installation of the vty commands for the sccp addressbook is
currently located in osmo_ss7_vty_init_sg(), but should be located
in osmo_ss7_vty_init_asp()

Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
---
M src/osmo_ss7_vty.c
1 file changed, 20 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/03/3103/2

diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index f33303e..5e44e1b 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1633,26 +1633,6 @@
 void osmo_ss7_vty_init_asp(void)
 {
vty_init_shared();
-}
-
-void osmo_ss7_vty_init_sg(void)
-{
-   vty_init_shared();
-
-   install_node(_node, NULL);
-   vty_install_default(L_CS7_RTABLE_NODE);
-   install_element_ve(_cs7_route_cmd);
-   install_element(L_CS7_NODE, _route_table_cmd);
-   install_element(L_CS7_RTABLE_NODE, _description_cmd);
-   install_element(L_CS7_RTABLE_NODE, _rt_upd_cmd);
-   install_element(L_CS7_RTABLE_NODE, _rt_rem_cmd);
-
-   install_node(_node, NULL);
-   vty_install_default(L_CS7_XUA_NODE);
-   install_element(L_CS7_NODE, _xua_cmd);
-   install_element(L_CS7_NODE, _cs7_xua_cmd);
-   install_element(L_CS7_XUA_NODE, _local_ip_cmd);
-   install_element(L_CS7_XUA_NODE, _accept_dyn_asp_cmd);
 
/* Commands for SCCP-Addressbook */
install_node(_node, NULL);
@@ -1687,6 +1667,26 @@
install_element(L_CS7_SCCPADDR_GT_NODE, _sccpaddr_gt_digits_cmd);
 }
 
+void osmo_ss7_vty_init_sg(void)
+{
+   vty_init_shared();
+
+   install_node(_node, NULL);
+   vty_install_default(L_CS7_RTABLE_NODE);
+   install_element_ve(_cs7_route_cmd);
+   install_element(L_CS7_NODE, _route_table_cmd);
+   install_element(L_CS7_RTABLE_NODE, _description_cmd);
+   install_element(L_CS7_RTABLE_NODE, _rt_upd_cmd);
+   install_element(L_CS7_RTABLE_NODE, _rt_rem_cmd);
+
+   install_node(_node, NULL);
+   vty_install_default(L_CS7_XUA_NODE);
+   install_element(L_CS7_NODE, _xua_cmd);
+   install_element(L_CS7_NODE, _cs7_xua_cmd);
+   install_element(L_CS7_XUA_NODE, _local_ip_cmd);
+   install_element(L_CS7_XUA_NODE, _accept_dyn_asp_cmd);
+}
+
 void osmo_ss7_set_vty_alloc_ctx(void *ctx)
 {
g_ctx = ctx;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder