<p>neels <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19923">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  neels: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CBSP: fix link startup when enabled in config file<br><br>Restart the CBSP link from the VTY only from telnet sessions, not when reading<br>in the config file. When reading the config file, link startup might happen too<br>early and twice -- rather rely only on the CBSP startup invoked from main().<br><br>This is fixing a bug introduced recently in<br>"CBSP: rewrite the CBSP link setup and 'cbc' VTY section"<br>commit 641f7f08450f2d0c4b8e8a9f6a36b0a6b2788816<br>Change-Id Icaa2775cc20a99227dabe38a775ff808b374cf98<br><br>Change-Id: Ia0bb507c8468048789a446df09185ad8565c5ad8<br>---<br>M src/osmo-bsc/cbsp_link.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c</span><br><span>index e5e72de..f4cdbb7 100644</span><br><span>--- a/src/osmo-bsc/cbsp_link.c</span><br><span>+++ b/src/osmo-bsc/cbsp_link.c</span><br><span>@@ -347,7 +347,12 @@</span><br><span>  struct bsc_cbc_link *cbc = vty_cbc_data(vty);</span><br><span>        cbc->mode = get_string_value(bsc_cbc_link_mode_names, argv[0]);</span><br><span>   OSMO_ASSERT(cbc->mode >= 0);</span><br><span style="color: hsl(0, 100%, 40%);">-      bsc_cbc_link_restart();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Immediately restart/stop CBSP only when coming from a telnet session. The settings from the config file take</span><br><span style="color: hsl(120, 100%, 40%);">+        * effect in osmo_bsc_main.c's invocation of bsc_cbc_link_restart(). */</span><br><span style="color: hsl(120, 100%, 40%);">+   if (vty->type != VTY_FILE)</span><br><span style="color: hsl(120, 100%, 40%);">+         bsc_cbc_link_restart();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    return CMD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/19923">change 19923</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/19923"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia0bb507c8468048789a446df09185ad8565c5ad8 </div>
<div style="display:none"> Gerrit-Change-Number: 19923 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>