neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32914 )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: vty_go_parent(): remove legacy cruft ......................................................................
vty_go_parent(): remove legacy cruft
We do not need to restore the parent node on vty_go_parent() anymore, only call the ss7 go-parent callback to trigger actions on vty node exit.
Change-Id: Id3ecc53885436294d2217c52130910872dde550e --- M src/osmo-hnbgw/hnbgw_vty.c 1 file changed, 14 insertions(+), 24 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c index 2952913..47db695 100644 --- a/src/osmo-hnbgw/hnbgw_vty.c +++ b/src/osmo-hnbgw/hnbgw_vty.c @@ -104,30 +104,7 @@
int hnbgw_vty_go_parent(struct vty *vty) { - switch (vty->node) { - case IUH_NODE: - case IUCS_NODE: - case IUPS_NODE: - vty->node = HNBGW_NODE; - vty->index = NULL; - break; - case MGCP_NODE: - vty->node = HNBGW_NODE; - vty->index = NULL; - break; - case HNBGW_NODE: - vty->node = CONFIG_NODE; - vty->index = NULL; - break; - case CONFIG_NODE: - vty->node = ENABLE_NODE; - vty->index = NULL; - break; - default: - osmo_ss7_vty_go_parent(vty); - break; - } - + osmo_ss7_vty_go_parent(vty); return vty->node; }