[svn-commits] tilghman: trunk r53071 - in /trunk: ./ funcs/func_strings.c main/pbx.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Feb 1 12:27:23 MST 2007


Author: tilghman
Date: Thu Feb  1 13:27:22 2007
New Revision: 53071

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53071
Log:
Merged revisions 53070 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r53070 | tilghman | 2007-02-01 13:21:20 -0600 (Thu, 01 Feb 2007) | 10 lines

Merged revisions 53069 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r53069 | tilghman | 2007-02-01 13:13:53 -0600 (Thu, 01 Feb 2007) | 2 lines

No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong

........

................

Modified:
    trunk/   (props changed)
    trunk/funcs/func_strings.c
    trunk/main/pbx.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?view=diff&rev=53071&r1=53070&r2=53071
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Thu Feb  1 13:27:22 2007
@@ -48,7 +48,8 @@
 static int function_fieldqty(struct ast_channel *chan, const char *cmd,
 			     char *parse, char *buf, size_t len)
 {
-	char *varval;
+	const char *varval;
+	char *varval2 = NULL;
 	int fieldcount = 0;
 	AST_DECLARE_APP_ARGS(args,
 			     AST_APP_ARG(varname);
@@ -57,7 +58,6 @@
 
 	AST_STANDARD_APP_ARGS(args, parse);
 	if (args.delim) {
-		pbx_retrieve_variable(chan, args.varname, &varval, buf, len, NULL);
 		if (args.delim[0] == '\\') {
 			if (args.delim[1] == 'n')
 				ast_copy_string(args.delim, "\n", 2);
@@ -68,7 +68,10 @@
 			else
 				ast_copy_string(args.delim, "-", 2);
 		}
-		while (strsep(&varval, args.delim))
+		varval = pbx_builtin_getvar_helper(chan, args.varname);
+		if (varval)
+			varval2 = ast_strdupa(varval);
+		while (strsep(&varval2, args.delim))
 			fieldcount++;
 	} else {
 		fieldcount = 1;

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=53071&r1=53070&r2=53071
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Feb  1 13:27:22 2007
@@ -1097,7 +1097,7 @@
 	return ret;
 }
 
-/*! \brief  Support for Asterisk built-in variables and functions in the dialplan
+/*! \brief  Support for Asterisk built-in variables in the dialplan
 
 \note	See also
 	- \ref AstVar	Channel variables



More information about the svn-commits mailing list