<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18592">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">oml: fix TL16V length calculation in add_bts_feat()<br><br>An additional octet is only needed if total number of features<br>cannot be devided by 8 without the remainder. Fix this.<br><br>Change-Id: Ie501e5a635493830e0597f7b2fa287b6448e660d<br>---<br>M src/common/oml.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/18592/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/oml.c b/src/common/oml.c</span><br><span>index 077ef09..16b24b1 100644</span><br><span>--- a/src/common/oml.c</span><br><span>+++ b/src/common/oml.c</span><br><span>@@ -173,7 +173,10 @@</span><br><span> /* Add BTS features as 3GPP TS 52.021 ยง9.4.30 Manufacturer Id */</span><br><span> static inline void add_bts_feat(struct msgb *msg, const struct gsm_bts *bts)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        msgb_tl16v_put(msg, NM_ATT_MANUF_ID, _NUM_BTS_FEAT/8 + 1, bts->features->data);</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int len = _NUM_BTS_FEAT / 8;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (_NUM_BTS_FEAT % 8 != 0)</span><br><span style="color: hsl(120, 100%, 40%);">+           len++;</span><br><span style="color: hsl(120, 100%, 40%);">+        msgb_tl16v_put(msg, NM_ATT_MANUF_ID, len, bts->features->data);</span><br><span> }</span><br><span> </span><br><span> static inline void add_trx_attr(struct msgb *msg, const struct gsm_bts_trx *trx)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/18592">change 18592</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-bts/+/18592"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie501e5a635493830e0597f7b2fa287b6448e660d </div>
<div style="display:none"> Gerrit-Change-Number: 18592 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>