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/tests/mgcp | |
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/tests/mgcp')
-rw-r--r-- | openbsc/tests/mgcp/mgcp_test.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index e2ed4e20f..b7273de43 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -20,6 +20,7 @@ #include <openbsc/mgcp.h> #include <openbsc/mgcp_internal.h> +#include <osmocom/core/application.h> #include <osmocom/core/talloc.h> #include <string.h> @@ -74,11 +75,7 @@ static void test_auep(void) int main(int argc, char **argv) { - struct log_target *stderr_target; - 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); test_auep(); return 0; |