uqmi: corrected too short received SMS
authorHenrik Ginstmark <henrik@ginstmark.se>
Fri, 11 Mar 2022 23:33:54 +0000 (00:33 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 12 Mar 2022 10:44:29 +0000 (10:44 +0000)
commit44dd095794a5327611d0ee1a58b0a6333d397b64
tree45f152101d0edcd2656700cfe958b831e243a74c
parentf254fc59c710d781eca3ec36e0bff2d8970370fa
uqmi: corrected too short received SMS

When characters with ascii values bigger than 0x7f are used, the
length of the received text message is too short.

Test message sent: 123äÄ123
Before correction:
root@OpenWrt:/tmp# uqmi -d /dev/cdc-wdm0 --get-message 20
Raw text: 31 32 33 7b 5b 31 32 33
{
        "smsc": "+46724400001",
        "sender": "+46xxxxxxxxx",
        "timestamp": "2022-03-11 18:48:10",
        "text": "123äÄ1"
}

after correction:
root@OpenWrt:/tmp# uqmi -d /dev/cdc-wdm0 --get-message 20
Raw text: 31 32 33 7b 5b 31 32 33
{
        "smsc": "+46724400001",
        "sender": "+46xxxxxxxxx",
        "timestamp": "2022-03-11 18:48:10",
        "text": "123äÄ123"
}

Signed-off-by: Henrik Ginstmark <henrik@ginstmark.se>
commands-wms.c