[asterisk-commits] kpfleming: trunk r89588 - in /trunk: ./ apps/app_controlplayback.c main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 26 11:21:38 CST 2007
Author: kpfleming
Date: Mon Nov 26 11:21:37 2007
New Revision: 89588
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89588
Log:
Merged revisions 89586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89586 | kpfleming | 2007-11-26 11:20:36 -0600 (Mon, 26 Nov 2007) | 2 lines
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:
trunk/ (props changed)
trunk/apps/app_controlplayback.c
trunk/main/app.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_controlplayback.c?view=diff&rev=89588&r1=89587&r2=89588
==============================================================================
--- trunk/apps/app_controlplayback.c (original)
+++ trunk/apps/app_controlplayback.c Mon Nov 26 11:21:37 2007
@@ -124,7 +124,7 @@
if (args.options) {
ast_app_parse_options(cpb_opts, &opts, opt_args, args.options);
- if (ast_test_flag(&opts, OPT_OFFSET) && !ast_strlen_zero(opt_args[OPT_ARG_OFFSET]))
+ if (ast_test_flag(&opts, OPT_OFFSET))
offsetms = atol(opt_args[OPT_ARG_OFFSET]);
}
Modified: trunk/main/app.c
URL: http://svn.digium.com/view/asterisk/trunk/main/app.c?view=diff&rev=89588&r1=89587&r2=89588
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Mon Nov 26 11:21:37 2007
@@ -1608,7 +1608,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 */
@@ -1625,6 +1624,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