Comment 14 for bug 1234434

Revision history for this message
Tony Espy (awe) wrote :

OK, some good progress to report. I can disable/enable mobile data multiple times in a row on mako and everything works as expected. Likewise with the tin-foil/oven scenario; in fact, the data connection is usually up & running before I can unwrap the phone fully and turn on the screen.

Turns out the problem was that when 'Attach' was toggled either via DBus or via connection loss, the primary data context wasn't being properly cleaned up, so when the re-attach happened, an active context was found, so no action was taken. This was due to
ril_deactivate_data_call_cb() calling set_context_disaconnected(gcd), before it called ofono_gprs_context_deactivated(), which takes gcd->active_ctx_cid as a parameter. As set_context_disconnected() sets active_ctx_cid to -1, the correct context is never cleared in the core gprs code.

I'll work on cleaning up the patch and create a pull request for the fix.