projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cea42c
)
gprs: Assign GPRS atom to GPRS context atom
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 26 Oct 2010 12:03:47 +0000
(14:03 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 26 Oct 2010 12:03:47 +0000
(14:03 +0200)
If the GPRS atom is not assigned to the GPRS context atom, then possible
network triggered activation crashes.
src/gprs.c
patch
|
blob
|
history
diff --git
a/src/gprs.c
b/src/gprs.c
index
d1b7de0
..
103fd85
100644
(file)
--- 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;