From: Sławomir Demeszko Date: Wed, 17 Dec 2014 13:34:48 +0000 (+0100) Subject: Add support for 16-bit reference number in concatenated SMS. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cba2f469ffbe99f9fb181faeadc22d62e6c89185;p=oweals%2Fuqmi.git Add support for 16-bit reference number in concatenated SMS. Signed-off-by: SÅ‚awomir Demeszko --- diff --git a/commands-wms.c b/commands-wms.c index 47d4d76..6ac52eb 100644 --- a/commands-wms.c +++ b/commands-wms.c @@ -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; }