]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip_scheduler.c: Fix some corner cases.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 22 Mar 2018 00:43:21 +0000 (19:43 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 12 Apr 2018 22:34:16 +0000 (17:34 -0500)
commitc2f85e881de51578ec2eab2978126d59ba6c8cc0
tree1f7b0115fd3b0b3fd6fa514a58bf2f5c10dbe8ae
parent3c5d76863bc3178d8e2ac5ea64386f8027046b75
pjsip_scheduler.c: Fix some corner cases.

* Fix the periodic interval wander because it may take significant time
between the sched thread queueing the task in the serializer and the
serializer actually executing the task.  The time it takes to actually
execute the task was already taken into account.

* Pass a schtd ref to the serializer when we queue a scheduled task on
the serializer.  We don't want it going away on us while it is in the
serializer queue.

* Skip the scheduled task if the task was canceled between queueing the
task to the serializer and the serializer actually executing the task.

* Reorder struct ast_sip_sched_task to avoid unnecessary padding.  Removed
task_id and added next_periodic.

* Hold a ref to the passed in serializer so the serializer cannot go away
on the scheduled task.

ASTERISK_26806

Change-Id: I6c8046b75f6953792c8c30e55b836a4291143f24
include/asterisk/res_pjsip.h
res/res_pjsip/pjsip_scheduler.c