[sr-dev] Using t_suspend()/t_continue() multiple times on the same transaction

Peter Dunkley peter.dunkley at crocodile-rcs.com
Wed Mar 28 13:13:01 CEST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120328/60da96c8/attachment.htm>


More information about the sr-dev mailing list