[asterisk-commits] tilghman: branch 1.4 r53070 - in /branches/1.4: ./ funcs/ main/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 1 12:21:21 MST 2007


Author: tilghman
Date: Thu Feb  1 13:21:20 2007
New Revision: 53070

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53070
Log:
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:
    branches/1.4/   (props changed)
    branches/1.4/funcs/func_strings.c
    branches/1.4/main/pbx.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=53070&r1=53069&r2=53070
==============================================================================
--- branches/1.4/funcs/func_strings.c (original)
+++ branches/1.4/funcs/func_strings.c Thu Feb  1 13:21:20 2007
@@ -46,7 +46,8 @@
 static int function_fieldqty(struct ast_channel *chan, 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);
@@ -55,8 +56,10 @@
 
 	AST_STANDARD_APP_ARGS(args, parse);
 	if (args.delim) {
-		pbx_retrieve_variable(chan, args.varname, &varval, buf, len, NULL);
-		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: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=53070&r1=53069&r2=53070
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Thu Feb  1 13:21:20 2007
@@ -1097,8 +1097,7 @@
 	return ret;
 }
 
-/*! \brief  pbx_retrieve_variable: Support for Asterisk built-in variables and
-      functions in the dialplan
+/*! \brief  pbx_retrieve_variable: Support for Asterisk built-in variables
   ---*/
 void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
 {



More information about the asterisk-commits mailing list