Re: [PATCH] PJSIP: Don't sleep after error in pj_ioqueue_poll().

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

 



Hi Kal,

We have committed the patch, with some modifications, in ticket #2048
(https://trac.pjsip.org/repos/ticket/2048). Thanks for the patch and
the discussion that followed.

Best regards,
Ming

On Wed, Sep 27, 2017 at 4:27 PM, Ming <ming@xxxxxxxxx> wrote:
> Hi Kal,
>
> We're thinking to reduce the delay to max 10 ms instead of removing it
> completely. This should allow for error recovery. Please let us know
> your opinion/feedback. Patch attached.
>
> Regards,
> Ming
>
> On Wed, Sep 27, 2017 at 4:00 AM, b17 c0de <b17c0de@xxxxxxxxx> wrote:
>> Hi PJ peeps,
>> Please apply this patch which removes the pj_thread_sleep() call from
>> pjsip_endpt_handle_events2(). I think it makes more sense just to
>> return the error to the user immediately and let them decide if they
>> want to sleep (like pjsua-lib does).
>>
>> One concrete case when this sleep is problematic is when a signal
>> occurs. In this case, the call to pj_ioqueue_poll() will return
>> because of EINTR which will cause the main loop to additionally sleep
>> for the full timeout. This means, if pjsip_endpt_handle_events2() is
>> called with a large timeout, the signal/interrupt will block the app
>> for the full timeout interval if a signal happens. This is a problem.
>>
>> Thanks,
>> Kal
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@xxxxxxxxxxxxxxx
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[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