summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2018-03-21 19:43:21 -0500
committerRichard Mudgett <rmudgett@digium.com>2018-04-12 17:34:16 -0500
commitc2f85e881de51578ec2eab2978126d59ba6c8cc0 (patch)
tree1f7b0115fd3b0b3fd6fa514a58bf2f5c10dbe8ae /include
parent3c5d76863bc3178d8e2ac5ea64386f8027046b75 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_pjsip.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index d3849ad34..b01d6f5d0 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -1407,7 +1407,7 @@ struct ast_sip_endpoint *ast_sip_get_artificial_endpoint(void);
* the next item on the SIP socket(s) can be serviced. On incoming messages,
* Asterisk automatically will push the request to a servant thread. When your
* module callback is called, processing will already be in a servant. However,
- * for other PSJIP events, such as transaction state changes due to timer
+ * for other PJSIP events, such as transaction state changes due to timer
* expirations, your module will be called into from a PJSIP thread. If you
* are called into from a PJSIP thread, then you should push whatever processing
* is needed to a servant as soon as possible. You can discern if you are currently
@@ -1588,13 +1588,13 @@ enum ast_sip_scheduler_task_flags {
/*!
* Run at a fixed interval.
- * Stop scheduling if the callback returns 0.
+ * Stop scheduling if the callback returns <= 0.
* Any other value is ignored.
*/
AST_SIP_SCHED_TASK_FIXED = (0 << 0),
/*!
* Run at a variable interval.
- * Stop scheduling if the callback returns 0.
+ * Stop scheduling if the callback returns <= 0.
* Any other return value is used as the new interval.
*/
AST_SIP_SCHED_TASK_VARIABLE = (1 << 0),