Archived
14
0
Fork 0

Merged revisions 89701 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89701 | kpfleming | 2007-11-27 13:36:55 -0600 (Tue, 27 Nov 2007) | 2 lines

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/trunk@89704 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
kpfleming 2007-11-27 19:47:19 +00:00
parent 13d6371f2b
commit 094b009478

View file

@ -1624,8 +1624,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;