From 483663eeed925455ab311b85f3c1d2e99e19dbd2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 26 Oct 2010 14:03:47 +0200 Subject: gprs: Assign GPRS atom to GPRS context atom If the GPRS atom is not assigned to the GPRS context atom, then possible network triggered activation crashes. --- src/gprs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/gprs.c b/src/gprs.c index d1b7de00..103fd858 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -1650,6 +1650,8 @@ void ofono_gprs_add_context(struct ofono_gprs *gprs, if (gc->driver == NULL) return; + gc->gprs = gprs; + gprs->context_drivers = g_slist_append(gprs->context_drivers, gc); __ofono_atom_register(gc->atom, gprs_context_unregister); } @@ -1662,6 +1664,9 @@ void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc, struct pri_context *ctx; dbus_bool_t value; + if (gc->gprs == NULL) + return; + for (l = gc->gprs->contexts; l; l = l->next) { ctx = l->data; -- cgit v1.2.3