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
=== modified file 'debian/changelog'
--- debian/changelog 2015-04-07 06:50:28 +0000
+++ debian/changelog 2015-04-24 09:58:38 +0000
@@ -1,3 +1,14 @@
1ofono (1.12.bzr6894+15.04.20150424-0ubuntu1) UNRELEASED; urgency=medium
2
3 [ Tony Espy ]
4 * rilmodem/gprs-context.c: notify if call-list is empty (LP: #1435328)
5
6 [ Alfonso Sanchez-Beato ]
7 * test/create-ia-context: new test script to create IA contexts
8 * rilmodem/voicecall.c: drop call if radio is not available (LP: #1445580)
9
10 -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com> Fri, 24 Apr 2015 11:19:08 +0200
11
1ofono (1.12.bzr6892+15.04.20150407-0ubuntu1) vivid; urgency=medium12ofono (1.12.bzr6892+15.04.20150407-0ubuntu1) vivid; urgency=medium
213
3 [ Alfonso Sanchez-Beato ]14 [ Alfonso Sanchez-Beato ]
415
=== modified file 'drivers/rilmodem/gprs-context.c'
--- drivers/rilmodem/gprs-context.c 2015-03-25 14:49:21 +0000
+++ drivers/rilmodem/gprs-context.c 2015-04-24 09:58:38 +0000
@@ -105,8 +105,7 @@
105 for (iterator = call_list->calls; iterator; iterator = iterator->next) {105 for (iterator = call_list->calls; iterator; iterator = iterator->next) {
106 call = (struct ril_data_call *) iterator->data;106 call = (struct ril_data_call *) iterator->data;
107107
108 if ((call->cid == gcd->active_rild_cid) &&108 if (call->cid == gcd->active_rild_cid) {
109 gcd->state != STATE_IDLE) {
110 active_cid_found = TRUE;109 active_cid_found = TRUE;
111 DBG("found call - cid: %d", call->cid);110 DBG("found call - cid: %d", call->cid);
112111
@@ -114,19 +113,19 @@
114 DBG("call !active; notify disconnect: %d",113 DBG("call !active; notify disconnect: %d",
115 call->cid);114 call->cid);
116 disconnect = TRUE;115 disconnect = TRUE;
117 ofono_gprs_context_deactivated(gc,
118 gcd->active_ctx_cid);
119 }116 }
120117
121 break;118 break;
122 }119 }
123 }120 }
124121
125 if (disconnect == TRUE || active_cid_found == FALSE) {122 if ((disconnect == TRUE || active_cid_found == FALSE)
126 DBG("Clearing active context; disconnect: %d"123 && gcd->state != STATE_IDLE) {
127 " active_cid_found: %d",124 ofono_info("Clearing active context; disconnect: %d"
128 disconnect, active_cid_found);125 " active_cid_found: %d active_ctx_cid: %d",
126 disconnect, active_cid_found, gcd->active_ctx_cid);
129127
128 ofono_gprs_context_deactivated(gc, gcd->active_ctx_cid);
130 set_context_disconnected(gcd);129 set_context_disconnected(gcd);
131 }130 }
132131
133132
=== modified file 'drivers/rilmodem/voicecall.c'
--- drivers/rilmodem/voicecall.c 2015-02-04 00:09:22 +0000
+++ drivers/rilmodem/voicecall.c 2015-04-24 09:58:38 +0000
@@ -155,7 +155,12 @@
155 GSList *n, *o;155 GSList *n, *o;
156 struct ofono_call *nc, *oc;156 struct ofono_call *nc, *oc;
157157
158 if (message->error != RIL_E_SUCCESS) {158 /*
159 * We consider all calls have been dropped if there is no radio, which
160 * happens, for instance, when flight mode is set whilst in a call.
161 */
162 if (message->error != RIL_E_SUCCESS &&
163 message->error != RIL_E_RADIO_NOT_AVAILABLE) {
159 ofono_error("We are polling CLCC and received an error");164 ofono_error("We are polling CLCC and received an error");
160 ofono_error("All bets are off for call management");165 ofono_error("All bets are off for call management");
161 return;166 return;
@@ -176,6 +181,11 @@
176 ofono_voicecall_disconnected(vc, oc->id,181 ofono_voicecall_disconnected(vc, oc->id,
177 OFONO_DISCONNECT_REASON_LOCAL_HANGUP,182 OFONO_DISCONNECT_REASON_LOCAL_HANGUP,
178 NULL);183 NULL);
184 } else if (message->error ==
185 RIL_E_RADIO_NOT_AVAILABLE) {
186 ofono_voicecall_disconnected(vc, oc->id,
187 OFONO_DISCONNECT_REASON_ERROR,
188 NULL);
179 } else {189 } else {
180 /* Get disconnect cause before calling core */190 /* Get disconnect cause before calling core */
181 struct lastcause_req *reqdata =191 struct lastcause_req *reqdata =
182192
=== added file 'test/create-ia-context'
--- test/create-ia-context 1970-01-01 00:00:00 +0000
+++ test/create-ia-context 2015-04-24 09:58:38 +0000
@@ -0,0 +1,47 @@
1#!/usr/bin/python3
2
3import sys
4import dbus
5
6bus = dbus.SystemBus()
7
8manager = dbus.Interface(bus.get_object('org.ofono', '/'),
9 'org.ofono.Manager')
10
11modems = manager.GetModems()
12
13for path, properties in modems:
14 if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
15 continue
16
17 connman = dbus.Interface(bus.get_object('org.ofono', path),
18 'org.ofono.ConnectionManager')
19
20 contexts = connman.GetContexts()
21 path = "";
22
23 for i, properties in contexts:
24 if properties["Type"] == "ia":
25 path = i
26 break
27
28 if path == "":
29 path = connman.AddContext("ia")
30 print("Created new context %s" % (path))
31 else:
32 print("Found context %s" % (path))
33
34 context = dbus.Interface(bus.get_object('org.ofono', path),
35 'org.ofono.ConnectionContext')
36
37 if len(sys.argv) > 1:
38 context.SetProperty("AccessPointName", sys.argv[1])
39 print("Setting APN to %s" % (sys.argv[1]))
40
41 if len(sys.argv) > 2:
42 context.SetProperty("Username", sys.argv[2])
43 print("Setting username to %s" % (sys.argv[2]))
44
45 if len(sys.argv) > 3:
46 context.SetProperty("Password", sys.argv[3])
47 print("Setting password to %s" % (sys.argv[3]))

Subscribers

People subscribed via source and target branches

to all changes: