[asterisk-commits] mjordan: trunk r384452 - in /trunk: include/asterisk/app.h main/xmldoc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 1 09:44:33 CDT 2013
Author: mjordan
Date: Mon Apr 1 09:44:30 2013
New Revision: 384452
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384452
Log:
Make appropriate items parse using '|' instead of ','
This patch fixes a bug introduced in r76703, wherein Asterisk could only parse
arguments in the so-called 'recommended' way, e.g., NoOp(foo,bar). The proper
syntax of NoOp,foo|bar is now parsed correctly.
Modified:
trunk/include/asterisk/app.h
trunk/main/xmldoc.c
Modified: trunk/include/asterisk/app.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/app.h?view=diff&rev=384452&r1=384451&r2=384452
==============================================================================
--- trunk/include/asterisk/app.h (original)
+++ trunk/include/asterisk/app.h Mon Apr 1 09:44:30 2013
@@ -864,13 +864,13 @@
\param parse A modifiable buffer containing the input to be parsed
This function will separate the input string using the standard argument
- separator character ',' and fill in the provided structure, including
+ separator character '|' and fill in the provided structure, including
the argc argument counter field.
*/
#define AST_STANDARD_APP_ARGS(args, parse) \
- args.argc = __ast_app_separate_args(parse, ',', 1, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+ args.argc = __ast_app_separate_args(parse, '|', 1, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
#define AST_STANDARD_RAW_ARGS(args, parse) \
- args.argc = __ast_app_separate_args(parse, ',', 0, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+ args.argc = __ast_app_separate_args(parse, '|', 0, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
/*!
\brief Performs the 'nonstandard' argument separation process for an application.
Modified: trunk/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/xmldoc.c?view=diff&rev=384452&r1=384451&r2=384452
==============================================================================
--- trunk/main/xmldoc.c (original)
+++ trunk/main/xmldoc.c Mon Apr 1 09:44:30 2013
@@ -709,13 +709,13 @@
}
/* Get the argument separator from the root node attribute name 'argsep', if not found
- defaults to ','. */
+ defaults to '|'. */
attrargsep = ast_xml_get_attribute(rootnode, "argsep");
if (attrargsep) {
argsep = ast_strdupa(attrargsep);
ast_xml_free_attr(attrargsep);
} else {
- argsep = ast_strdupa(",");
+ argsep = ast_strdupa("|");
}
/* Get order of evaluation. */
More information about the asterisk-commits
mailing list