<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Podrigal, Aron</b> <span dir="ltr">&lt;<a href="mailto:aronp@guaranteedplus.com">aronp@guaranteedplus.com</a>&gt;</span><br>Date: Tue, Jul 7, 2015 at 7:24 PM<br>Subject: sofia_reg_handle_register_token - exp possibly always false<br>To: freeswitch-dev &lt;<a href="mailto:freeswitch-dev@lists.freeswitch.org">freeswitch-dev@lists.freeswitch.org</a>&gt;<br><br><br><div dir="ltr">Hi,<div><br></div><div>According to grep the function <span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">sofia_reg_handle_register_token</span> is called from a single place <a href="https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/mod/endpoints/mod_sofia/sofia_reg.c#2305" target="_blank">src/mod/endpoints/mod_sofia/sofia_reg.c:2305</a> where the argument <b>v_event</b> would always be NULL at that time. So I&#39;m wondering what the line at <a href="https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/mod/endpoints/mod_sofia/sofia_reg.c#1297" target="_blank">src/mod/endpoints/mod_sofia/sofia_reg.c:1297</a>  <span style="font-weight:bold;color:rgb(0,0,128);line-height:15px;font-family:monospace;font-size:12px;white-space:pre-wrap">if </span><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">(v_event &amp;&amp; *v_event) pres_on_reg = switch_event_get_header(*v_event, </span><span style="color:rgb(0,128,0);font-weight:bold;line-height:15px;font-family:monospace;font-size:12px;white-space:pre-wrap">&quot;send-presence-on-register&quot;</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">);</span><span style="color:rgb(0,0,0);font-size:12px;line-height:18px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"> is suppose to do,  won&#39;t this always evaluate to false?</font></span></div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr">Aron Podrigal<div>-</div><div>//Be happy :-)</div></div></div>
</div></font></span></div>
</div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Aron Podrigal<div>-</div><div>//Be happy :-)</div></div></div>
</div>