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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Matthew Jordan 12 years ago
parent 3f2ff8594b
commit 8c5367226b

@ -864,13 +864,13 @@ int ast_app_group_list_unlock(void);
\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.

@ -709,13 +709,13 @@ static char *xmldoc_get_syntax_fun(struct ast_xml_node *rootnode, const char *ro
}
/* 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. */

Loading…
Cancel
Save