[PATCH] wpa_cli: Fix wrong comparison in wpa_cli_cmd_interface

Daichi Ueura daichi.ueura
Sun Apr 6 00:35:12 PDT 2014


Signed-off-by: Daichi Ueura <daichi.ueura at gmail.com>
---
 wpa_supplicant/wpa_cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 83817f9..d688fcd 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1578,7 +1578,7 @@ static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[])
 	os_free(ctrl_ifname);
 	ctrl_ifname = os_strdup(argv[0]);
 
-	if (wpa_cli_open_connection(ctrl_ifname, 1)) {
+	if (wpa_cli_open_connection(ctrl_ifname, 1) == 0) {
 		printf("Connected to interface '%s.\n", ctrl_ifname);
 	} else {
 		printf("Could not connect to interface '%s' - re-trying\n",
-- 
1.8.2.2




More information about the Hostap mailing list