THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - VĂctor Seva (linuxmaniac)
Attached to Project - sip-router
Summary - equals $null and 0 return the same
Task Type - Bug Report
Category - Core
Status - New
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - <code>
request_route {
$avp(x)=0;
if($avp(x)==$null) {
xlog("L_INFO","$$avp(x)==$$null\n");
}
else {
xlog("L_INFO","$$avp(x)!=$$null\n");
}
if(is_avp_set("$avp(x)")) {
xlog("L_INFO","$$avp(x) is set\n");
}
else {
xlog("L_INFO","$$avp(x) is not set\n");
}
$avp(y)=$null;
if($avp(y)==0) {
xlog("L_INFO","$$avp(y)==0\n");
}
else {
xlog("L_INFO","$$avp(y)!=0\n");
}
if(is_avp_set("$avp(y)")) {
xlog("L_INFO","$$avp(y) is set\n");
}
else {
xlog("L_INFO","$$avp(y) is not set\n");
}
}
</code>
So $avp(x) is 0 and $avp(y) is not set
Output:
<code>
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(x)==$null
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(x) is set
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(y)==0
Oct 23 12:32:35 guest-945GCM-S2L kamailio[5991]: INFO: <script>: $avp(y) is not set
</code>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=358
You are receiving this message because you have requested it from the Flyspray bugtracking
system. If you did not expect this message or don't want to receive mails in future,
you can change your notification settings at the URL shown above.