[reSIProcate] TransactionState::processStateless() should not assert in stateful timer case

Scott Godin sgodin at sipspectrum.com
Mon May 19 12:06:05 CDT 2014


Hi John,

I appreciate all the contributions, I can't keep up to you.  :)  I'll look
at all these when I can get some free cycles.  In the meantime, can you
please post patch files, instead of entire source files.  This will make it
easier to tell exactly what you changed when going to modify the code in
SVN main line.

https://ariejan.net/2007/07/03/how-to-create-and-apply-a-patch-with-subversion/

Thanks,
Scott


On Mon, May 19, 2014 at 12:47 PM, John Gregg <jgregg at aylus.com> wrote:

>
> This is a change my company has seen fit to make to the resiprocate source
> code in 1.9.6 in TransactionState.cxx.
>
> In TransactionState::processStateless(), if a timer fired, and it is not
> stateless, the code asserts. This could happen, however, if the other side
> of the connection sends something wrong. You certainly don't want to
> provide a way of allowing the other end of the connection to crash your
> code on demand. The comment we put in explains the situation in more detail
> below (modified source file attached). We saw this when we receive a
> REGISTER, we send a 200 OK, and the other guy then (wrongly) sends an ACK.
> Note that we found this problem in version 1.7.1 and have ported it forward
> to 1.9.6.
>
>    else if (isTimer(message))
>    {
>       TimerMessage* timer = dynamic_cast<TimerMessage*>(message);
>       if (timer->getType() == Timer::TimerStateless)
>       {
>          delete message;
>          delete this;
>       }
>       else
>       {
>          // AYLUS_CHANGE: if the client (wrongly) sends an ACK in response
> to a response on a non-INVITE
>          // transaction (like a registration), resiprocate will create a
> stateless TransactionState
>          // to handle it, but some timers running against the old, dead
> TransactionState will still
>          // be out there with the same tid. When they fire, we will hit
> this. Don't assert.
>
>          InfoLog(<< "got timer " << *timer << " for stateless transaction
> " << *this);
>          delete timer;
>          //         assert(0);
>       }
>    }
>
> -John Gregg
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140519/2811e950/attachment.htm>


More information about the resiprocate-devel mailing list