gsm48: Fix gsm48_encode_called - Set no extension bit
authorSylvain Munaut <tnt@246tNt.com>
Mon, 20 Sep 2010 18:59:23 +0000 (20:59 +0200)
committerSylvain Munaut <tnt@246tNt.com>
Mon, 20 Sep 2010 18:59:23 +0000 (20:59 +0200)
The highest bit must be set as "No extension byte" marker,
so that the next byte is considered to be the BCD number
and not some more control stuff

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
src/gsm48_ie.c

index 71910c6..0e27088 100644 (file)
@@ -249,7 +249,8 @@ int gsm48_encode_called(struct msgb *msg,
        int ret;
 
        /* octet 3 */
-       lv[1] = called->plan;
+       lv[1] = 0x80; /* no extension */
+       lv[1] |= called->plan;
        lv[1] |= called->type << 4;
 
        /* octet 4..N, octet 2 */