Add support for 16-bit reference number in concatenated SMS.
authorSławomir Demeszko <s.demeszko@wireless-instruments.com>
Wed, 17 Dec 2014 13:34:48 +0000 (14:34 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Dec 2014 11:44:26 +0000 (12:44 +0100)
Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
commands-wms.c

index 47d4d768f4cb36c795c9f2414c90bf3f35a2be35..6ac52ebb5002519ce0e598ae57423d6de94243a9 100644 (file)
@@ -179,11 +179,16 @@ static int decode_udh(const unsigned char *data)
                        break;
 
                switch (type) {
-               case 0:
+               case 0x00:
                        blobmsg_add_u32(&status, "concat_ref", (uint32_t) val[0]);
                        blobmsg_add_u32(&status, "concat_part", (uint32_t) val[2]);
                        blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[1]);
                        break;
+               case 0x08:
+                       blobmsg_add_u32(&status, "concat_ref", (uint32_t) (val[0] << 8 | val[1]));
+                       blobmsg_add_u32(&status, "concat_part", (uint32_t) val[3]);
+                       blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[2]);
+                       break;
                default:
                        break;
                }