[asterisk-commits] tilghman: branch 1.4 r53075 - in /branches/1.4:
./ funcs/func_strings.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Feb 1 13:09:53 MST 2007
Author: tilghman
Date: Thu Feb 1 14:09:52 2007
New Revision: 53075
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53075
Log:
Merged revisions 53074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r53074 | tilghman | 2007-02-01 14:07:35 -0600 (Thu, 01 Feb 2007) | 2 lines
Bug 8965
........
Modified:
branches/1.4/ (props changed)
branches/1.4/funcs/func_strings.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_strings.c?view=diff&rev=53075&r1=53074&r2=53075
==============================================================================
--- branches/1.4/funcs/func_strings.c (original)
+++ branches/1.4/funcs/func_strings.c Thu Feb 1 14:09:52 2007
@@ -46,8 +46,8 @@
static int function_fieldqty(struct ast_channel *chan, char *cmd,
char *parse, char *buf, size_t len)
{
- const char *varval;
- char *varval2 = NULL;
+ char *varname, *varsubst, varval[8192] = "", *varval2 = varval;
+ char *delim = ast_strdupa(data);
int fieldcount = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(varname);
@@ -56,9 +56,10 @@
AST_STANDARD_APP_ARGS(args, parse);
if (args.delim) {
- varval = pbx_builtin_getvar_helper(chan, args.varname);
- if (varval)
- varval2 = ast_strdupa(varval);
+ varsubst = alloca(strlen(varname) + 4);
+
+ sprintf(varsubst, "${%s}", varname);
+ pbx_substitute_variables_helper(chan, varsubst, varval, sizeof(varval) - 1);
while (strsep(&varval2, args.delim))
fieldcount++;
} else {
More information about the asterisk-commits
mailing list