aboutsummaryrefslogtreecommitdiffstats
path: root/main/features.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-18 22:31:25 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-18 22:31:25 +0000
commit93d780894810f0460892af0529d9c6f8fe517338 (patch)
tree07b772f4a93f6e959ccf10510fee364dd143f4f6 /main/features.c
parentce857ad4e1f48d742ab491d0170d97d23ec3814f (diff)
Extend max call limit duration from 24.8 days to 292+ million years.
If the limit was set past MAX_INT upon answering, the call was immediately hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup). The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been changed to return an int64_t to prevent overflow. Also the reporter suggested adding a message indicating the reason for the call hanging up. Given that the new limit is so much higher, the message (which would only really be useful in the overflow scenario) has been made a debug message only. (closes issue #16006) Reported by: viraptor git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241143 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/features.c b/main/features.c
index 3e8255de6..36c90dadb 100644
--- a/main/features.c
+++ b/main/features.c
@@ -4923,12 +4923,12 @@ int ast_bridge_timelimit(struct ast_channel *chan, struct ast_bridge_config *con
config->timelimit = play_to_caller = play_to_callee =
config->play_warning = config->warning_freq = 0;
} else {
- ast_verb(3, "Limit Data for this call:\n");
- ast_verb(4, "timelimit = %ld\n", config->timelimit);
- ast_verb(4, "play_warning = %ld\n", config->play_warning);
+ ast_verb(4, "Limit Data for this call:\n");
+ ast_verb(4, "timelimit = %ld ms (%.3lf s)\n", config->timelimit, config->timelimit / 1000.0);
+ ast_verb(4, "play_warning = %ld ms (%.3lf s)\n", config->play_warning, config->play_warning / 1000.0);
ast_verb(4, "play_to_caller = %s\n", play_to_caller ? "yes" : "no");
ast_verb(4, "play_to_callee = %s\n", play_to_callee ? "yes" : "no");
- ast_verb(4, "warning_freq = %ld\n", config->warning_freq);
+ ast_verb(4, "warning_freq = %ld ms (%.3lf s)\n", config->warning_freq, config->warning_freq / 1000.0);
ast_verb(4, "start_sound = %s\n", S_OR(config->start_sound, ""));
ast_verb(4, "warning_sound = %s\n", config->warning_sound);
ast_verb(4, "end_sound = %s\n", S_OR(config->end_sound, ""));