aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon/common_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libcommon/common_vty.c')
-rw-r--r--openbsc/src/libcommon/common_vty.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsc/src/libcommon/common_vty.c b/openbsc/src/libcommon/common_vty.c
index a0674f0f1..66a82d8bc 100644
--- a/openbsc/src/libcommon/common_vty.c
+++ b/openbsc/src/libcommon/common_vty.c
@@ -42,6 +42,15 @@ int bsc_vty_go_parent(struct vty *vty)
vty->node = CONFIG_NODE;
vty->index = NULL;
break;
+ case VIRT_NET_NODE:
+ vty->node = GSMNET_NODE;
+ {
+ /* set vty->index correctly ! */
+ struct gsm_virt_network *virt_net = vty->index;
+ vty->index = virt_net->network;
+ vty->index_sub = NULL;
+ }
+ break;
case BTS_NODE:
vty->node = GSMNET_NODE;
{
@@ -141,3 +150,13 @@ void bsc_replace_string(void *ctx, char **dst, const char *newstr)
talloc_free(*dst);
*dst = talloc_strdup(ctx, newstr);
}
+
+int osmo_is_digits(const char *str)
+{
+ int i;
+ for (i = 0; i < strlen(str); i++) {
+ if (!isdigit(str[i]))
+ return 0;
+ }
+ return 1;
+}