Merge lp:~sergiusens/phablet-extras/ofono into lp:phablet-extras/ofono

Proposed by Sergio Schvezov
Status: Merged
Approved by: Ricardo Salveti
Approved revision: no longer in the source branch.
Merged at revision: 33
Proposed branch: lp:~sergiusens/phablet-extras/ofono
Merge into: lp:phablet-extras/ofono
Diff against target: 51 lines (+16/-3)
2 files modified
debian/changelog (+4/-0)
drivers/rilmodem/sms.c (+12/-3)
To merge this branch: bzr merge lp:~sergiusens/phablet-extras/ofono
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Tony Espy Approve
Review via email: mp+165943@code.launchpad.net

Commit message

[ril/rilmodem] Using pdu field to figure out SMSC length (LP: #1090437).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tony Espy (awe) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Good.

review: Approve
lp:~sergiusens/phablet-extras/ofono updated
33. By Sergio Schvezov

[ril/rilmodem] Using pdu field to figure out SMSC length (LP: #1090437). Fixes: https://bugs.launchpad.net/bugs/1090437.

Approved by Ricardo Salveti, PS Jenkins bot, Tony Espy.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-04-16 17:59:50 +0000
3+++ debian/changelog 2013-05-28 16:58:26 +0000
4@@ -1,9 +1,13 @@
5 ofono (1.12phablet2) UNRELEASED; urgency=low
6
7+ [ Tony Espy ]
8 * [ril/rilmodem] Initial SIM support, includes:
9 - read filesystem support
10 - proper modem initialization
11
12+ [ Sergio Schvezov ]
13+ * [ril/rilmodem] Using pdu field to figure out SMSC length (LP: #1090437).
14+
15 -- Tony Espy <espy@canonical.com> Fri, 12 Apr 2013 14:56:01 -0400
16
17 ofono (1.12phablet1) raring; urgency=low
18
19=== modified file 'drivers/rilmodem/sms.c'
20--- drivers/rilmodem/sms.c 2013-04-11 19:31:21 +0000
21+++ drivers/rilmodem/sms.c 2013-05-28 16:58:26 +0000
22@@ -218,6 +218,7 @@
23 struct parcel rilp;
24 char *ril_pdu;
25 int ril_pdu_len;
26+ unsigned int smsc_len;
27 long ril_buf_len;
28 guchar *ril_data;
29
30@@ -251,10 +252,18 @@
31 sms_debug,
32 "sms-notify-decoded: ");
33
34+ /* The first octect in the pdu contains the SMSC address length
35+ * which is the X following octects it reads. We add 1 octet to
36+ * the read length to take into account this read octet in order
37+ * to calculate the proper tpdu length.
38+ */
39+ smsc_len = ril_data[0] + 1;
40+ DBG("smsc_len is %d", smsc_len);
41+
42 /* Last parameter is 'tpdu_len' ( substract SMSC length ) */
43- ofono_sms_deliver_notify(sms, ril_data,
44- ril_buf_len,
45- ril_buf_len - 8);
46+ ofono_sms_deliver_notify(sms, ril_data,
47+ ril_buf_len,
48+ ril_buf_len - smsc_len);
49
50 /* Re-use rilp, so initilize */
51 parcel_init(&rilp);

Subscribers

People subscribed via source and target branches