diff options
author | Aki Niemi <aki.niemi@nokia.com> | 2010-09-27 15:49:16 +0300 |
---|---|---|
committer | Aki Niemi <aki.niemi@nokia.com> | 2010-09-27 16:07:39 +0300 |
commit | 7e5a5e665b3d0c845cec21804c3c87ba8421de7c (patch) | |
tree | 7623b36e16a6402dc3361b8ea3ed432bfca7c9e3 /drivers/isimodem/cbs.c | |
parent | 0e398f0d562cc39cded4836bfd1fb915dc170f10 (diff) | |
download | ofono-7e5a5e665b3d0c845cec21804c3c87ba8421de7c.tar.bz2 |
isimodem: Fix CBS decoding
Diffstat (limited to 'drivers/isimodem/cbs.c')
-rw-r--r-- | drivers/isimodem/cbs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/isimodem/cbs.c b/drivers/isimodem/cbs.c index 186ba700..0d7fc8a7 100644 --- a/drivers/isimodem/cbs.c +++ b/drivers/isimodem/cbs.c @@ -71,7 +71,15 @@ static void routing_ntf_cb(GIsiClient *client, if (!msg || len < 3 || msg[0] != SMS_GSM_CB_ROUTING_NTF) return; - ofono_cbs_notify(cbs, msg+5, len-5); + /* Skipping header(s) */ + msg += 5; + len -= 5; + + /* + * The next 88 bytes of the sub-block are the actual CBS PDU, + * followed by an informational data length field, and filler. + */ + ofono_cbs_notify(cbs, msg, len - 2); } static gboolean routing_resp_cb(GIsiClient *client, |