aboutsummaryrefslogtreecommitdiffstats
path: root/sgsnemu
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-04-17 14:31:42 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-17 14:31:42 +0200
commit042a445cf360c8b6093918f52c7137dcb6e6c788 (patch)
tree56d1f3ed8cf2a99730ee14e2e75cda3625dad042 /sgsnemu
parenta16c7501a4eccded2919fab0d485f77fb87dc81a (diff)
use osmo_init_logging2
Diffstat (limited to 'sgsnemu')
-rw-r--r--sgsnemu/sgsnemu.c6
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))