Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
e531265269
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;
                sbparamlen = (buf[offset+1] & 0xFF) - 2;
 
 
                while ((sbparamlen > 0) && (buf[offset] != 0)) {
                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;
                    sb_i=sb_i+2;
                    sbparamlen--;
                    sbparamlen--;
                    sb_j++;
                    sb_j++;