diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-05-12 16:02:07 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-05-12 16:11:14 +0200 |
commit | 67cd75f9fa0e9c2140cbef08a7774760470e32a1 (patch) | |
tree | 8f64d246e0f535866f56dccb5e9963ebe8dee77a /openbsc/src/utils/bs11_config.c | |
parent | 99beb96fc0fdd2073ec7651e68bcea5d89db0737 (diff) |
misc: Use the osmo_init code for signals and logging
Use the libosmocore code to ignore certain signals by
default (e.g. SIGHUP, SIGPIPE) and use the new code to
create a default stderr logging target and initialize
it properly.
Diffstat (limited to 'openbsc/src/utils/bs11_config.c')
-rw-r--r-- | openbsc/src/utils/bs11_config.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 878d02a71..aa8c55d3a 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -39,6 +39,7 @@ #include <openbsc/debug.h> #include <osmocom/core/select.h> #include <openbsc/rs232.h> +#include <osmocom/core/application.h> /* state of our bs11_config application */ enum bs11cfg_state { @@ -69,8 +70,6 @@ static const char *trx1_password = "1111111111"; static const uint8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 }; -static struct log_target *stderr_target; - /* dummy function to keep gsm_data.c happy */ struct osmo_counter *osmo_counter_alloc(const char *name) { @@ -817,7 +816,7 @@ static void handle_options(int argc, char **argv) serial_port = optarg; break; case 'b': - log_parse_category_mask(stderr_target, optarg); + log_parse_category_mask(osmo_stderr_target, optarg); break; case 's': fname_software = optarg; @@ -874,10 +873,7 @@ int main(int argc, char **argv) struct gsm_network *gsmnet; int rc; - log_init(&log_info); - stderr_target = log_target_create_stderr(); - log_add_target(stderr_target); - log_set_all_filter(stderr_target, 1); + osmo_init_logging(&log_info); handle_options(argc, argv); bts_model_bs11_init(); |