diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 14:03:47 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 14:03:47 +0200 |
commit | 483663eeed925455ab311b85f3c1d2e99e19dbd2 (patch) | |
tree | 235dfd8331e87b5bceafbbf24849a3f29e8137c2 | |
parent | 4cea42c53d6a3cb24429712a51b59d98e01c8325 (diff) | |
download | ofono-483663eeed925455ab311b85f3c1d2e99e19dbd2.tar.bz2 |
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.
-rw-r--r-- | src/gprs.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |