diff options
Diffstat (limited to 'main/sched.c')
-rw-r--r-- | main/sched.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/sched.c b/main/sched.c index 0d5968954..88a259b40 100644 --- a/main/sched.c +++ b/main/sched.c @@ -195,6 +195,7 @@ static int sched_settime(struct timeval *tv, int when) *tv = now; *tv = ast_tvadd(*tv, ast_samp2tv(when, 1000)); if (ast_tvcmp(*tv, now) < 0) { + ast_debug(1, "Request to schedule in the past?!?!\n"); *tv = now; } return 0; @@ -215,9 +216,11 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal { struct sched *tmp; int res = -1; - DEBUG(ast_debug(1, "ast_sched_add()\n")); - + if (!when) { + ast_log(LOG_NOTICE, "Scheduled event in 0 ms?\n"); + return -1; + } ast_mutex_lock(&con->lock); if ((tmp = sched_alloc(con))) { tmp->id = con->eventcnt++; @@ -239,7 +242,6 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal ast_sched_dump(con); #endif ast_mutex_unlock(&con->lock); - return res; } |