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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm: Support parsing nanoBTS format for Get Attributes Info<br><br>Spec compliant format is defined in:<br>* 3GPP TS 52.021 §8.11.3 "Get Attribute Response"<br>* 3GPP TS 52.021 §9.4.64 "Get Attribute Response Info".<br><br>On nanoBTS, however, reported attribute list is provided directly inside/after<br>the foh header instead of being enveloped inside the Get Attributes Response Info.<br>Furthermore, The Get Attributes Response Info can still appear and be at any position<br>in the reported attribute list, and it only contains the unreported<br>attribute ID list inside.<br><br>Change-Id: I81a613d53bddf432a79fa5cb0bf9d847b4bdee37<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 9 insertions(+), 1 deletion(-)<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 89a6d82..d147606 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -494,7 +494,8 @@</span><br><span>                 bts_nr, get_value_string(abis_nm_att_names, ari[i + 1]));</span><br><span> </span><br><span>   /* the data starts right after the list of unreported attributes + space for length of that list */</span><br><span style="color: hsl(0, 100%, 40%);">-     *out_len = ari_len - (num_unreported + 2);</span><br><span style="color: hsl(120, 100%, 40%);">+    if (out_len)</span><br><span style="color: hsl(120, 100%, 40%);">+          *out_len = ari_len - (num_unreported + 2);</span><br><span> </span><br><span>       return ari + num_unreported + 1; /* we have to account for 1st byte with number of unreported attributes */</span><br><span> }</span><br><span>@@ -575,6 +576,13 @@</span><br><span>                      bts->nr, unit_id);</span><br><span>        }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* nanoBTS provides Get Attribute Response Info at random position and only the unreported part of it. */</span><br><span style="color: hsl(120, 100%, 40%);">+     if (TLVP_PRES_LEN(tp, NM_ATT_GET_ARI, 1)) {</span><br><span style="color: hsl(120, 100%, 40%);">+           data = TLVP_VAL(tp, NM_ATT_GET_ARI);</span><br><span style="color: hsl(120, 100%, 40%);">+          len = TLVP_LEN(tp, NM_ATT_GET_ARI);</span><br><span style="color: hsl(120, 100%, 40%);">+           parse_attr_resp_info_unreported(bts->nr, data, len, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  return 0;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11695">change 11695</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/11695"/><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: I81a613d53bddf432a79fa5cb0bf9d847b4bdee37 </div>
<div style="display:none"> Gerrit-Change-Number: 11695 </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: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>