mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
Fix weird issue with unit tests on optimized build - turned out to be a signing issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -591,7 +591,8 @@ static int filter(struct ast_channel *chan, const char *cmd, char *parse, char *
|
|||||||
AST_APP_ARG(allowed);
|
AST_APP_ARG(allowed);
|
||||||
AST_APP_ARG(string);
|
AST_APP_ARG(string);
|
||||||
);
|
);
|
||||||
char *outbuf = buf, ac;
|
char *outbuf = buf;
|
||||||
|
unsigned char ac;
|
||||||
char allowed[256] = "";
|
char allowed[256] = "";
|
||||||
size_t allowedlen = 0;
|
size_t allowedlen = 0;
|
||||||
int32_t bitfield[8] = { 0, }; /* 256 bits */
|
int32_t bitfield[8] = { 0, }; /* 256 bits */
|
||||||
@@ -608,7 +609,7 @@ static int filter(struct ast_channel *chan, const char *cmd, char *parse, char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Expand ranges */
|
/* Expand ranges */
|
||||||
for (; *(args.allowed) && allowedlen < sizeof(allowed); ) {
|
for (; *(args.allowed);) {
|
||||||
char c1 = 0, c2 = 0;
|
char c1 = 0, c2 = 0;
|
||||||
size_t consumed = 0;
|
size_t consumed = 0;
|
||||||
|
|
||||||
@@ -632,13 +633,13 @@ static int filter(struct ast_channel *chan, const char *cmd, char *parse, char *
|
|||||||
for (ac = c1; ac != c2; ac++) {
|
for (ac = c1; ac != c2; ac++) {
|
||||||
bitfield[ac / 32] |= 1 << (ac % 32);
|
bitfield[ac / 32] |= 1 << (ac % 32);
|
||||||
}
|
}
|
||||||
|
bitfield[ac / 32] |= 1 << (ac % 32);
|
||||||
|
|
||||||
ast_debug(4, "c1=%d, c2=%d\n", c1, c2);
|
ast_debug(4, "c1=%d, c2=%d\n", c1, c2);
|
||||||
|
|
||||||
/* Decrement before the loop increment */
|
|
||||||
(args.allowed)--;
|
|
||||||
} else {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user