summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorMartin Xu <martin.xu@intel.com>2010-03-23 11:43:50 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2010-03-23 12:05:52 +0100
commit449a6aa318165cc8e39ced502a221ee16bbb2abb (patch)
treeae943dab4ce5f4629fb3b006927321b112405e0c /plugins/ofono.c
parent678e15dba2930464631ddca47b42a9d8473b1175 (diff)
downloadconnman-449a6aa318165cc8e39ced502a221ee16bbb2abb.tar.gz
connman-449a6aa318165cc8e39ced502a221ee16bbb2abb.tar.bz2
connman-449a6aa318165cc8e39ced502a221ee16bbb2abb.zip
Set network->device as NULL when the device is removed
oFono plugin can use network->device to decide whether the modem is removed during active PrimaryContext. That fixes a segmentation fault when removing a 3G modem before getting the set_network_active() D-Bus reply.
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index c5521efb..2ad01f24 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -398,8 +398,10 @@ static gboolean pending_network_is_available(
/* Modem may be removed during waiting for active reply */
device = connman_network_get_device(pending_network);
- if (device == NULL)
+ if (device == NULL) {
+ DBG("Modem is removed");
return FALSE;
+ }
identifier = connman_network_get_identifier(pending_network);