From 4f474f2a94417813a84cf7be531e31943926e2b3 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 27 Nov 2007 19:36:55 +0000 Subject: [PATCH] generate a warning when an application option that requires an argument is ignored due to lack of an argument git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89701 614ede4d-c843-0410-af14-a771ab80d22e --- main/app.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main/app.c b/main/app.c index d64a50373..fd3de0d9b 100644 --- a/main/app.c +++ b/main/app.c @@ -1410,8 +1410,11 @@ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags } else if (argloc) { args[argloc - 1] = NULL; } - if (!argloc || !ast_strlen_zero(args[argloc - 1])) - ast_set_flag(flags, options[curarg].flag); + if (argloc && ast_strlen_zero(args[argloc - 1])) { + ast_log(LOG_WARNING, "Argument supplied for option '%c' was empty, option ignored.\n", curarg); + continue; + } + ast_set_flag(flags, options[curarg].flag); } return res; -- 2.11.4.GIT