mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/sched.c
10
main/sched.c
@@ -252,8 +252,9 @@ static int sched_settime(struct timeval *tv, int when)
|
||||
int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable)
|
||||
{
|
||||
/* 0 means the schedule item is new; do not delete */
|
||||
if (old_id > 0)
|
||||
ast_sched_del(con, old_id);
|
||||
if (old_id > 0) {
|
||||
AST_SCHED_DEL(con, old_id);
|
||||
}
|
||||
return ast_sched_add_variable(con, when, callback, data, variable);
|
||||
}
|
||||
|
||||
@@ -295,8 +296,9 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal
|
||||
|
||||
int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data)
|
||||
{
|
||||
if (old_id > -1)
|
||||
ast_sched_del(con, old_id);
|
||||
if (old_id > -1) {
|
||||
AST_SCHED_DEL(con, old_id);
|
||||
}
|
||||
return ast_sched_add(con, when, callback, data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user