Hello,

I have been using it only once and didn't looked much deeper into the code.

Maybe Miklos (cc-ed) can give faster more details, afaik he is the developer of that piece.

Cheers,
Daniel

On 3/28/12 1:13 PM, Peter Dunkley wrote:
Hi,

I am trying to use t_suspend()/t_continue() multiple times on the same transaction.  Calling t_suspend() more than once works, but the second time I call t_continue() the transaction is killed and a 500 response is sent.  It is the "if (branch == t->nr_of_outgoings)" check from the code fragment below (from t_suspend.c:t_continue()) that results in the transaction being killed - you can see the debug/error line I added to determine this in the fragment.

Is using t_suspend()/t_continue() multiple times something that should work?

Thanks,

Peter

        if (t->uas.status < 200) {
                /* No final reply has been sent yet.
                 * Check whether or not there is any pending branch.
                 */
                for (   branch = 0;
                        branch < t->nr_of_outgoings;
                        branch++
                ) {
                        if ((t->uac[branch].request.buffer != NULL)
                                && (t->uac[branch].last_received < 200)
                        )
                                break;
                }

                if (branch == t->nr_of_outgoings) {
                        /* There is not any open branch so there is
                         * no chance that a final response will be received. */
                        ret = 0;
                        LM_ERR("branch == t->nr_of_outgoings\n");
                        goto kill_trans;
                }
        }

-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/