pjsip freeze problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/19/08, Anshuman S. Rawat <arawat at 3clogic.com> wrote:
> I will give that a try but I had tried the same from our sip phone
>  application (a layer above pjsua_lib)
>  with same results. There, depending on the error code, I started the timer
>  (with callback func in the same layer)
>  and performed a fresh registration every time. It crashed everytime I
>  started the timer after receiving a 4xx response.
>

There are few things to watch for:
 - make sure the pool (from which the timer entry is allocated from)
remains valid until the timer expires
 - make sure the timer is not currently being scheduled before you
re-schedule it (you can use timer.id field for this purpose).
 - although timer heap object is thread safe, access to your timer
entry is not (e.g., registration callback may be called while you're
processing a timer callback). So make sure your application protects
access to the timer entry where required.

>  Just to be sure, is any timer initialization needed before calling
>  pjsip_endpt_schedule_timer() ?
>

Calling pj_timer_entry_init() is sufficient to initialize the timer entry.

Cheers,
 -benny


>  Thanks,
>  Anshuman



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux