[OpenSIPS-Users] Next branches error

Andrew Mortensen admorten at isc.upenn.edu
Thu Feb 3 16:14:24 CET 2011


On Feb 2, 2011, at 4:51 PM, Bogdan-Andrei Iancu wrote:

> Hi Brett,
> 
> The error log you get is triggered when the internal function "next_branches" returns false (a negative code). This is when:
>   - function called from wrong route type (like for a reply)
>   - there are no more branches left
>   - internal error
> 
> I guess in your case, the second case (when there are no more branches) is the trigger. And indeed, in this case, the error message is bogus  - we need to fix that.

Here's one possible solution for consideration.

diff --git a/serialize.c b/serialize.c
index 7b16055..837c321 100644
--- a/serialize.c
+++ b/serialize.c
@@ -273,7 +273,7 @@ int next_branches( struct sip_msg *msg)
 
        if (!avp) {
                LM_DBG("no AVPs -- we are done!\n");
-               goto error;
+               return 2;
        }
 
        if (!val.s.s) {


More information about the Users mailing list