summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-06-18 17:18:02 +0000
committerMark Spencer <markster@digium.com>2005-06-18 17:18:02 +0000
commit121a4d8c71122f074fd5e71eefd6606cc1b28d93 (patch)
treede4de81326f1ba68f8699a35255264288387373c /channel.c
parent02998cb28597844e25fadd61dd23b21cfa7a48ed (diff)
Fix timelimit bug (bug #4552)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channel.c b/channel.c
index 08befad43..b04017b0b 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;