<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11318">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">handover_decision_2.c: find_alternative_lchan: drop goto<br><br>Don't goto the function end just to log something. Rather log right away and<br>exit early.<br><br>Change-Id: I6558a6948e8973cc91dae240375af074a5f5547e<br>---<br>M src/osmo-bsc/handover_decision_2.c<br>1 file changed, 9 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/18/11318/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c</span><br><span>index fc94d61..67ba26d 100644</span><br><span>--- a/src/osmo-bsc/handover_decision_2.c</span><br><span>+++ b/src/osmo-bsc/handover_decision_2.c</span><br><span>@@ -971,8 +971,10 @@</span><br><span> </span><br><span> /* If assignment is disabled and no neighbor cell report exists, or no neighbor cell qualifies,</span><br><span> * we may not even have any candidates. */</span><br><span style="color: hsl(0, 100%, 40%);">- if (!candidates)</span><br><span style="color: hsl(0, 100%, 40%);">- goto no_candidates;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!candidates) {</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGPHOLCHAN(lchan, LOGL_INFO, "No viable neighbor cells found\n");</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> /* select best candidate that fulfills requirement B: no congestion after HO */</span><br><span> best_better_db = 0;</span><br><span>@@ -1033,8 +1035,10 @@</span><br><span> }</span><br><span> </span><br><span> /* we are done in case the MS RXLEV/RXQUAL/TA aren't critical and we're avoiding congestion. */</span><br><span style="color: hsl(0, 100%, 40%);">- if (!include_weaker_rxlev)</span><br><span style="color: hsl(0, 100%, 40%);">- goto no_candidates;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!include_weaker_rxlev) {</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGPHOLCHAN(lchan, LOGL_INFO, "No better/less congested neighbor cell found\n");</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> /* Select best candidate that fulfills requirement A: can service the call.</span><br><span> * From above we know that there are no options that avoid congestion. Here we're trying to find</span><br><span>@@ -1069,13 +1073,7 @@</span><br><span> </span><br><span> /* Damn, all is congested, has too low RXLEV or cannot service the voice call due to codec</span><br><span> * restrictions or because all lchans are taken. */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-no_candidates:</span><br><span style="color: hsl(0, 100%, 40%);">- if (include_weaker_rxlev)</span><br><span style="color: hsl(0, 100%, 40%);">- LOGPHOLCHAN(lchan, LOGL_INFO, "No alternative lchan found\n");</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(0, 100%, 40%);">- LOGPHOLCHAN(lchan, LOGL_INFO, "No better/less congested neighbor cell found\n");</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+ LOGPHOLCHAN(lchan, LOGL_INFO, "No alternative lchan found\n");</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11318">change 11318</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/11318"/><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: I6558a6948e8973cc91dae240375af074a5f5547e </div>
<div style="display:none"> Gerrit-Change-Number: 11318 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>