From ef81877139dde71949f53519fbc8decd296dcad3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 19 Jan 2009 16:53:51 +0000 Subject: [PATCH] no timers with 0 interval git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11280 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_time.c b/src/switch_time.c index ed717ee4be..94370f0b8d 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -238,7 +238,7 @@ static switch_status_t timer_init(switch_timer_t *timer) } } - if (globals.RUNNING != 1 || !globals.mutex) { + if (globals.RUNNING != 1 || !globals.mutex || timer->interval < 1) { return SWITCH_STATUS_FALSE; } @@ -255,7 +255,7 @@ static switch_status_t timer_init(switch_timer_t *timer) private_info->roll = TIMER_MATRIX[timer->interval].roll; private_info->ready = 1; - if (timer->interval < MS_PER_TICK) { + if (timer->interval > 0 && timer->interval < MS_PER_TICK) { MS_PER_TICK = timer->interval; }