diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-03-09 13:36:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-03-19 18:50:38 -0300 |
commit | 739a56696104e59d203130323d55e998b31b8d07 (patch) | |
tree | 0a24d3b02df318375b6f282c3b28be4f05ead36a /openbsc | |
parent | 5d7ad4738640b2cbae9e00e8078bb55d488105d8 (diff) |
bsc: change bsc_vty_init to take logging categories as parameter
This change is required to finish the integration of the VTY and
the per-application logging categories that provides:
"vty: integration with logging framework"
in libosmocore.
It has been tested with osmo-nitb. The other just compiled tested.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/include/openbsc/vty.h | 3 | ||||
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 4 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_main.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_mgcp/mgcp_main.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat.c | 3 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 4 | ||||
-rw-r--r-- | openbsc/src/osmo-nitb/bsc_hack.c | 2 |
7 files changed, 12 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/vty.h b/openbsc/include/openbsc/vty.h index 516c8c2a0..ded2e150e 100644 --- a/openbsc/include/openbsc/vty.h +++ b/openbsc/include/openbsc/vty.h @@ -40,7 +40,8 @@ enum bsc_vty_node { extern int bsc_vty_is_config_node(struct vty *vty, int node); extern void bsc_replace_string(void *ctx, char **dst, const char *newstr); -int bsc_vty_init(void); +struct log_info; +int bsc_vty_init(const struct log_info *cat); int bsc_vty_init_extra(void); #endif diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 1afaed312..d74543ddb 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -2650,7 +2650,7 @@ DEFUN(pdch_act, pdch_act_cmd, extern int bsc_vty_init_extra(void); extern const char *openbsc_copyright; -int bsc_vty_init(void) +int bsc_vty_init(const struct log_info *cat) { install_element_ve(&show_net_cmd); install_element_ve(&show_bts_cmd); @@ -2666,7 +2666,7 @@ int bsc_vty_init(void) install_element_ve(&show_paging_cmd); - logging_vty_add_cmds(); + logging_vty_add_cmds(cat); install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); install_element(CONFIG_NODE, &cfg_net_cmd); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index b5f64ab37..3ec702069 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -196,7 +196,7 @@ int main(int argc, char **argv) /* This needs to precede handle_options() */ vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - bsc_vty_init(); + bsc_vty_init(&log_info); /* parse options */ handle_options(argc, argv); diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c index c8d9a625e..419c3edcb 100644 --- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c +++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c @@ -208,7 +208,7 @@ int main(int argc, char **argv) vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(); + logging_vty_add_cmds(&log_info); mgcp_vty_init(); handle_options(argc, argv); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 643b3c4ba..f513933fa 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -52,6 +52,7 @@ #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/vty.h> +#include <osmocom/vty/logging.h> #include <osmocom/sccp/sccp.h> @@ -1286,7 +1287,7 @@ int main(int argc, char **argv) vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(); + logging_vty_add_cmds(&log_info); bsc_nat_vty_init(nat); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index 786db2dc2..814d9aaa5 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -29,6 +29,7 @@ #include <osmocore/talloc.h> #include <osmocore/rate_ctr.h> #include <osmocore/utils.h> +#include <osmocom/vty/logging.h> #include <osmocom/sccp/sccp.h> @@ -782,7 +783,8 @@ int bsc_nat_vty_init(struct bsc_nat *nat) /* called by the telnet interface... we have our own init above */ -int bsc_vty_init(void) +int bsc_vty_init(const struct log_info *cat) { + logging_vty_add_cmds(cat); return 0; } diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 357ec7ac4..9ea18796f 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -251,7 +251,7 @@ int main(int argc, char **argv) /* This needs to precede handle_options() */ vty_init(&vty_info); - bsc_vty_init(); + bsc_vty_init(&log_info); /* parse options */ handle_options(argc, argv); |