]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 283881 via svnmerge from
authorJason Parker <jparker@digium.com>
Fri, 27 Aug 2010 20:31:55 +0000 (20:31 +0000)
committerJason Parker <jparker@digium.com>
Fri, 27 Aug 2010 20:31:55 +0000 (20:31 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r283881 | qwell | 2010-08-27 15:30:27 -0500 (Fri, 27 Aug 2010) | 15 lines

  Merged revisions 283880 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r283880 | qwell | 2010-08-27 15:29:11 -0500 (Fri, 27 Aug 2010) | 8 lines

    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.8@283882 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/res_config_mysql.c
main/config.c
res/res_config_odbc.c

index e770452fd4dc6c111661175114f42a96b6d576fa..1ba5224855317e357001720d901850acf0a82ba4 100644 (file)
@@ -307,7 +307,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);
                }
        }
index 34e4247a70a9702b88199dffaf43bd27f360041e..d763adac4a12e36a4a5e0aa42abba85b16553380 100644 (file)
@@ -2361,7 +2361,7 @@ char *ast_realtime_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);
                }
        }
index 15534c7faffaad2796c2a5b42147ced427053a12..64628c28663d79b0e203710982d22be28c77d8a9 100644 (file)
@@ -62,7 +62,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);
                }
        }