[svn-commits] tilghman: trunk r66540 - in /trunk: ./ funcs/func_strings.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 29 14:59:22 MST 2007


Author: tilghman
Date: Tue May 29 16:59:21 2007
New Revision: 66540

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

................
r66538 | tilghman | 2007-05-29 16:56:07 -0500 (Tue, 29 May 2007) | 10 lines

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:
    trunk/   (props changed)
    trunk/funcs/func_strings.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=66540&r1=66539&r2=66540
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Tue May 29 16:59:21 2007
@@ -71,8 +71,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 svn-commits mailing list