[OpenSER-Devel] [ openser-Bugs-1599656 ] next_branches fails if no AVP's are set
SourceForge.net
noreply at sourceforge.net
Wed Dec 5 18:22:33 UTC 2007
Bugs item #1599656, was opened at 2006-11-20 14:06
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1599656&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 1.1.x
Status: Open
Resolution: None
>Priority: 2
Private: No
Submitted By: axlh (axlh)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: next_branches fails if no AVP's are set
Initial Comment:
The new core function next_branches should, according to the message on -devel from Bogdan-Andrei Iancu, be compatible with next_contacts. The behaviour is different though. next_branches returns false if no AVP's are set with serialize_branches while next_contacts returns true.
Quoting the example in the message from Bogdan-Andrei Iancu:
1) enum doing serial forking:
{
.....
enum_query("e164.arpa.","voice");
serialize_branches(1);
if (!next_branches()) {
sl_send_reply(...no enum found...);
exit;
}
t_on_failure("1");
t_relay();
}
failure_route[1] {
if (next_branches()) {
t_relay();
}
}
The first next_branches above will fail if enum_query returns exactly 1 result, as serialize_branches will do 'nothing' and the AVP stays empty.
I think next_branches should also return true in that case.
----------------------------------------------------------------------
Comment By: axlh (axlh)
Date: 2006-12-07 19:09
Message:
Logged In: YES
user_id=1212856
Originator: YES
My patch was not enough to fix this issue. next_branches in failure_route
still behaves differently as next_contacts.
----------------------------------------------------------------------
Comment By: axlh (axlh)
Date: 2006-11-21 15:32
Message:
Logged In: YES
user_id=1212856
Originator: YES
The following patch (against 1.1.0) fixes the issue for me and matches the
behaviour of next_contacts from the lcr module.
--- openser-1.1.0-orig/serialize.c 2006-05-07 22:48:51.000000000
+0200
+++ openser-1.1.0/serialize.c 2006-11-21 14:27:34.000000000 +0100
@@ -191,7 +191,11 @@
avp = search_first_avp( 0, (int_str)serial_avp_id, &val, 0);
if (!avp) {
DBG("DEBUG:next_branches: no AVPs -- we are done!\n");
- goto error;
+ if ( route_type == REQUEST_ROUTE) {
+ return 0;
+ } else {
+ goto error;
+ }
}
if ( route_type == REQUEST_ROUTE) {
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1599656&group_id=139143
More information about the Devel
mailing list