[asterisk-commits] trunk - r8075 in /trunk: ./ funcs/func_strings.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Jan 14 13:08:04 CST 2006
Author: tilghman
Date: Sat Jan 14 13:08:03 2006
New Revision: 8075
URL: http://svn.digium.com/view/asterisk?rev=8075&view=rev
Log:
Merged revisions 8074 via svnmerge from
/branches/1.2
Modified:
trunk/ (props changed)
trunk/funcs/func_strings.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?rev=8075&r1=8074&r2=8075&view=diff
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Sat Jan 14 13:08:03 2006
@@ -50,8 +50,12 @@
if (delim) {
varname = strsep(&delim, "|");
pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL);
- while (strsep(&varval, delim))
- fieldcount++;
+ if (delim) {
+ while (strsep(&varval, delim))
+ fieldcount++;
+ } else if (!ast_strlen_zero(varval)) {
+ fieldcount = 1;
+ }
snprintf(buf, len, "%d", fieldcount);
} else {
ast_log(LOG_ERROR, "Out of memory\n");
More information about the asterisk-commits
mailing list