Hello,<br clear="all">I'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("SELECT active, accountcode FROM openser_ip_auth WHERE ip_addr='$src_ip'","$avp(s:active);$avp(s:accountcode)");
</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> xlog("L_INFO", "\n$avp(s:active):::$avp(s:accountcode)\n");</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
if (!avp_check("$avp(s:active)","eq/1/I"))</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> {</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
xlog("L_ERR", "$si [$Tf]: $rm $fu -> $ru: REGISTER: bad credentials, ask for credentials\n");</span><br style="color: rgb(0, 0, 153);"><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
#authentication failed</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> www_challenge("", "0");</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);">
setflag(1);</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> return;</span><br style="color: rgb(0, 0, 153);"><span style="color: rgb(0, 0, 153);"> }</span><br>Basically I'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'm doing something wrong?<br>I also tried "==" 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>