<p>ipse has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/18230">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm0808_utils: Fix gsm0808_cause_class() function<br><br>Cause class is in bits 5-7 of the cause value.<br>For the cause value 0x52 old version returned 0xa instead of<br>a correct 0x5.<br><br>See section 3.2.2.5 Cause of TS 08.08 for the details.<br><br>Change-Id: I46646740c5daaafe20123e709f26dd1d2c1b6f8d<br>---<br>M include/osmocom/gsm/gsm0808_utils.h<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/18230/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h</span><br><span>index 1cdca8c..a8852e4 100644</span><br><span>--- a/include/osmocom/gsm/gsm0808_utils.h</span><br><span>+++ b/include/osmocom/gsm/gsm0808_utils.h</span><br><span>@@ -145,7 +145,7 @@</span><br><span> /*! \returns 3GPP TS 08.08 §3.2.2.5 Class of a given Cause */</span><br><span> static inline enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-      return (cause << 1) >> 4;</span><br><span style="color: hsl(120, 100%, 40%);">+ return (cause >> 4) & 0x7;</span><br><span> }</span><br><span> </span><br><span> /*! \returns true if 3GPP TS 08.08 §3.2.2.5 Class has extended bit set */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/18230">change 18230</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/libosmocore/+/18230"/><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-Change-Id: I46646740c5daaafe20123e709f26dd1d2c1b6f8d </div>
<div style="display:none"> Gerrit-Change-Number: 18230 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: ipse <Alexander.Chemeris@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>