浏览代码

sipt: $sipt(redirection_number) evaluates the value as a numerical value

sipt: $sipt(redirection_number) evaluates the value as a numerical value
(cherry picked from commit 34fb47f28948e701c3ea98c673c8fb324b2f790e)
Sergey Basov 6 年之前
父节点
当前提交
e531265269
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/modules/sipt/ss7_parser.c

+ 2 - 2
src/modules/sipt/ss7_parser.c

@@ -384,8 +384,8 @@ int isup_get_redirection_number(unsigned char *buf, int len, char* sb_buf)
                sbparamlen = (buf[offset+1] & 0xFF) - 2;
 
                while ((sbparamlen > 0) && (buf[offset] != 0)) {
-                   sb_buf[sb_i]=(buf[offset+4+sb_j] & 0x0F) + '\x30';
-                   sb_buf[sb_i+1]=(buf[offset+4+sb_j]>>4 & 0x0F) + '\x30';
+                   sb_buf[sb_i]="0123456789ABCDEF"[(buf[offset+4+sb_j] & 0x0F)];
+                   sb_buf[sb_i+1]="0123456789ABCDEF"[(buf[offset+4+sb_j] >>4 & 0x0F)];
                    sb_i=sb_i+2;
                    sbparamlen--;
                    sb_j++;