<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11790">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc: band_compatible: Return band non-compatible for invalid arfcn<br><br>Before libosmocore Change-Id I780d452dcebce385469e32ef2fd844df6033393a,<br>it avoids stating arfcn 886-954 are compatible when operating under<br>DC1800. After that Change-Id, avoids aborting the program due to<br>unexpected behaviour.<br><br>Related: OS#3063<br>Change-Id: Ibf5d5ab50b6fc6597244eeedcd27d2ce245278a3<br>---<br>M src/osmo-bsc/system_information.c<br>1 file changed, 5 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/11790/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c</span><br><span>index 2104e92..461232f 100644</span><br><span>--- a/src/osmo-bsc/system_information.c</span><br><span>+++ b/src/osmo-bsc/system_information.c</span><br><span>@@ -53,7 +53,11 @@</span><br><span>  */</span><br><span> static int band_compatible(const struct gsm_bts *bts, int arfcn)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-    enum gsm_band band = gsm_arfcn2band(arfcn);</span><br><span style="color: hsl(120, 100%, 40%);">+   enum gsm_band band;</span><br><span style="color: hsl(120, 100%, 40%);">+   if (gsm_arfcn2band_rc(arfcn, &band) < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+             LOGP(DRR, LOGL_ERROR, "Invalid arfcn %d detected!\n", arfcn);</span><br><span style="color: hsl(120, 100%, 40%);">+               return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span> </span><br><span>        /* normal case */</span><br><span>    if (band == bts->band)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11790">change 11790</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/11790"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ibf5d5ab50b6fc6597244eeedcd27d2ce245278a3 </div>
<div style="display:none"> Gerrit-Change-Number: 11790 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>