]> 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:15:10 +0000 (17:15 -0500)
commitdfdc9a257535e73964ed873454080147a057d647
tree52215e67e1aadeb30e426fb223c45e2c736471b2
parent264af6bec0e15a2befe3d2dcadad4827bb41c2f1
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