<div dir="ltr">Hello, <br><div><br></div><div>I'm running into what I believe a weird situation when comparing <null> to 0.</div><div><br></div><div>I have the following lines:</div><div><font face="monospace"><br></font></div><div><font face="monospace">        xlog("L_NOTICE", "DEBUG: sel(contact.expires)=$sel(contact.expires) - hdr(Expires)=$hdr(Expires)\n");<br></font></div><div><font face="monospace">        if ($hdr(Expires)==0 || $sel(contact.expires)==0) {<br>            xlog("L_NOTICE", "[end] removed user location\n");<br>        } else {<br>            xlog("L_NOTICE", "[end] saved user location\n");<br>        }</font><br></div><div><br></div><div>I registered with 3 devices, one sends expires as header, another as contact param, and the last uses both header AND contact param.</div><div><br></div><div>My surprise was this:</div><div><br></div><div><br></div><div>1- Both header and contact param:</div><div><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">Sep 12 19:37:48 csbc01 csbc[8036]: NOTICE: {1 4 REGISTER 02c3ea6ee623916d37532188031017c9@0:0:0:0:0:0:0:0} <script>: DEBUG: sel(contact.expires)=600 - hdr(Expires)=600<br style="box-sizing:inherit">Sep 12 19:37:48 csbc01 csbc[8036]: NOTICE: {1 4 REGISTER 02c3ea6ee623916d37532188031017c9@0:0:0:0:0:0:0:0} <script>: [end] saved user location</pre></div><div>2- Only contact param:</div><div><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">Sep 12 19:36:15 csbc01 csbc[8035]: NOTICE: {1 40629 REGISTER <a href="mailto:f2cbaa53-eabfd633@84.121.150.224">f2cbaa53-eabfd633@84.121.150.224</a>} <script>: DEBUG: sel(contact.expires)=600 - hdr(Expires)=<null><br style="box-sizing:inherit">Sep 12 19:36:15 csbc01 csbc[8035]: NOTICE: {1 40629 REGISTER <a href="mailto:f2cbaa53-eabfd633@84.121.150.224">f2cbaa53-eabfd633@84.121.150.224</a>} <script>: [end] removed user location</pre></div><div><div>2- Only header:</div><div><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin-top:4px;margin-bottom:4px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,"Courier New",monospace">Sep 12 19:29:33 csbc01 csbc[8033]: NOTICE: {1 402 REGISTER <a href="mailto:2_1804628355@192.168.30.31">2_1804628355@192.168.30.31</a>} <script>: DEBUG: sel(contact.expires)=<null> - hdr(Expires)=3600<br style="box-sizing:inherit">Sep 12 19:29:33 csbc01 csbc[8033]: NOTICE: {1 402 REGISTER <a href="mailto:2_1804628355@192.168.30.31">2_1804628355@192.168.30.31</a>} <script>: [end] removed user location</pre></div></div><div><br></div><div><br></div><div>I can workaround the header by using is_present_hf() before comparing, I can also probably parse the $ct to see if it has some Expires in it, but I really want to know if my understanding is incorrect and I'm doing something wrong or if this is a bug?</div><div><br></div><div>Thanks!<br></div><div>Joel.</div><div><br></div></div>