[asterisk-commits] tilghman: branch 1.6.2 r246203 - in /branches/1.6.2: ./ funcs/func_strings.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 10 15:22:34 CST 2010
Author: tilghman
Date: Wed Feb 10 15:22:30 2010
New Revision: 246203
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246203
Log:
Merged revisions 246200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r246200 | tilghman | 2010-02-10 15:19:35 -0600 (Wed, 10 Feb 2010) | 2 lines
Fix weird issue with unit tests on optimized build - turned out to be a signing issue.
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/funcs/func_strings.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/funcs/func_strings.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/funcs/func_strings.c?view=diff&rev=246203&r1=246202&r2=246203
==============================================================================
--- branches/1.6.2/funcs/func_strings.c (original)
+++ branches/1.6.2/funcs/func_strings.c Wed Feb 10 15:22:30 2010
@@ -431,7 +431,8 @@
AST_APP_ARG(allowed);
AST_APP_ARG(string);
);
- char *outbuf = buf, ac;
+ char *outbuf = buf;
+ unsigned char ac;
char allowed[256] = "";
size_t allowedlen = 0;
int32_t bitfield[8] = { 0, }; /* 256 bits */
@@ -448,7 +449,7 @@
}
/* Expand ranges */
- for (; *(args.allowed) && allowedlen < sizeof(allowed); ) {
+ for (; *(args.allowed);) {
char c1 = 0, c2 = 0;
size_t consumed = 0;
@@ -472,13 +473,13 @@
for (ac = c1; ac != c2; ac++) {
bitfield[ac / 32] |= 1 << (ac % 32);
}
+ bitfield[ac / 32] |= 1 << (ac % 32);
ast_debug(4, "c1=%d, c2=%d\n", c1, c2);
-
- /* Decrement before the loop increment */
- (args.allowed)--;
} else {
- bitfield[c1 / 32] |= 1 << (c1 % 32);
+ ac = (unsigned char) c1;
+ ast_debug(4, "c1=%d, consumed=%d, args.allowed=%s\n", c1, consumed, args.allowed - consumed);
+ bitfield[ac / 32] |= 1 << (ac % 32);
}
}
More information about the asterisk-commits
mailing list