Merge lp:~phablet-team/ofono/vivid-ww17-new-update into lp:~phablet-team/ofono/ubuntu

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 6894
Merged at revision: 6894
Proposed branch: lp:~phablet-team/ofono/vivid-ww17-new-update
Merge into: lp:~phablet-team/ofono/ubuntu
Diff against target: 140 lines (+76/-9)
4 files modified
debian/changelog (+11/-0)
drivers/rilmodem/gprs-context.c (+7/-8)
drivers/rilmodem/voicecall.c (+11/-1)
test/create-ia-context (+47/-0)
To merge this branch: bzr merge lp:~phablet-team/ofono/vivid-ww17-new-update
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
Review via email: mp+257344@code.launchpad.net

Commit message

[ Tony Espy ]
* rilmodem/gprs-context.c: notify if call-list is empty (LP: #1435328)
[ Alfonso Sanchez-Beato ]
* test/create-ia-context: new test script to create IA contexts
* rilmodem/voicecall.c: drop call if radio is not available (LP: #1445580)

Description of the change

This change includes the following fixes/enhancements:

1. Notify the ofono core of a disconnect if a received DATA_CALL_LIST is empty (LP: #1435328)
This is the root cause of many of our mobile data connectivity issues ( but not the only fix, more NM fixes to follow ).

2. A new test script, create-ia-context, has been added to make it easier to test the new IA type, which was added to support LTE.

3. Drop calls if RADIO_NOT_AVAILABLE returned by rild (LP: 1445580)

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Tested on krillin / vivid-proposed #196 and arale / vivid-proposed #18. Checked that bugs are fixed. I was able to see

Apr 24 12:33:54 ubuntu-phablet ofonod[1890]: Clearing active context; disconnect: 0 active_cid_found: 0 active_ctx_cid: 1

on krillin, using one SIM, with wifi disabled, when setting flight mode.

Sanity tests (calls/data/SMS) performed.

See comment #8 in bug #1445580 too: this bug needs additional fixes on telephony-service/dialler to be completely solved (although solved on the ofono side with this landing).

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
review: Approve
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Approving myself to speed things up, as this is blocking the RC.

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 2015-04-07 06:50:28 +0000
3+++ debian/changelog 2015-04-24 09:58:38 +0000
4@@ -1,3 +1,14 @@
5+ofono (1.12.bzr6894+15.04.20150424-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ [ Tony Espy ]
8+ * rilmodem/gprs-context.c: notify if call-list is empty (LP: #1435328)
9+
10+ [ Alfonso Sanchez-Beato ]
11+ * test/create-ia-context: new test script to create IA contexts
12+ * rilmodem/voicecall.c: drop call if radio is not available (LP: #1445580)
13+
14+ -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com> Fri, 24 Apr 2015 11:19:08 +0200
15+
16 ofono (1.12.bzr6892+15.04.20150407-0ubuntu1) vivid; urgency=medium
17
18 [ Alfonso Sanchez-Beato ]
19
20=== modified file 'drivers/rilmodem/gprs-context.c'
21--- drivers/rilmodem/gprs-context.c 2015-03-25 14:49:21 +0000
22+++ drivers/rilmodem/gprs-context.c 2015-04-24 09:58:38 +0000
23@@ -105,8 +105,7 @@
24 for (iterator = call_list->calls; iterator; iterator = iterator->next) {
25 call = (struct ril_data_call *) iterator->data;
26
27- if ((call->cid == gcd->active_rild_cid) &&
28- gcd->state != STATE_IDLE) {
29+ if (call->cid == gcd->active_rild_cid) {
30 active_cid_found = TRUE;
31 DBG("found call - cid: %d", call->cid);
32
33@@ -114,19 +113,19 @@
34 DBG("call !active; notify disconnect: %d",
35 call->cid);
36 disconnect = TRUE;
37- ofono_gprs_context_deactivated(gc,
38- gcd->active_ctx_cid);
39 }
40
41 break;
42 }
43 }
44
45- if (disconnect == TRUE || active_cid_found == FALSE) {
46- DBG("Clearing active context; disconnect: %d"
47- " active_cid_found: %d",
48- disconnect, active_cid_found);
49+ if ((disconnect == TRUE || active_cid_found == FALSE)
50+ && gcd->state != STATE_IDLE) {
51+ ofono_info("Clearing active context; disconnect: %d"
52+ " active_cid_found: %d active_ctx_cid: %d",
53+ disconnect, active_cid_found, gcd->active_ctx_cid);
54
55+ ofono_gprs_context_deactivated(gc, gcd->active_ctx_cid);
56 set_context_disconnected(gcd);
57 }
58
59
60=== modified file 'drivers/rilmodem/voicecall.c'
61--- drivers/rilmodem/voicecall.c 2015-02-04 00:09:22 +0000
62+++ drivers/rilmodem/voicecall.c 2015-04-24 09:58:38 +0000
63@@ -155,7 +155,12 @@
64 GSList *n, *o;
65 struct ofono_call *nc, *oc;
66
67- if (message->error != RIL_E_SUCCESS) {
68+ /*
69+ * We consider all calls have been dropped if there is no radio, which
70+ * happens, for instance, when flight mode is set whilst in a call.
71+ */
72+ if (message->error != RIL_E_SUCCESS &&
73+ message->error != RIL_E_RADIO_NOT_AVAILABLE) {
74 ofono_error("We are polling CLCC and received an error");
75 ofono_error("All bets are off for call management");
76 return;
77@@ -176,6 +181,11 @@
78 ofono_voicecall_disconnected(vc, oc->id,
79 OFONO_DISCONNECT_REASON_LOCAL_HANGUP,
80 NULL);
81+ } else if (message->error ==
82+ RIL_E_RADIO_NOT_AVAILABLE) {
83+ ofono_voicecall_disconnected(vc, oc->id,
84+ OFONO_DISCONNECT_REASON_ERROR,
85+ NULL);
86 } else {
87 /* Get disconnect cause before calling core */
88 struct lastcause_req *reqdata =
89
90=== added file 'test/create-ia-context'
91--- test/create-ia-context 1970-01-01 00:00:00 +0000
92+++ test/create-ia-context 2015-04-24 09:58:38 +0000
93@@ -0,0 +1,47 @@
94+#!/usr/bin/python3
95+
96+import sys
97+import dbus
98+
99+bus = dbus.SystemBus()
100+
101+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
102+ 'org.ofono.Manager')
103+
104+modems = manager.GetModems()
105+
106+for path, properties in modems:
107+ if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
108+ continue
109+
110+ connman = dbus.Interface(bus.get_object('org.ofono', path),
111+ 'org.ofono.ConnectionManager')
112+
113+ contexts = connman.GetContexts()
114+ path = "";
115+
116+ for i, properties in contexts:
117+ if properties["Type"] == "ia":
118+ path = i
119+ break
120+
121+ if path == "":
122+ path = connman.AddContext("ia")
123+ print("Created new context %s" % (path))
124+ else:
125+ print("Found context %s" % (path))
126+
127+ context = dbus.Interface(bus.get_object('org.ofono', path),
128+ 'org.ofono.ConnectionContext')
129+
130+ if len(sys.argv) > 1:
131+ context.SetProperty("AccessPointName", sys.argv[1])
132+ print("Setting APN to %s" % (sys.argv[1]))
133+
134+ if len(sys.argv) > 2:
135+ context.SetProperty("Username", sys.argv[2])
136+ print("Setting username to %s" % (sys.argv[2]))
137+
138+ if len(sys.argv) > 3:
139+ context.SetProperty("Password", sys.argv[3])
140+ print("Setting password to %s" % (sys.argv[3]))

Subscribers

People subscribed via source and target branches

to all changes: