diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-17 14:31:42 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-17 14:31:42 +0200 |
commit | 042a445cf360c8b6093918f52c7137dcb6e6c788 (patch) | |
tree | 56d1f3ed8cf2a99730ee14e2e75cda3625dad042 /sgsnemu | |
parent | a16c7501a4eccded2919fab0d485f77fb87dc81a (diff) |
use osmo_init_logging2
Change-Id: Ic38fff17cc985238b91999c8acdd92d22fd28c72
Diffstat (limited to 'sgsnemu')
-rw-r--r-- | sgsnemu/sgsnemu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 804b542..99f56da 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -20,6 +20,7 @@ #endif #include <osmocom/core/application.h> +#include <osmocom/core/msgb.h> #include <ctype.h> #include <netdb.h> @@ -79,6 +80,7 @@ struct gsn_t *gsn = NULL; /* GSN instance */ struct tun_t *tun = NULL; /* TUN instance */ int maxfd = 0; /* For select() */ int echoversion = 1; /* First try this version */ +void *tall_sgsnemu_ctx; /* root talloc ctx */ /* Struct with local versions of gengetopt options */ struct { @@ -1540,7 +1542,9 @@ int main(int argc, char **argv) signal(SIGHUP, signal_handler); signal(SIGINT, signal_handler); - osmo_init_logging(&log_info); + tall_sgsnemu_ctx = talloc_named_const(NULL, 0, "sgsnemu"); + msgb_talloc_ctx_init(tall_sgsnemu_ctx, 0); + osmo_init_logging2(tall_sgsnemu_ctx, &log_info); /* Process options given in configuration file and command line */ if (process_options(argc, argv)) |