<p>Pau Espin Pedrol <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11691">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Max: Looks good to me, but someone else must approve
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm: Rename m_id_len to ease review of forthcoming patches<br><br>This function will be merged into another using a "len" variable. This<br>change makes diffs easier to follow in future patches.<br><br>Change-Id: I1be03e31901ccf284e31237a04bb7448d1f22c07<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c</span><br><span>index f75470d..ef61f9e 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -470,27 +470,27 @@</span><br><span> static inline const uint8_t *parse_attr_resp_info_manuf_id(struct gsm_bts *bts, const uint8_t *data, uint16_t *data_len)</span><br><span> {</span><br><span>    struct tlv_parsed tp;</span><br><span style="color: hsl(0, 100%, 40%);">-   uint16_t m_id_len = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+        uint16_t len = 0;</span><br><span>    uint8_t adjust = 0, i;</span><br><span> </span><br><span>   abis_nm_tlv_parse(&tp, bts, data, *data_len);</span><br><span>    if (TLVP_PRES_LEN(&tp, NM_ATT_MANUF_ID, 2)) {</span><br><span style="color: hsl(0, 100%, 40%);">-               m_id_len = TLVP_LEN(&tp, NM_ATT_MANUF_ID);</span><br><span style="color: hsl(120, 100%, 40%);">+                len = TLVP_LEN(&tp, NM_ATT_MANUF_ID);</span><br><span> </span><br><span>                /* log potential BTS feature vector overflow */</span><br><span style="color: hsl(0, 100%, 40%);">-         if (m_id_len > sizeof(bts->_features_data))</span><br><span style="color: hsl(120, 100%, 40%);">+             if (len > sizeof(bts->_features_data))</span><br><span>                         LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: feature vector is truncated to %u bytes\n",</span><br><span>                              bts->nr, MAX_BTS_FEATURES/8);</span><br><span> </span><br><span>            /* check that max. expected BTS attribute is above given feature vector length */</span><br><span style="color: hsl(0, 100%, 40%);">-               if (m_id_len > OSMO_BYTES_FOR_BITS(_NUM_BTS_FEAT))</span><br><span style="color: hsl(120, 100%, 40%);">+         if (len > OSMO_BYTES_FOR_BITS(_NUM_BTS_FEAT))</span><br><span>                     LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: reported unexpectedly long (%u bytes) "</span><br><span>                          "feature vector - most likely it was compiled against newer BSC headers. "</span><br><span>                         "Consider upgrading your BSC to later version.\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                            bts->nr, m_id_len);</span><br><span style="color: hsl(120, 100%, 40%);">+                        bts->nr, len);</span><br><span> </span><br><span>           memcpy(bts->_features_data, TLVP_VAL(&tp, NM_ATT_MANUF_ID), sizeof(bts->_features_data));</span><br><span style="color: hsl(0, 100%, 40%);">-             adjust = m_id_len + 3; /* adjust for parsed TL16V struct */</span><br><span style="color: hsl(120, 100%, 40%);">+           adjust = len + 3; /* adjust for parsed TL16V struct */</span><br><span> </span><br><span>           for (i = 0; i < _NUM_BTS_FEAT; i++)</span><br><span>                       if (osmo_bts_has_feature(&bts->features, i) != osmo_bts_has_feature(&bts->model->features, i))</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11691">change 11691</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/11691"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: I1be03e31901ccf284e31237a04bb7448d1f22c07 </div>
<div style="display:none"> Gerrit-Change-Number: 11691 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>