summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-11-27 20:21:57 +0000
committerKevin P. Fleming <kpfleming@digium.com>2007-11-27 20:21:57 +0000
commit5e6efa075aed70522030183ae17236d2f44ad6b8 (patch)
treea5d17471dac5ee910cde7f9fbde621b52e1133fe
parent062327c96024ee85035076202343b50e87382f31 (diff)
Merged revisions 89709 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89709 | kpfleming | 2007-11-27 14:16:56 -0600 (Tue, 27 Nov 2007) | 2 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@89721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/app.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/main/app.c b/main/app.c
index 13250f045..696b22c6f 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1622,11 +1622,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);
}