summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorYu <jiung.yu@samsung.com>2019-10-01 14:44:11 +0900
committerYu <jiung.yu@samsung.com>2019-10-01 17:25:32 +0900
commit0702eaff61dc1d59ed60800bd984b2a364849e5d (patch)
tree2ca26e5ffad41cd9412daff9b8881031e52ed475 /plugins
parentdb328958f4b083cce99bdd81d861d707459ae1f6 (diff)
downloadconnman-0702eaff61dc1d59ed60800bd984b2a364849e5d.tar.gz
connman-0702eaff61dc1d59ed60800bd984b2a364849e5d.tar.bz2
connman-0702eaff61dc1d59ed60800bd984b2a364849e5d.zip
Remove Wi-Fi device reference on wifi_disable when wifi is scanningsubmit/tizen/20191001.114836accepted/tizen/unified/20191007.234805
Description: Sometimes Wi-Fi device reference didn't set to zero when Wi-Fi is powered off like below. src/device.c:connman_device_ref_debug() 0xb7fd8ae0 ref 2 by plugins/wifi.c:1434:wifi_probe() src/device.c:connman_device_ref_debug() 0xb7fd8ae0 ref 3 by plugins/wifi.c:3183:wifi_scan() src/device.c:connman_device_ref_debug() 0xb7fd8ae0 ref 4 by plugins/wifi.c:2313:start_autoscan() src/device.c:connman_device_unref_debug() 0xb7fd8ae0 ref 3 by plugins/wifi.c:1500:reset_autoscan() src/device.c:connman_device_unref_debug() 0xb7fd8ae0 ref 2 by plugins/wifi.c:1606:wifi_remove() src/device.c:connman_device_unref_debug() 0xb7fd8ae0 ref 1 by src/detect.c:106:detect_dellink() src/device.c:connman_device_ref_debug() 0xb7fd8ae0 ref 2 by plugins/wifi.c:1434:wifi_probe() src/device.c:connman_device_ref_debug() 0xb7fcce88 ref 2 by plugins/wifi.c:1434:wifi_probe() src/device.c:connman_device_unref_debug() 0xb7fcce88 ref 1 by plugins/wifi.c:1606:wifi_remove() src/device.c:connman_device_unref_debug() 0xb7fcce88 ref 0 by src/detect.c:106:detect_dellink() Change-Id: I52783152a5dd581d1af072aa5f3a0db92e8d622a Signed-off-by: Yu jiung <jiung.yu@samsung.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/wifi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index dd58a446..e74e2d9b 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2479,7 +2479,9 @@ static int wifi_disable(struct connman_device *device)
if (wifi->pending_network)
wifi->pending_network = NULL;
+#if !defined TIZEN_EXT
stop_autoscan(device);
+#endif
if (connman_device_get_scanning(device, CONNMAN_SERVICE_TYPE_P2P)) {
g_source_remove(wifi->p2p_find_timeout);
@@ -2502,6 +2504,10 @@ static int wifi_disable(struct connman_device *device)
connman_device_unref(wifi->device);
}
+#if defined TIZEN_EXT
+ stop_autoscan(device);
+#endif
+
remove_networks(device, wifi);
remove_peers(wifi);