[asterisk-commits] tilghman: branch 1.4 r66538 - in /branches/1.4: ./ funcs/func_strings.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 29 14:56:07 MST 2007


Author: tilghman
Date: Tue May 29 16:56:07 2007
New Revision: 66538

URL: http://svn.digium.com/view/asterisk?view=rev&rev=66538
Log:
Merged revisions 66537 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r66537 | tilghman | 2007-05-29 16:49:35 -0500 (Tue, 29 May 2007) | 2 lines

If the value of a variable passed to FIELDQTY is blank, then FIELDQTY should return 0, not 1.

........

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=66538&r1=66537&r2=66538
==============================================================================
--- branches/1.4/funcs/func_strings.c (original)
+++ branches/1.4/funcs/func_strings.c Tue May 29 16:56:07 2007
@@ -59,8 +59,12 @@
 
 		sprintf(varsubst, "${%s}", args.varname);
 		pbx_substitute_variables_helper(chan, varsubst, varval, sizeof(varval) - 1);
-		while (strsep(&varval2, args.delim))
-			fieldcount++;
+		if (ast_strlen_zero(varval2))
+			fieldcount = 0;
+		else {
+			while (strsep(&varval2, args.delim))
+				fieldcount++;
+		}
 	} else {
 		fieldcount = 1;
 	}



More information about the asterisk-commits mailing list