Re: [reSIProcate] dum.addTransport not thread safe
On 2/23/06, Hong Yu <hyu@xxxxxxxxxxx> wrote:
> DialogUsageManager::addTransport calls SipStack::addTransport directly.
> If DUM and SipStack run in two separate threads, there is possibility
> that SipStack starts selecting on newly added transport before the
> transport is ready (i.e. before bind returns).
>
Current design assumes that either addTransport is called in the same
thread as SipStack (which implies you aren't using StackThread) or
that addTransport is only called before you start the StackThread.
> What's the best way to have addTransport executed within SipStack's
> thread? I'm thinking about posting an ApplicationMessage to SipStack's
> Fifo queue. But I haven't been able to figure out how to use
> ApplicationMessage yet. Any insight on this is appreciated.
>
That would work and is a good idea.