From: Cheoleun Moon Date: Wed, 22 Apr 2020 11:48:41 +0000 (+0900) Subject: Try again to scan if nl_recvmsgs returns NLE_AGAIN and there is no error X-Git-Tag: submit/tizen/20200427.082157^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c97dacbf35abfa49bb7f95fa766b6b1adc218eae;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Try again to scan if nl_recvmsgs returns NLE_AGAIN and there is no error Change-Id: I8db32f5847b578c5d93fbcb609361da0c0e6a299 Signed-off-by: Cheoleun Moon --- diff --git a/packaging/net-config.spec b/packaging/net-config.spec index bd32cbc..95c8371 100755 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -1,6 +1,6 @@ Name: net-config Summary: TIZEN Network Configuration service -Version: 1.1.151 +Version: 1.1.153 Release: 3 Group: System/Network License: Apache-2.0 diff --git a/src/wifi-netlink-scan.c b/src/wifi-netlink-scan.c index 04d6f75..b59e843 100755 --- a/src/wifi-netlink-scan.c +++ b/src/wifi-netlink-scan.c @@ -723,8 +723,12 @@ static int __netconfig_request_netlink_scan(struct nl_sock *socket, if (ret == -NLE_AGAIN && err >= 0) continue; #endif - if (ret < 0 || err < 0) { + if (ret < 0) { DBG("scan failed"); + goto out; + } + if (err < 0) { + DBG("scan failed err: %d", err); ret = -1; goto out; } @@ -835,6 +839,10 @@ int handle_netlink_scan(Wifi *wifi, GDBusMethodInvocation *context, GVariant *pa /** Request NL80211_CMD_TRIGGER_SCAN to the kernel. */ ret = __netconfig_request_netlink_scan(global.socket, global.if_index, global.id, params); + if (ret == -NLE_AGAIN) { + DBG("Try Again"); + ret = __netconfig_request_netlink_scan(global.socket, global.if_index, global.id, params); + } if (ret < 0) { DBG("__netconfig_request_netlink_scan() failed, error %d", ret); netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "AccessDenied");