THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#376 - SQLOPS returns 0 for empty result set instead of $null
User who did this - Dmitry Davletbaev (ddomgn)
----------
Wiki page made it clear to me, thank you.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=376#comment1212
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.
Hello,
It seems that when calling the function sdp_get_line_startswith, it removes
the \r (0d in hexa) from the SIP message before forwarding it. In the code
(sdpops_mod.c) from line 1402 to 1406, we see that
// remove ending \r\n if exists
if (avp_val.s.s[line.len-2] == '\r' && avp_val.s.s[line.len-1] ==
'\n')
{
avp_val.s.s[line.len-2] = '\0';
avp_val.s.len -= 2;
}
As avp_val is a reference to the found line which is also a reference to
the line in the message, all modification made to this var will also be
applied to the message. Am I wrong?
Thank you,
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#359 - avpops: avp_copy add xavp
User who did this: Víctor Seva (linuxmaniac)
Task details edited:
-------
We have avp_copy on avpops module but we don't have anything to copy xavps.
<code>
// copy all the content of an avp to a xavp
$xavp(a[0]=>b) = $(avp(x)[*]);
// deleting left content
$xavp(a[0]=>b[*]) = $(avp(x)[*]);
// copy xavp to a xavp with index
$xavp(a[0]) = $xavp(b[1]);
// all
$xavp(a[*]) = $xavp(b[*]);
// copy all content of a xavp to a avp
$avp(x) = $xavp(a[0]=>b[*]);
</code>
-------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=359
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.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#359 - avpops: avp_copy add xavp
User who did this: Víctor Seva (linuxmaniac)
Task details edited:
-------
We have avp_copy on avpops module but we don't have anything to copy xavps.
// copy all the content of an avp to a xavp
$xavp(a[0]=>b) = $(avp(x)[*]);
// deleting left content
$xavp(a[0]=>b[*]) = $(avp(x)[*]);
// copy xavp to a xavp with index
$xavp(a[0]) = $xavp(b[1]);
// all
$xavp(a[*]) = $xavp(b[*]);
// copy all content of a xavp to a avp
$avp(x) = $xavp(a[0]=>b[*]);
-------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=359
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.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#376 - SQLOPS returns 0 for empty result set instead of $null
User who did this - Daniel-Constantin Mierla (miconda)
----------
I added some notes on the wiki:
* https://www.kamailio.org/wiki/install/upgrade/4.0.x-to-4.1.0?&#behaviour
The result from database should still be null, just the comparison of $null with $var(...) is done different, which came actually as a fix.
You should test as:
<code>
if($dbr(touser=>[0,0])!=$null) ...
</code>
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=376#comment1211
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.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Dmitry Davletbaev (ddomgn)
Attached to Project - sip-router
Summary - SQLOPS returns 0 for empty result set instead of $null
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - **System**: Debian Wheezy
**Kamailio version**: 4.1.0
I use SQLOPS module to query additional data in MySQL database. Script logic is based on user related DB records existence. I check wether records exist or not simply by assigning variable:
$var(touser) = $dbr(touser=>[0,0]);
if ($var(touser) != $null) {
[...]
} else {
[...]
}
Above code works perfectly in Kamailio 4.0.3 and 4.0.4, but in 4.1.0 a zero is
assigned to $var(touser), so I had to change 'if' statement to
if ($var(touser) != 0) {
I consider this behavior as a bug, because "no value" should be represented by $null, not 0. Correct me if I am wrong.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=376
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.