Let libosmocore handle VTY parent node tracking

* is_config_node is deprecated, so don't set it
* go_parent_cb is only used if we want to do special stuff upon exiting
  a node, in osmo-sgsn and gtphub only osmo_ss7_vty_go_parent() needs to
  be called

Change-Id: I2008dd9026922d29ee703c59e70d3fecced0ee18
This commit is contained in:
Daniel Willmann 2020-11-03 09:07:45 +01:00
parent 3bdfa43bff
commit 5818b04a2e
1 changed files with 0 additions and 30 deletions

View File

@ -183,39 +183,9 @@ static void handle_options(int argc, char **argv)
}
}
int gbproxy_vty_is_config_node(struct vty *vty, int node)
{
switch (node) {
/* add items that are not config */
case CONFIG_NODE:
return 0;
default:
return 1;
}
}
int gbproxy_vty_go_parent(struct vty *vty)
{
switch (vty->node) {
case GBPROXY_NODE:
default:
if (gbproxy_vty_is_config_node(vty, vty->node))
vty->node = CONFIG_NODE;
else
vty->node = ENABLE_NODE;
vty->index = NULL;
}
return vty->node;
}
static struct vty_app_info vty_info = {
.name = "OsmoGbProxy",
.version = PACKAGE_VERSION,
.go_parent_cb = gbproxy_vty_go_parent,
.is_config_node = gbproxy_vty_is_config_node,
};
/* default categories */