From 121a4d8c71122f074fd5e71eefd6606cc1b28d93 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sat, 18 Jun 2005 17:18:02 +0000 Subject: [PATCH] Fix timelimit bug (bug #4552) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5936 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/channel.c b/channel.c index 08befad43c..b04017b0b0 100755 --- a/channel.c +++ b/channel.c @@ -2858,8 +2858,10 @@ static int ast_generic_bridge(int *playitagain, int *playit, struct timeval *sta time_left_ms = config->timelimit - elapsed_ms; if (*playitagain && ((ast_test_flag(&(config->features_caller), AST_FEATURE_PLAY_WARNING)) || (ast_test_flag(&(config->features_callee), AST_FEATURE_PLAY_WARNING))) && (config->play_warning && time_left_ms <= config->play_warning)) { - res = -3; - break; + if (config->warning_freq == 0 || time_left_ms == config->play_warning || (time_left_ms % config->warning_freq) <= 50) { + res = -3; + break; + } } if (time_left_ms <= 0) { res = -3;