aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-04-14 14:36:23 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-04-14 14:36:23 +0200
commitf4a5bd2dd25291a5ff036d6273731c6147736a5e (patch)
treec3f73b38befafea22bb362d20678102a6203990f /src/osmo-bts-sysmo/main.c
parent58f419c7ced4e8dec2a8432ace1b3fb163c68695 (diff)
sysmobts: Handle options before allocating the bts
This way -h/--version will always work, even when the underlying hardware is not available.
Diffstat (limited to 'src/osmo-bts-sysmo/main.c')
-rw-r--r--src/osmo-bts-sysmo/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index c68271e0..747c50dd 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -103,7 +103,7 @@ static void print_help()
" -T --timestamp Prefix every log line with a timestamp\n"
" -V --version Print version information and exit\n"
" -e --log-level Set a global log-level\n"
- " -p --dsp-trace Set DSP trace flags\n"
+ " -p --dsp-trace Set DSP trace flags\n"
);
}
@@ -204,6 +204,8 @@ int main(int argc, char **argv)
vty_init(&bts_vty_info);
bts_vty_init(&bts_log_info);
+ handle_options(argc, argv);
+
bts = gsm_bts_alloc(tall_bts_ctx);
if (bts_init(bts) < 0) {
fprintf(stderr, "unable to to open bts\n");
@@ -212,7 +214,6 @@ int main(int argc, char **argv)
btsb = bts_role_bts(bts);
btsb->support.ciphers = (1 << 0) | (1 << 1) | (1 << 2);
- handle_options(argc, argv);
rc = vty_read_config_file(config_file, NULL);
if (rc < 0) {