Some ZTE modem convert USSD string into UCS2 without respecting
the limitation of 160 bytes. So cut off the string if greater than
this limit
---
 drivers/atmodem/ussd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
index 443251a..bdee2d9 100644
--- a/drivers/atmodem/ussd.c
+++ b/drivers/atmodem/ussd.c
@@ -158,7 +158,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd 
*ussd)
 
        case SMS_CHARSET_8BIT:
        case SMS_CHARSET_UCS2:
-               msg_ptr = decode_hex_own_buf(content, -1, &msg_len, 0, msg);
+               msg_ptr = decode_hex_own_buf(content, 320, &msg_len, 0, msg);
                break;
        }
 
-- 
1.7.5.4

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to