forked from Mirrors/freeswitch
no timers with 0 interval
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11280 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
87ebaded7e
commit
ef81877139
@ -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;
|
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->roll = TIMER_MATRIX[timer->interval].roll;
|
||||||
private_info->ready = 1;
|
private_info->ready = 1;
|
||||||
|
|
||||||
if (timer->interval < MS_PER_TICK) {
|
if (timer->interval > 0 && timer->interval < MS_PER_TICK) {
|
||||||
MS_PER_TICK = timer->interval;
|
MS_PER_TICK = timer->interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user