[PATCH] osmo-bts[master]: fix 'osmo-bts-* --version' segfault

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Nov 9 14:45:59 UTC 2016


Review at  https://gerrit.osmocom.org/1219

fix 'osmo-bts-* --version' segfault

Call vty_init() before handle_options() to make sure the host.app_info is
populated before --version potentially tries to print it.

Change-Id: Ic87b5498b57b2f0f876171a15e769b74c28348c1
---
M src/common/main.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/19/1219/1

diff --git a/src/common/main.c b/src/common/main.c
index 60839df..1b2549e 100644
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -227,6 +227,7 @@
 	msgb_talloc_ctx_init(tall_bts_ctx, 100*1024);
 
 	bts_log_init(NULL);
+	vty_init(&bts_vty_info);
 
 	handle_options(argc, argv);
 
@@ -242,7 +243,6 @@
 			exit(1);
 		}
 	}
-	vty_init(&bts_vty_info);
 	e1inp_vty_init();
 	bts_vty_init(bts, &bts_log_info);
 

-- 
To view, visit https://gerrit.osmocom.org/1219
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic87b5498b57b2f0f876171a15e769b74c28348c1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list