<p>ipse has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18090">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ctrs: Correctly count load total for dynamic timeslots.<br><br>Change-Id: Iabd70e8adbf15eb3b7a7be597281ea99b352317b<br>---<br>M src/osmo-bsc/chan_alloc.c<br>1 file changed, 14 insertions(+), 0 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/90/18090/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c</span><br><span>index 669eb8e..0964b61 100644</span><br><span>--- a/src/osmo-bsc/chan_alloc.c</span><br><span>+++ b/src/osmo-bsc/chan_alloc.c</span><br><span>@@ -58,6 +58,20 @@</span><br><span>                    if (!nm_is_running(&ts->mo.nm_state))</span><br><span>                                 continue;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+                 /* dynamic timeslots have to be counted separately</span><br><span style="color: hsl(120, 100%, 40%);">+                     * when not in TCH/F or TCH/H mode because they don't</span><br><span style="color: hsl(120, 100%, 40%);">+                      * have an lchan's allocated to them */</span><br><span style="color: hsl(120, 100%, 40%);">+                   if ( (  ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH</span><br><span style="color: hsl(120, 100%, 40%);">+                         || ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH)</span><br><span style="color: hsl(120, 100%, 40%);">+                    && (  ts->pchan_is == GSM_PCHAN_NONE</span><br><span style="color: hsl(120, 100%, 40%);">+                          || ts->pchan_is == GSM_PCHAN_PDCH)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                pl->total++;</span><br><span style="color: hsl(120, 100%, 40%);">+                       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+                   /* count allocated logical channels.</span><br><span style="color: hsl(120, 100%, 40%);">+                   * Note: When GSM_PCHAN_TCH_F_TCH_H_PDCH is allocation</span><br><span style="color: hsl(120, 100%, 40%);">+                         * in TCH/H mode, this leads to changing the total</span><br><span style="color: hsl(120, 100%, 40%);">+                     * count vs the TCH/F allocation */</span><br><span>                  ts_for_each_lchan(lchan, ts) {</span><br><span>                               /* don't even count CBCH slots in total */</span><br><span>                               if (lchan->type == GSM_LCHAN_CBCH)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/18090">change 18090</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/+/18090"/><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: Iabd70e8adbf15eb3b7a7be597281ea99b352317b </div>
<div style="display:none"> Gerrit-Change-Number: 18090 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: ipse <Alexander.Chemeris@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>