diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-04-14 14:36:23 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-04-14 14:36:23 +0200 |
commit | f4a5bd2dd25291a5ff036d6273731c6147736a5e (patch) | |
tree | c3f73b38befafea22bb362d20678102a6203990f /src | |
parent | 58f419c7ced4e8dec2a8432ace1b3fb163c68695 (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')
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index c68271e..747c50d 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) { |