summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-04-24 17:20:41 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-04-24 17:20:41 +0000
commite3f569532f7a76f93f544c933a9daa6c299091e0 (patch)
treefc41629d5eb3d368537e350e3c8c133690e5296a /apps/app_voicemail.c
parent574e14cbea69b596a9a540b6401f2a087ec1e9ac (diff)
Deprecate prefixed options in voicemail
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 46a8b2cd7..659bd27d3 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5577,6 +5577,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
char *tmp;
struct leave_vm_options leave_options;
struct ast_flags flags = { 0 };
+ static int deprecate_warning = 0;
char *opts[OPT_ARG_ARRAY_SIZE];
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(argv0);
@@ -5617,19 +5618,30 @@ static int vm_exec(struct ast_channel *chan, void *data)
}
} else {
/* old style options parsing */
+ int old = 0;
+ char *orig_argv0 = args.argv0;
while (*(args.argv0)) {
- if (*(args.argv0) == 's')
+ if (*(args.argv0) == 's') {
+ old = 1;
ast_set_flag(&leave_options, OPT_SILENT);
- else if (*(args.argv0) == 'b')
+ } else if (*(args.argv0) == 'b') {
+ old = 1;
ast_set_flag(&leave_options, OPT_BUSY_GREETING);
- else if (*(args.argv0) == 'u')
+ } else if (*(args.argv0) == 'u') {
+ old = 1;
ast_set_flag(&leave_options, OPT_UNAVAIL_GREETING);
- else if (*(args.argv0) == 'j')
+ } else if (*(args.argv0) == 'j') {
+ old = 1;
ast_set_flag(&leave_options, OPT_PRIORITY_JUMP);
- else
+ } else
break;
(args.argv0)++;
}
+ if (!deprecate_warning && old) {
+ deprecate_warning = 1;
+ ast_log(LOG_WARNING, "Prefixing the mailbox with an option is deprecated ('%s').\n", orig_argv0);
+ ast_log(LOG_WARNING, "Please move all leading options to the second argument.\n");
+ }
}
} else {
char tmp[256];