[MERGED] openbsc[master]: fix 'osmo-nitb --version' segfault

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jan 6 10:08:16 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: fix 'osmo-nitb --version' segfault
......................................................................


fix 'osmo-nitb --version' segfault

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

The segfault was introduced by 2c05f75bbf3d9a69eee1fe78eb5552acf1d7671d in a
recent MSC-split merge.

Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b
---
M openbsc/src/osmo-nitb/bsc_hack.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 992d4c8..bbcdd1b 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -269,6 +269,7 @@
 	osmo_init_logging(&log_info);
 	osmo_stats_init(tall_bsc_ctx);
 	bts_init();
+	vty_init(&vty_info);
 
 	/* Parse options */
 	handle_options(argc, argv);
@@ -282,7 +283,6 @@
 	}
 
 	/* Initialize VTY */
-	vty_init(&vty_info);
 	bsc_vty_init(&log_info, bsc_gsmnet);
 	ctrl_vty_init(tall_bsc_ctx);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice91256d72b9eabd52709352ba6cc6a42af2921b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>


More information about the gerrit-log mailing list