[asterisk-commits] kpfleming: branch 1.4 r89586 - /branches/1.4/main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 26 11:20:36 CST 2007
Author: kpfleming
Date: Mon Nov 26 11:20:36 2007
New Revision: 89586
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89586
Log:
when parsing application options that take arguments, don't indicate that the option was supplied unless a non-zero-length argument was found for it
Modified:
branches/1.4/main/app.c
Modified: branches/1.4/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/app.c?view=diff&rev=89586&r1=89585&r2=89586
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Mon Nov 26 11:20:36 2007
@@ -1394,7 +1394,6 @@
s = optstr;
while (*s) {
curarg = *s++ & 0x7f; /* the array (in app.h) has 128 entries */
- ast_set_flag(flags, options[curarg].flag);
argloc = options[curarg].arg_index;
if (*s == '(') {
/* Has argument */
@@ -1411,6 +1410,8 @@
} else if (argloc) {
args[argloc - 1] = NULL;
}
+ if (!argloc || !ast_strlen_zero(args[argloc - 1]))
+ ast_set_flag(flags, options[curarg].flag);
}
return res;
More information about the asterisk-commits
mailing list