Fix improper part number in multipart SMS text messages
authorSÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
Tue, 18 Nov 2014 15:07:32 +0000 (15:07 +0000)
committerJohn Crispin <blogic@openwrt.org>
Tue, 18 Nov 2014 21:01:21 +0000 (22:01 +0100)
Received multipart SMS messages has part number always one too high.

commands-wms.c

index 01e6867ea7e98de400ab840c551e38355451fc30..9b9aac374a5bca166aadde840a0c9c61e43e7248 100644 (file)
@@ -178,7 +178,7 @@ static void decode_udh(const unsigned char *data)
                switch (type) {
                case 0:
                        blobmsg_add_u32(&status, "concat_ref", (uint32_t) val[0]);
-                       blobmsg_add_u32(&status, "concat_part", (uint32_t) val[2] + 1);
+                       blobmsg_add_u32(&status, "concat_part", (uint32_t) val[2]);
                        blobmsg_add_u32(&status, "concat_parts", (uint32_t) val[1]);
                        break;
                default: