Browse Source

wpa_cli: Fix wrong comparison in wpa_cli_cmd_interface

Signed-off-by: Daichi Ueura <daichi.ueura@gmail.com>
Daichi Ueura 11 years ago
parent
commit
2150c33337
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wpa_supplicant/wpa_cli.c

+ 1 - 1
wpa_supplicant/wpa_cli.c

@@ -1552,7 +1552,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",