Speedup dongles encode USSD strings in GSM7
packed, so we don't have to pack it ourselves.
---
drivers/atmodem/ussd.c | 13 ++---
plugins/speedup.c |2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
index f5b38e2..e90db11 100644
--- a/drivers/atmodem/ussd.c
+++ b/drivers/atmodem/ussd.c
@@ -136,9 +136,15 @@ static void cusd_parse(GAtResult *result, struct
ofono_ussd *ussd)
case SMS_CHARSET_7BIT:
switch (data-charset) {
case AT_UTIL_CHARSET_GSM:
- msg_ptr = pack_7bit_own_buf((const guint8 *) content,
- -1, 0, TRUE, msg_len,
- 0, msg);
+ if (data-vendor == OFONO_VENDOR_SPEEDUP)
+ msg_ptr = decode_hex_own_buf(content, -1,
+ msg_len,
+ 0, msg);
+ else
+ msg_ptr = pack_7bit_own_buf((const guint8 *)
+ content, -1, 0,
+ TRUE, msg_len,
+ 0, msg);
break;
case AT_UTIL_CHARSET_UTF8:
@@ -242,6 +248,7 @@ static void cusd_cancel_cb(gboolean ok, GAtResult *result,
gpointer user_data)
switch (data-vendor) {
case OFONO_VENDOR_GOBI:
case OFONO_VENDOR_QUALCOMM_MSM:
+ case OFONO_VENDOR_SPEEDUP:
/* All errors and notifications arrive unexpected and
* thus just reset the state here. This is safer than
* getting stuck in a dead-lock. */
diff --git a/plugins/speedup.c b/plugins/speedup.c
index ca6ed13..5cc380f 100644
--- a/plugins/speedup.c
+++ b/plugins/speedup.c
@@ -282,7 +282,7 @@ static void speedup_post_online(struct ofono_modem *modem)
ofono_cbs_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
atmodem, data-aux);
- ofono_ussd_create(modem, OFONO_VENDOR_QUALCOMM_MSM,
+ ofono_ussd_create(modem, OFONO_VENDOR_SPEEDUP,
atmodem, data-aux);
}
--
1.7.5.4
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono