<p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25940">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25940/3/src/osmo-bsc/timeslot_fsm.c">File src/osmo-bsc/timeslot_fsm.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25940/3/src/osmo-bsc/timeslot_fsm.c@a213">Patch Set #3, Line 213:</a> <code style="font-family:monospace,monospace">                  if (i < ts->max_primary_lchans)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Can we do the check this way? […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">No, because AFAIK max_lchans_possible_vamos is the count of maximum secondary lchan possible, but they are located AFTER the primary ones. I guess it could be written:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  if (i < ts->max_primary_lchans || i >= (ts->max_primary_lchans + max_lchans_possible_vamos))<br>    lchan->vamos.is_secondary = false;<br>  else<br>    lchan->vamos.is_secondary = true;</pre><p style="white-space: pre-wrap; word-wrap: break-word;"><br>But in the end it's the same as what I wrote, just switching the branches. And IMHO it makes more sense to have the =true branch in the "if" condition, since that's the main purpose of the loop (or at least what it does from changing the expected default value).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25940">change 25940</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/+/25940"/><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: If86af5fafe059d5e830c1f6d37034f7325d9a96c </div>
<div style="display:none"> Gerrit-Change-Number: 25940 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 11 Nov 2021 12:50:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>