aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authordbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 20:03:42 +0000
committerdbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 20:03:42 +0000
commit238e462197946d7255dc32019cde299a2fd7d392 (patch)
tree4e81d8496e1b3d91d885ad4b8c3ae486bad9019f /apps
parent63e5bb01326a4efebeb674ebeabda247f8ab5ed9 (diff)
Fixing voicemail's error in checking max silence vs min message length
Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented as seconds. Also, the inequality was reversed. The warning, if triggered, was "Max silence should be less than minmessage or you may get empty messages", which should have been logged if max silence was greater than minmessage, but the check was for less than. Also, conforming if statement to coding guidelines. closes issue #15331) Reported by: markd Review: https://reviewboard.asterisk.org/r/293/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@203719 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9b05d2b3b..5625b01c8 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8510,7 +8510,7 @@ static int load_config(void)
if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
if (sscanf(s, "%d", &x) == 1) {
vmminmessage = x;
- if (maxsilence <= vmminmessage)
+ if (maxsilence / 1000 >= vmminmessage)
ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
} else {
ast_log(LOG_WARNING, "Invalid min message time length\n");