[PATCH] P2P: Show "FAIL" for invalid operation
Masashi Honma
honma
Wed Nov 24 17:45:13 PST 2010
Hello.
I tried these commands.
./wpa_cli -i wlan0 p2p_group_add
./wpa_cli -i wlan0 p2p_find
The second one results in following messages because it is invalid
operation.
-------
nl80211: Scan trigger failed: ret=-95 (Operation not supported)
P2P: Failed to start p2p_scan
-------
But the second one shows "OK" on control console.
This patch makes it to show "FAIL".
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index cfb8e9f..b26cbb2 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1991,8 +1991,7 @@ static int p2p_ctrl_find(struct wpa_supplicant *wpa_s, char *cmd)
else if (os_strstr(cmd, "type=progressive"))
type = P2P_FIND_PROGRESSIVE;
- wpas_p2p_find(wpa_s, timeout, type);
- return 0;
+ return wpas_p2p_find(wpa_s, timeout, type);
}
Regards,
Masashi Honma.
More information about the Hostap
mailing list