<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11230">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix is_ps logic in rx_upd_loc_req(), store CS as is_ps = false<br><br>A missing 'else' in rx_upd_loc_req() causes *all* clients to be indicated as<br>is_ps=true regardless of the GSUP CN Domain IE that was received.<br><br>Replace that odd if cascade with a switch() that fixes the flawed logic. Hence<br>osmo-hlr now correctly indicates each client's is_ps, iff the client sends CN<br>Domain IEs in GSUP LU Request messages.<br><br>Related: OS#2796, OS#3601<br>Change-Id: I2c5fa9f5cae25cfd66afbf088303edff7d045a00<br>---<br>M src/hlr.c<br>1 file changed, 6 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/30/11230/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/hlr.c b/src/hlr.c</span><br><span>index df48a99..f631d52 100644</span><br><span>--- a/src/hlr.c</span><br><span>+++ b/src/hlr.c</span><br><span>@@ -250,18 +250,19 @@</span><br><span> </span><br><span>       lu_op_statechg(luop, LU_S_LU_RECEIVED);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-     if (gsup->cn_domain == OSMO_GSUP_CN_DOMAIN_CS)</span><br><span style="color: hsl(120, 100%, 40%);">+     switch (gsup->cn_domain) {</span><br><span style="color: hsl(120, 100%, 40%);">+ case OSMO_GSUP_CN_DOMAIN_CS:</span><br><span>                 conn->supports_cs = true;</span><br><span style="color: hsl(0, 100%, 40%);">-    if (gsup->cn_domain == OSMO_GSUP_CN_DOMAIN_PS) {</span><br><span style="color: hsl(0, 100%, 40%);">-             conn->supports_ps = true;</span><br><span style="color: hsl(0, 100%, 40%);">-            luop->is_ps = true;</span><br><span style="color: hsl(0, 100%, 40%);">-  } else {</span><br><span style="color: hsl(120, 100%, 40%);">+              break;</span><br><span style="color: hsl(120, 100%, 40%);">+        default:</span><br><span>             /* The client didn't send a CN_DOMAIN IE; assume packet-switched in</span><br><span>               * accordance with the GSUP spec in osmo-hlr's user manual (section</span><br><span>               * 11.6.15 "CN Domain" says "if no CN Domain IE is present within</span><br><span>              * a request, the PS Domain is assumed." */</span><br><span style="color: hsl(120, 100%, 40%);">+      case OSMO_GSUP_CN_DOMAIN_PS:</span><br><span>                 conn->supports_ps = true;</span><br><span>                 luop->is_ps = true;</span><br><span style="color: hsl(120, 100%, 40%);">+                break;</span><br><span>       }</span><br><span>    llist_add(&luop->list, &g_lu_ops);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11230">change 11230</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/11230"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2c5fa9f5cae25cfd66afbf088303edff7d045a00 </div>
<div style="display:none"> Gerrit-Change-Number: 11230 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>