Set data->network as NULL when removing MBM networks
authorMartin Xu <martin.xu@intel.com>
Wed, 14 Oct 2009 07:39:04 +0000 (15:39 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 20 Oct 2009 20:02:16 +0000 (22:02 +0200)
plugins/mbm.c

index f4e7433..e7b5e17 100644 (file)
@@ -601,8 +601,14 @@ static int network_probe(struct connman_network *network)
 
 static void network_remove(struct connman_network *network)
 {
+       struct connman_device *device = connman_network_get_device(network);
+       struct mbm_data *data;
+
        DBG("network %p", network);
 
+       data = connman_device_get_data(device);
+       data->network = NULL;
+
        connman_network_set_data(network, NULL);
 }