diff options
author | Ruben Pollan <meskio@sindominio.net> | 2014-12-21 16:36:47 -0600 |
---|---|---|
committer | Ciaby <ciaby@rhizomatica.org> | 2014-12-22 14:47:02 +0100 |
commit | fa9e0e2c98a3befade008464f969fc003d975e85 (patch) | |
tree | 9b2e3e9dd71f62f0ac1f64b446d945339458e25c | |
parent | 27ff38dc99e104bf925f65b1be288155601aa9cd (diff) |
Add subscriber_show_queue to VTY
-rw-r--r-- | openbsc/src/libmsc/vty_interface_layer3.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index f9213f542..5affddec5 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -803,6 +803,25 @@ DEFUN(subscriber_update, return CMD_SUCCESS; } +DEFUN(subscriber_show_queue, + subscriber_show_queue_cmd, + "subscriber " SUBSCR_TYPES " ID show-queue", + SUBSCR_HELP "Display the last reason of the subscriber queue.\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + struct gsm_subscriber *subscr = + get_subscr_by_argv(gsmnet, argv[0], argv[1]); + + if (!subscr) { + vty_out(vty, "%% No subscriber found for %s %s%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + + vty_out(vty, "Last reason: %s%s", subscr->last_reason, VTY_NEWLINE); + return CMD_SUCCESS; +} + static int scall_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { @@ -1010,6 +1029,7 @@ int bsc_vty_init_extra(void) install_element_ve(&subscriber_silent_call_stop_cmd); install_element_ve(&subscriber_ussd_notify_cmd); install_element_ve(&subscriber_update_cmd); + install_element_ve(&subscriber_show_queue_cmd); install_element_ve(&show_stats_cmd); install_element_ve(&show_smsqueue_cmd); |