<p style="white-space: pre-wrap; word-wrap: break-word;">Just now I am busy implementing with a struct, but I am having the problem of ... (s.b.)</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/3/src/osmo-bsc/chan_counts.c">File src/osmo-bsc/chan_counts.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/+/25972/3/src/osmo-bsc/chan_counts.c@29">Patch Set #3, Line 29:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">...adding this array...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/3/src/osmo-bsc/chan_counts.c@81">Patch Set #3, Line 81:</a> <code style="font-family:monospace,monospace">              chan_counts_dim3_add(ts_count[CHAN_COUNTS2_MAX_TOTAL], lchans_per_pchan[ts->pchan_on_init]);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">...to this</p><p style="white-space: pre-wrap; word-wrap: break-word;">Because with a struct, it looks like this:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> static inline void chan_counts_dim3_add(struct chan_counts *dst, const struct chan_counts *add,<br>                                         enum chan_counts_dim1 dim1, enum chan_counts_dim2 dim2)<br> {               <br>         int i;  <br>         for (i = 0; i < _GSM_LCHAN_MAX; i++)<br>                  dst->val[dim1][dim2][i] += add->val[dim1][dim2][i];<br> } </pre><p style="white-space: pre-wrap; word-wrap: break-word;">So the array to be added is also a struct chan_counts, but above struct lchans_per_pchan has a quite different structure. Only that struct's second dimension is the same as chan_counts' third dimension ... don't know how to resolve that now</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972">change 25972</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/+/25972"/><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: I2fb48c549186db812b1e9d6b735a92e80f27b8d3 </div>
<div style="display:none"> Gerrit-Change-Number: 25972 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </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: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 06 Nov 2021 16:49:21 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>