diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-03-30 08:34:30 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-03-30 08:34:30 +0100 |
commit | 972a1e892e462f4abf05b2c2ee230fdcde8aa603 (patch) | |
tree | 1e56f414378e36f8cb43b93b212f4a25fd95bce2 | |
parent | 7817b20e04fbf9bff99b7e931d38feddaf2e708a (diff) |
client: Fix initialization order: logging first
otherwise some sub-system might want to log without the logging being
initialized first.
Change-Id: I179d937bd4eae0e82d9ebdb07748a0663a244756
-rw-r--r-- | src/simtrace2-remsim_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/simtrace2-remsim_client.c b/src/simtrace2-remsim_client.c index 7fde8c7..53f2d33 100644 --- a/src/simtrace2-remsim_client.c +++ b/src/simtrace2-remsim_client.c @@ -805,6 +805,9 @@ int main(int argc, char **argv) signal(SIGUSR1, handle_sig_usr1); + g_tall_ctx = talloc_named_const(NULL, 0, "global"); + osmo_init_logging2(g_tall_ctx, &log_info); + rc = libusb_init(NULL); if (rc < 0) { fprintf(stderr, "libusb initialization failed\n"); @@ -821,7 +824,6 @@ int main(int argc, char **argv) signal(SIGINT, &signal_handler); // initialize remote SIM client - g_tall_ctx = talloc_named_const(NULL, 0, "global"); g_client = talloc_zero(g_tall_ctx, struct bankd_client); @@ -840,7 +842,6 @@ int main(int argc, char **argv) } asn_debug = 0; - osmo_init_logging2(g_tall_ctx, &log_info); if (bankd_conn_fsm_alloc(g_client) < 0) { fprintf(stderr, "Unable to connect: %s\n", strerror(errno)); |