diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2013-09-02 13:17:16 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-02 20:25:35 +0200 |
commit | 0ae92a950a321835c6693e381e131df38febab2a (patch) | |
tree | bacb84b469c72c18bb63498b4a697a5fcd56464f /openbsc/src/gprs | |
parent | 190acf6fd03f7f9a92b3e0044abf455b8a465c33 (diff) |
vty: Use generic 'end' and 'exit' commands
Add bsc_install_default() and replace all install_default()
This patch adds bsc_install_default() which calls install_default()
and add 'exit' and 'end'. All other calls to install_default() are
replaced by calls to bsc_install_default().
Since 'exit' and 'end' are now added automatically to each node, the
explicit registrations of these commands are removed by this patch,
too.
The related tests succeed now without work-arounds (except for the
'config' node itself which is part of libosmocore).
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gb_proxy_vty.c | 4 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_vty.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c index bfa1f3bd1..63546d3f9 100644 --- a/openbsc/src/gprs/gb_proxy_vty.c +++ b/openbsc/src/gprs/gb_proxy_vty.c @@ -82,9 +82,7 @@ int gbproxy_vty_init(void) install_element(CONFIG_NODE, &cfg_gbproxy_cmd); install_node(&gbproxy_node, config_write_gbproxy); - install_default(GBPROXY_NODE); - install_element(GBPROXY_NODE, &ournode_exit_cmd); - install_element(GBPROXY_NODE, &ournode_end_cmd); + bsc_install_default(GBPROXY_NODE); install_element(GBPROXY_NODE, &cfg_nsip_sgsn_nsei_cmd); return 0; diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index a4ba2802e..8106b7de5 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -418,9 +418,7 @@ int sgsn_vty_init(void) install_element(CONFIG_NODE, &cfg_sgsn_cmd); install_node(&sgsn_node, config_write_sgsn); - install_default(SGSN_NODE); - install_element(SGSN_NODE, &ournode_exit_cmd); - install_element(SGSN_NODE, &ournode_end_cmd); + bsc_install_default(SGSN_NODE); install_element(SGSN_NODE, &cfg_sgsn_bind_addr_cmd); install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd); //install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd); |