<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17277">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">utils: fix dec_msisdn(): properly detect international numbers<br><br>We should match the whole value of ToN, not just one LSB bit.<br><br>Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1<br>---<br>M pySim/utils.py<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/pysim refs/changes/77/17277/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/utils.py b/pySim/utils.py</span><br><span>index 8420b23..c098384 100644</span><br><span>--- a/pySim/utils.py</span><br><span>+++ b/pySim/utils.py</span><br><span>@@ -295,7 +295,7 @@</span><br><span> </span><br><span>    msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f')</span><br><span>     # International number 10.5.118/3GPP TS 24.008</span><br><span style="color: hsl(0, 100%, 40%);">-  if (ton & 0x01) == 0x01:</span><br><span style="color: hsl(120, 100%, 40%);">+  if ton == 0x01:</span><br><span>              msisdn = '+' + msisdn</span><br><span> </span><br><span>    return (npi, ton, msisdn)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17277">change 17277</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/pysim/+/17277"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1 </div>
<div style="display:none"> Gerrit-Change-Number: 17277 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>