<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11695">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm: Support parsing nanoBTS format for Get Attributes Info<br><br>* On nanoBTS, the Get Attributes Response info can be at any position in the<br>  attribute list, and it only contains the unsupported attribute ID list.<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;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/95/11695/1</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 f089787..24b9429 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -461,7 +461,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>@@ -550,6 +551,13 @@</span><br><span>              LOGPFOH(DNM, LOGL_ERROR, foh, "BTS%u Get Attributes Response: Unit ID is %s\n", 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: newchange </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: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>