summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-09-16 15:32:00 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-09-16 15:32:00 +0000
commit6c97fd4cb41b70f326cc39f73f7e7bd72241fa4a (patch)
treedd9c7f47e7f3daac4e7af573b63814bc57bbab54 /apps/app_voicemail.c
parent6a98adc357d2e6d6612d9b850f577080f614869d (diff)
Option maxmessage should be maxsecs per-folder, too (closes issue #10729)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index fc4b4bff8..9bb3e9f8e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -734,20 +734,22 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
ast_copy_string(vmu->dialout, value, sizeof(vmu->dialout));
} else if (!strcasecmp(var, "exitcontext")) {
ast_copy_string(vmu->exit, value, sizeof(vmu->exit));
- } else if (!strcasecmp(var, "maxmessage")) {
+ } else if (!strcasecmp(var, "maxmessage") || !strcasecmp(var, "maxsecs")) {
if (vmu->maxsecs <= 0) {
- ast_log(LOG_WARNING, "Invalid max message length of %s. Using global value %i\n", value, vmmaxsecs);
+ ast_log(LOG_WARNING, "Invalid max message length of %s. Using global value %d\n", value, vmmaxsecs);
vmu->maxsecs = vmmaxsecs;
} else {
vmu->maxsecs = atoi(value);
}
+ if (!strcasecmp(var, "maxmessage"))
+ ast_log(LOG_WARNING, "Option 'maxmessage' has been deprecated in favor of 'maxsecs'. Please make that change in your voicemail config.\n");
} else if (!strcasecmp(var, "maxmsg")) {
vmu->maxmsg = atoi(value);
if (vmu->maxmsg <= 0) {
- ast_log(LOG_WARNING, "Invalid number of messages per folder maxmsg=%s. Using default value %i\n", value, MAXMSG);
+ ast_log(LOG_WARNING, "Invalid number of messages per folder maxmsg=%s. Using default value %d\n", value, MAXMSG);
vmu->maxmsg = MAXMSG;
} else if (vmu->maxmsg > MAXMSGLIMIT) {
- ast_log(LOG_WARNING, "Maximum number of messages per folder is %i. Cannot accept value maxmsg=%s\n", MAXMSGLIMIT, value);
+ ast_log(LOG_WARNING, "Maximum number of messages per folder is %d. Cannot accept value maxmsg=%s\n", MAXMSGLIMIT, value);
vmu->maxmsg = MAXMSGLIMIT;
}
} else if (!strcasecmp(var, "volgain")) {