aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/bsc_vty.c')
-rw-r--r--openbsc/src/bsc_vty.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 55a667cd..6e07a6b7 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -2504,18 +2504,16 @@ DEFUN(logging_fltr_imsi,
LOGGING_STR FILTER_STR
"Filter log messages by IMSI\n" "IMSI to be used as filter\n")
{
- struct telnet_connection *conn;
+ struct log_target *tgt = osmo_log_vty2tgt(vty);
- conn = (struct telnet_connection *) vty->priv;
- if (!conn->dbg) {
- vty_out(vty, "Logging was not enabled.%s", VTY_NEWLINE);
+ if (!tgt)
return CMD_WARNING;
- }
- log_set_imsi_filter(conn->dbg, argv[0]);
+ log_set_imsi_filter(tgt, argv[0]);
return CMD_SUCCESS;
}
+
DEFUN(drop_bts,
drop_bts_cmd,
"drop bts connection <0-65535> (oml|rsl)",
@@ -2635,6 +2633,7 @@ int bsc_vty_init(void)
install_element_ve(&show_paging_cmd);
logging_vty_add_cmds();
+ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd);
install_element(CONFIG_NODE, &cfg_net_cmd);
install_node(&net_node, config_write_net);