From: Niraj Kumar Goit Date: Tue, 27 Feb 2018 11:53:17 +0000 (+0530) Subject: Remove logic of scan timer in netlink-scan method. X-Git-Tag: submit/tizen/20180228.035728^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F171205%2F1;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Remove logic of scan timer in netlink-scan method. Change-Id: I01c3d9a0538c20c0518bfd74532e21d994fd2c82 Signed-off-by: Niraj Kumar Goit --- diff --git a/src/wifi-netlink-scan.c b/src/wifi-netlink-scan.c index c1eab05..320078f 100755 --- a/src/wifi-netlink-scan.c +++ b/src/wifi-netlink-scan.c @@ -33,30 +33,8 @@ #include static GSList *bss_info_list = NULL; -static guint scan_timer = 0; static unsigned char samsung_oui[3] = {0x00, 0x16, 0x32}; -static gboolean __netconfig_scan_timeout(gpointer data) -{ - __netconfig_notify_netlink_scan_done(); - - return FALSE; -} - -static void __netconfig_start_scan_timer(void) -{ - if (scan_timer == 0) { - netconfig_start_timer_seconds(5, __netconfig_scan_timeout, NULL, &scan_timer); - INFO("Get scan data timer started: %d", scan_timer); - } -} - -static void __netconfig_stop_scan_timer(void) -{ - netconfig_stop_timer(&scan_timer); - INFO("Get scan data timer stopped: %d", scan_timer); -} - void __netconfig_notify_netlink_scan_done(void) { GVariantBuilder *builder = NULL; @@ -93,7 +71,6 @@ void __netconfig_notify_netlink_scan_done(void) g_slist_free_full(bss_info_list, g_free); bss_info_list = NULL; - __netconfig_stop_scan_timer(); INFO("NetlinkScanCompleted"); return; @@ -349,10 +326,6 @@ static int __netconfig_netlink_scan_cb(struct nl_msg *msg, void *user_data) else bss_info_list = g_slist_append(bss_info_list, bss_info); - if (scan_timer == 0) { - DBG("Start scan timer"); - __netconfig_start_scan_timer(); - } } return NL_SKIP; @@ -593,5 +566,7 @@ int handle_netlink_scan(Wifi *wifi, GDBusMethodInvocation *context, GVariant *pa } wifi_complete_netlink_scan(wifi, context); + __netconfig_notify_netlink_scan_done(); + return 1; }