mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
Avoid dividing by zero with L() option to Dial()
Reported by: nicolasom
Patches:
issue-17995.patch - nicolasom (License #5994)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+1
-1
@@ -7175,7 +7175,7 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
|
||||
config->nexteventts = ast_tvadd(config->start_time, ast_samp2tv(config->timelimit, 1000));
|
||||
if ((caller_warning || callee_warning) && config->play_warning) {
|
||||
long next_warn = config->play_warning;
|
||||
if (time_left_ms < config->play_warning) {
|
||||
if (time_left_ms < config->play_warning && config->warning_freq > 0) {
|
||||
/* At least one warning was played, which means we are returning after feature */
|
||||
long warns_passed = (config->play_warning - time_left_ms) / config->warning_freq;
|
||||
/* It is 'warns_passed * warning_freq' NOT '(warns_passed + 1) * warning_freq',
|
||||
|
||||
Reference in New Issue
Block a user