aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-05-18 08:40:23 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-18 08:40:23 (GMT)
commit6fd5ceaf70ad32effea675c5f7dc0c76fc19cc23 (patch)
treeee79cf9a8b1d35a781aab100f5bae4ae3db2c2d8 /wpa_supplicant/wpa_cli.c
parent2925756575ae33b0137d5bd293482fade4f48e95 (diff)
downloadhostap-6fd5ceaf70ad32effea675c5f7dc0c76fc19cc23.zip
hostap-6fd5ceaf70ad32effea675c5f7dc0c76fc19cc23.tar.gz
hostap-6fd5ceaf70ad32effea675c5f7dc0c76fc19cc23.tar.bz2
wpa_cli: Allow global interface to be used in interactive mode
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>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 0727e92..08bc1b1 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -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();
}