[asterisk-commits] tilghman: trunk r81390 - /trunk/main/sched.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 30 15:31:46 CDT 2007
Author: tilghman
Date: Thu Aug 30 15:31:45 2007
New Revision: 81390
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81390
Log:
A schedule id of 0 is not possible and is used to flag that we want to add a new item
Modified:
trunk/main/sched.c
Modified: trunk/main/sched.c
URL: http://svn.digium.com/view/asterisk/trunk/main/sched.c?view=diff&rev=81390&r1=81389&r2=81390
==============================================================================
--- trunk/main/sched.c (original)
+++ trunk/main/sched.c Thu Aug 30 15:31:45 2007
@@ -209,7 +209,8 @@
int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, void *data, int variable)
{
- if (old_id > -1)
+ /* 0 means the schedule item is new; do not delete */
+ if (old_id > 0)
ast_sched_del(con, old_id);
return ast_sched_add_variable(con, when, callback, data, variable);
}
More information about the asterisk-commits
mailing list