Fix issue with decoding ^-escaped characters in realtime.

(closes issue #17790)
Reported by: denzs
Patches: 
      17790-chunky.diff uploaded by qwell (license 4)
Tested by: qwell, denzs


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Jason Parker 16 years ago
parent a0e2fe78a8
commit d5c19c4c98

@ -68,7 +68,7 @@ static void decode_chunk(char *chunk)
{
for (; *chunk; chunk++) {
if (*chunk == '^' && strchr("0123456789ABCDEFabcdef", chunk[1]) && strchr("0123456789ABCDEFabcdef", chunk[2])) {
sscanf(chunk + 1, "%02hhd", chunk);
sscanf(chunk + 1, "%02hhX", chunk);
memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1);
}
}

@ -100,7 +100,7 @@ static char *decode_chunk(char *chunk)
char *orig = chunk;
for (; *chunk; chunk++) {
if (*chunk == '^' && strchr("0123456789ABCDEFabcdef", chunk[1]) && strchr("0123456789ABCDEFabcdef", chunk[2])) {
sscanf(chunk + 1, "%02hhd", chunk);
sscanf(chunk + 1, "%02hhX", chunk);
memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1);
}
}

Loading…
Cancel
Save