Hello,<br clear="all">I&#39;m using openser 1.2.0. I have following section in my openser.cfg.<br><br><span style="color: rgb(0, 0, 153);">avp_db_query(&quot;SELECT active, accountcode FROM openser_ip_auth WHERE ip_addr=&#39;$src_ip&#39;&quot;,&quot;$avp(s:active);$avp(s:accountcode)&quot;);
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;, &quot;\n$avp(s:active):::$avp(s:accountcode)\n&quot;);</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!avp_check(&quot;$avp(s:active)&quot;,&quot;eq/1/I&quot;))</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xlog(&quot;L_ERR&quot;, &quot;$si [$Tf]: $rm $fu -&gt; $ru: REGISTER: bad credentials, ask for credentials\n&quot;);</span><br style="color: rgb(0, 0, 153);"><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #authentication failed</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; www_challenge(&quot;&quot;, &quot;0&quot;);</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(1);</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</span><br>Basically I&#39;m doing IP based authentication. I have used the similar method in version 
1.1 but openser 1.2.0 crashes if the query in avp_db_query returns no rows which keeps those two avp variables null. Is this a bug or I&#39;m doing something wrong?<br>I also tried &quot;==&quot; operator for comparison but it crashes whenever it is trying to access one of those two variables.
<br>-- <br>Regards<br>Ruchir Brahmbhatt<br>Ecosmob Technologies<br>