mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
pjsip_scheduler.c: Fix ao2 usage errors.
* Removed several invalid uses of OBJ_NOLOCK. These uses resulted in the 'tasks' container being accessed without a lock in a multi-threaded environment. A recipe for crashes. * Removed needlessly obtaining schtd object references. If the caller providing you a pointer to an object doesn't have a valid reference then you cannot safely get one from it. * Getting a ref to 'tasks' when you aren't copying the pointer into another location is useless. The 'tasks' container pointer is global. * Removed many unnecessary uses of RAII_VAR. * Make ast_sip_schedule_task() name parameter const. ASTERISK_26806 Change-Id: I5c62488e651314e2a1dbc01f5b078a15512d73db
This commit is contained in:
@@ -1673,7 +1673,7 @@ struct ast_sip_sched_task;
|
||||
*
|
||||
*/
|
||||
struct ast_sip_sched_task *ast_sip_schedule_task(struct ast_taskprocessor *serializer,
|
||||
int interval, ast_sip_task sip_task, char *name, void *task_data,
|
||||
int interval, ast_sip_task sip_task, const char *name, void *task_data,
|
||||
enum ast_sip_scheduler_task_flags flags);
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user