<p>Alexander Chemeris has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9997">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">coding: Correctly count bits when decoding EDGE bursts with MCS >= 7.<br><br>They consist of two blocks, so we should count both blocks.<br><br>Change-Id: I560de192212dae4705054a1665726369b83d213a<br>---<br>M src/coding/gsm0503_coding.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/9997/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c</span><br><span>index 6be4001..527e9cb 100644</span><br><span>--- a/src/coding/gsm0503_coding.c</span><br><span>+++ b/src/coding/gsm0503_coding.c</span><br><span>@@ -982,6 +982,9 @@</span><br><span>                if (rc < 0)</span><br><span>                       return -EFAULT;</span><br><span>      } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              /* Bit counters for the second block */</span><br><span style="color: hsl(120, 100%, 40%);">+               int n_errors2, n_bits_total2;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>              /* MCS-7,8,9 block 1 */</span><br><span>              rc = egprs_decode_data(l2_data, c1, cps.mcs, cps.p[0],</span><br><span>                       0, n_errors, n_bits_total);</span><br><span>@@ -991,6 +994,8 @@</span><br><span>            /* MCS-7,8,9 block 2 */</span><br><span>              rc = egprs_decode_data(l2_data, c2, cps.mcs, cps.p[1],</span><br><span>                       1, n_errors, n_bits_total);</span><br><span style="color: hsl(120, 100%, 40%);">+           if (n_errors) *n_errors += n_errors2;</span><br><span style="color: hsl(120, 100%, 40%);">+         if (n_bits_total) *n_bits_total += n_bits_total2;</span><br><span>            if (rc < 0)</span><br><span>                       return -EFAULT;</span><br><span>      }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9997">change 9997</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/9997"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I560de192212dae4705054a1665726369b83d213a </div>
<div style="display:none"> Gerrit-Change-Number: 9997 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris@gmail.com> </div>