[OpenSER-Devel] [ openser-Bugs-1805622 ] serialize_branches() after exec_dset not working

SourceForge.net noreply at sourceforge.net
Tue Oct 23 10:29:22 CEST 2007


Bugs item #1805622, was opened at 2007-10-01 15:35
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1805622&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
>Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Marcello Lupo (hunters_wolf)
>Assigned to: Bogdan (bogdan_iancu)
Summary: serialize_branches() after exec_dset not working

Initial Comment:
After execution of exec_dset i get in output:

sip:123456 at 10.10.10.1:5062;q=0.2
sip:123456 at 10.10.10.10:5060;q=0.1

$ds become : Contact: sip:123456 at 10.10.10.1:5062;q=0.2, sip:123456 at 10.10.10.10:5060;q=0.1

RURI become: sip:123456 at 10.10.10.1:5062;q=0.2

$bR become: sip:123456 at 10.10.10.10:5060;q=0.1 

All seem to be fine but when i run serialize_branches() i get:

DEBUG:serialize_branches: nothing to do - all same q!

And the branches are not serialized.

I tested it with qvalue as:

q=1.0
q=0.1
q=1 

both with \n and \r\n at the end of lines and serialize_branches() give me all the time the same result.

I tested the exec_dset without the serialize_branches() and it is working correctly going in parallel forking to
the 2 gateways in parallel. So I'm sure that branches are correct.
It seems to be really a serialize_branches() bug. 

Let me know,
Thanks,
Bye,
Marcello


----------------------------------------------------------------------

>Comment By: Bogdan (bogdan_iancu)
Date: 2007-10-23 11:29

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi,

Thanks for report - I will take a look on this.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Marcello Lupo (hunters_wolf)
Date: 2007-10-03 00:59

Message:
Logged In: YES 
user_id=1902881
Originator: YES

I found 2 issues on this.

1) Digging in the source code I found in the cfg.y that grammar for
append_branch is valid in this way:

append_branch("","")  and i didn't found any documentation on it. It wants
the qvalue as a separated field.

If i pass value with append_branch in this way:

append_branch("sip:123456 at 10.0.0.1:5062","0.3");
append_branch("sip:123456 at 10.0.0.2:5060","0.2");
append_branch("sip:123456 at 10.0.0.3:5060","0.1");
serialize_branches();

It works.

2) The bug matter is that in the exec_dset is not possible to have the
same behavior because it use the standard
append_branch function in this way (exec.c line 172) :

if (append_branch(msg, &uri, 0, 0, Q_UNSPECIFIED, 0, 0)==-1) {
        LOG(L_ERR, "ERROR: exec_str: append_branch failed;"
                " too many or too long URIs?\n");
        goto error02;
}


It pass the qvalue as Q_UNSPECIFIED to append_branch. This is the reason
it is not working. It is not considering the qvalue in the URI at all.
I think a solution can be to parse the lines received form exec_dset with
a check on the  line for a  q= match and take the
value, or much more simple, assume that lines should be considered
returned by exec_dset in order of q value already and let the
funtion to populate it with a FOR cycle. The second method cannot be
applied if you want to have parallel forking obviously.
I will try to patch it by myself but if someone can help me it will be
very appreciated because i'm not a C coder.

If you are interested on it please follow all the thread :
"serialize_branches seems to be not working" on openser user list.
Thanks,
Bye,
Marcello


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1805622&group_id=139143



More information about the Devel mailing list