diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-27 20:16:56 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-27 20:16:56 +0000 |
commit | 59e459388b9c146fbb8be75fef02e0d35cc624e9 (patch) | |
tree | e2fcebf190ae016a696d2695cc1856e3124bd137 /main/app.c | |
parent | 6390a09a2edc4e31d2d2d2ad405cec7474bccc35 (diff) |
on second thought... revert all the other changes i've made in app options parsing leaving only one: if an empty argument is supplied for an option, set that argument pointer to point to an empty string rather than NULL, so that the application can do normal checks on it without worrying about it being NULL
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89709 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/main/app.c b/main/app.c index fd3de0d9b..d59f1d1cc 100644 --- a/main/app.c +++ b/main/app.c @@ -1408,11 +1408,7 @@ int ast_app_parse_options(const struct ast_app_option *options, struct ast_flags break; } } else if (argloc) { - args[argloc - 1] = NULL; - } - if (argloc && ast_strlen_zero(args[argloc - 1])) { - ast_log(LOG_WARNING, "Argument supplied for option '%c' was empty, option ignored.\n", curarg); - continue; + args[argloc - 1] = ""; } ast_set_flag(flags, options[curarg].flag); } |