From: Yu A Wang Date: Thu, 10 Nov 2011 05:08:34 +0000 (-0500) Subject: ofono: Don't set network index when device is removed X-Git-Tag: 2.0_alpha~913 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c87834a20c790b98fd76b02b0daf4f5105604164;p=framework%2Fconnectivity%2Fconnman.git ofono: Don't set network index when device is removed A NULL interface means the device is removed so there is no need for setting the network index as it will eventually be removed. Setting the network index to -1 prevents wpad or wispr to unreference the service. Fixes BMC#23979 --- diff --git a/plugins/ofono.c b/plugins/ofono.c index 95bb612..bcb79ae 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -753,10 +753,6 @@ static void update_ipv4_settings(DBusMessageIter *array, netmask, gateway); } - /* deactive, oFono send NULL inteface before deactive signal */ - if (interface == NULL) - connman_network_set_index(info->network, -1); - g_free(address); g_free(netmask); g_free(gateway); @@ -833,10 +829,6 @@ static void update_ipv6_settings(DBusMessageIter *array, connman_ipaddress_set_ipv6(&info->ipv6_address, address, prefix_length, gateway); - /* deactive, oFono send NULL inteface before deactive signal */ - if (interface == NULL) - connman_network_set_index(info->network, -1); - g_free(address); g_free(gateway); }