fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28622 )
Change subject: trxcon: get rid of init_defaults(), init app_data in place ......................................................................
trxcon: get rid of init_defaults(), init app_data in place
Change-Id: Id59df37b249f21cd7ea7a411ab2445ffc2dae8cc --- M src/host/trxcon/src/trxcon.c 1 file changed, 7 insertions(+), 16 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index c31f597..5a7f7a4 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -79,7 +79,13 @@ /* GSMTAP specific */ struct gsmtap_inst *gsmtap; const char *gsmtap_ip; -} app_data; +} app_data = { + .bind_socket = "/tmp/osmocom_l2", + .trx_remote_ip = "127.0.0.1", + .trx_bind_ip = "0.0.0.0", + .trx_base_port = 6700, + .trx_fn_advance = 3, +};
static void *tall_trxcon_ctx = NULL; struct osmo_fsm_inst *trxcon_fsm; @@ -391,20 +397,6 @@ } }
-static void init_defaults(void) -{ - app_data.bind_socket = "/tmp/osmocom_l2"; - app_data.trx_remote_ip = "127.0.0.1"; - app_data.trx_bind_ip = "0.0.0.0"; - app_data.trx_base_port = 6700; - app_data.trx_fn_advance = 3; - - app_data.debug_mask = NULL; - app_data.gsmtap_ip = NULL; - app_data.daemonize = 0; - app_data.quit = 0; -} - static void signal_handler(int signum) { fprintf(stderr, "signal %u received\n", signum); @@ -438,7 +430,6 @@ int rc = 0;
printf("%s", COPYRIGHT); - init_defaults(); handle_options(argc, argv);
/* Track the use of talloc NULL memory contexts */