aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authordbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 20:16:24 +0000
committerdbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 20:16:24 +0000
commitb5394bd2e8f12a3b59642610c9e160bb47e55723 (patch)
tree1d82b1920b6d5d906df86040133ecb33ca26f032 /apps
parent4b37548702e85ff62568d69bbffc86dd08249d07 (diff)
Merged revisions 203721 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r203721 | dbrooks | 2009-06-26 15:13:51 -0500 (Fri, 26 Jun 2009) | 16 lines 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.6.0@203722 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index d7f07793f..45739e43b 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -9380,8 +9380,9 @@ static int load_config(int reload)
if ((val = ast_variable_retrieve(cfg, "general", "minsecs"))) {
if (sscanf(val, "%d", &x) == 1) {
vmminsecs = x;
- if (maxsilence <= vmminsecs)
+ if (maxsilence / 1000 >= vmminsecs) {
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");
}
@@ -9393,8 +9394,9 @@ static int load_config(int reload)
}
if (sscanf(val, "%d", &x) == 1) {
vmminsecs = x;
- if (maxsilence <= vmminsecs)
+ if (maxsilence / 1000 >= vmminsecs) {
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");
}