< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

RE: [reSIProcate] dum.addTransport not thread safe


Hi Jason,

Can you shine some lights on ApplicationMessage? I've been poring over
the code and haven't figured out a way to use it yet.

Thanks,

Hong

-----Original Message-----
From: jason.fischl@xxxxxxxxx [mailto:jason.fischl@xxxxxxxxx] On Behalf
Of Jason Fischl
Sent: Thursday, February 23, 2006 3:13 PM
To: Hong Yu
Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: 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.