aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/main.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-29 06:32:36 +0700
committerlaforge <laforge@osmocom.org>2020-11-02 11:16:59 +0000
commita72a0765a4687ba4c24a3b299768b7c87f97e1a2 (patch)
tree28ab15ddf569fe18852864b290a69b437010abaf /src/common/main.c
parent850607295ca451c7f68233f9a34d4b845b673e87 (diff)
main: register VTY commands before handle_options()
Otherwise only those commands that are registered by libosmocore appear in the generated XML VTY reference - change the order. Instead of a pointer to 'struct gsm_bts', pass the application's talloc context, as it's only used for dynamic command allocation. Change-Id: Ic356a950da85de02c82e9882a5fbadaaa6929680 Related: SYS#4937, OS#3036
Diffstat (limited to 'src/common/main.c')
-rw-r--r--src/common/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/main.c b/src/common/main.c
index 279e8231..463b7a83 100644
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -277,6 +277,9 @@ int bts_main(int argc, char **argv)
osmo_cpu_sched_vty_init(tall_bts_ctx);
rate_ctr_init(tall_bts_ctx);
+ bts_vty_init(tall_bts_ctx);
+ e1inp_vty_init();
+
handle_options(argc, argv);
bts = gsm_bts_alloc(tall_bts_ctx, 0);
@@ -285,9 +288,6 @@ int bts_main(int argc, char **argv)
exit(1);
}
- e1inp_vty_init();
- bts_vty_init(bts);
-
/* enable realtime priority for us */
if (rt_prio != -1) {
struct sched_param param;