aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-05 22:14:47 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-05 22:14:47 +0000
commit5d863dcd8db84fab3df37c0f32fb459fd1b94948 (patch)
treed0a0cdd179a04dcbd0276963e90f60f99ec14ab5 /main/channel.c
parent92ddfe0d818477e1872c7c7a3bdf5f5abf9da9e3 (diff)
Don't keep repeating the warning over and over when the end of the call is reached. (issue #8724 reported by xrg)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49675 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/main/channel.c b/main/channel.c
index 18a5b7805..e895d2783 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3864,13 +3864,9 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
if (callee_warning)
bridge_playfile(c1, c0, config->warning_sound, t);
}
- if (config->warning_freq) {
-
- if (time_left_ms > (config->warning_freq + 5000)) {
- nexteventts = ast_tvadd(nexteventts, ast_samp2tv(config->warning_freq, 1000));
- }
-
- } else
+ if (config->warning_freq && (time_left_ms > (config->warning_freq + 5000)))
+ nexteventts = ast_tvadd(nexteventts, ast_samp2tv(config->warning_freq, 1000));
+ else
nexteventts = ast_tvadd(config->start_time, ast_samp2tv(config->timelimit, 1000));
}
}