]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_cli: Allow global interface to be used in interactive mode
authorJouni Malinen <j@w1.fi>
Sat, 18 May 2013 08:40:23 +0000 (11:40 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 May 2013 08:40:23 +0000 (11:40 +0300)
This is mostly a corner case at this point, but if wpa_cli was started
with global control interface connection (-g) and interactive mode,
per-interface control interface was tried to be opened with the
previously opened global ctrl_iface connection gettign leaked.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/wpa_cli.c

index 0727e921b2c7dd210ea0992996f754c6622cbfd8..08bc1b1e6c725e0050e9198b71b1e1a259d5e33b 100644 (file)
@@ -3330,6 +3330,9 @@ static void update_bssid_list(struct wpa_ctrl *ctrl)
 
 static void try_connection(void *eloop_ctx, void *timeout_ctx)
 {
+       if (ctrl_conn)
+               goto done;
+
        if (ctrl_ifname == NULL)
                ctrl_ifname = wpa_cli_get_default_ifname();
 
@@ -3348,6 +3351,7 @@ static void try_connection(void *eloop_ctx, void *timeout_ctx)
        if (warning_displayed)
                printf("Connection established.\n");
 
+done:
        start_edit();
 }