Change in osmo-bsc[master]: CBSP: fix link startup when enabled in config file

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 gerrit-no-reply at lists.osmocom.org
Mon Aug 31 20:35:01 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19923 )


Change subject: CBSP: fix link startup when enabled in config file
......................................................................

CBSP: fix link startup when enabled in config file

Restart the CBSP link from the VTY only from telnet sessions, not when reading
in the config file. When reading the config file, link startup might happen too
early and twice -- rather rely only on the CBSP startup invoked from main().

This is fixing a bug introduced recently in
"CBSP: rewrite the CBSP link setup and 'cbc' VTY section"
commit 641f7f08450f2d0c4b8e8a9f6a36b0a6b2788816
Change-Id Icaa2775cc20a99227dabe38a775ff808b374cf98

Change-Id: Ia0bb507c8468048789a446df09185ad8565c5ad8
---
M src/osmo-bsc/cbsp_link.c
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/19923/1

diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c
index e5e72de..f4cdbb7 100644
--- a/src/osmo-bsc/cbsp_link.c
+++ b/src/osmo-bsc/cbsp_link.c
@@ -347,7 +347,12 @@
 	struct bsc_cbc_link *cbc = vty_cbc_data(vty);
 	cbc->mode = get_string_value(bsc_cbc_link_mode_names, argv[0]);
 	OSMO_ASSERT(cbc->mode >= 0);
-	bsc_cbc_link_restart();
+
+	/* Immediately restart/stop CBSP only when coming from a telnet session. The settings from the config file take
+	 * effect in osmo_bsc_main.c's invocation of bsc_cbc_link_restart(). */
+	if (vty->type != VTY_FILE)
+		bsc_cbc_link_restart();
+
 	return CMD_SUCCESS;
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19923
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia0bb507c8468048789a446df09185ad8565c5ad8
Gerrit-Change-Number: 19923
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200831/475c69d2/attachment.htm>


More information about the gerrit-log mailing list