[PATCH] Move control interface cleanup after wpa_supplicant_cleanup()
Bartosz.Markowski at tieto.com
Bartosz.Markowski
Thu Aug 4 01:28:06 PDT 2011
Hi,
Could you please describe what the problem was?
Is it a problem with establishing connection to supplicant?
BR,
Bartosz
-----Original Message-----
From: hostap-bounces at lists.shmoo.com [mailto:hostap-bounces at lists.shmoo.com] On Behalf Of Dmitry Shmidt
Sent: 3 sierpnia 2011 20:04
To: hostap at lists.shmoo.com
Subject: [PATCH] Move control interface cleanup after wpa_supplicant_cleanup()
This is needed to be able to communicate through control interface
after wpa_supplicant_cleanup()
Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
wpa_supplicant/wpa_supplicant.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 3f3e435..c93c4d2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -382,16 +382,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
wpa_s->l2_br = NULL;
}
- if (wpa_s->ctrl_iface) {
- wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
- wpa_s->ctrl_iface = NULL;
- }
if (wpa_s->conf != NULL) {
struct wpa_ssid *ssid;
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next)
wpas_notify_network_removed(wpa_s, ssid);
- wpa_config_free(wpa_s->conf);
- wpa_s->conf = NULL;
}
os_free(wpa_s->confname);
@@ -2303,11 +2297,21 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
wpa_supplicant_cleanup(wpa_s);
+ if (wpa_s->drv_priv)
+ wpa_drv_deinit(wpa_s);
+
if (notify)
wpas_notify_iface_removed(wpa_s);
- if (wpa_s->drv_priv)
- wpa_drv_deinit(wpa_s);
+ if (wpa_s->ctrl_iface) {
+ wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
+ wpa_s->ctrl_iface = NULL;
+ }
+
+ if (wpa_s->conf != NULL) {
+ wpa_config_free(wpa_s->conf);
+ wpa_s->conf = NULL;
+ }
}
--
1.7.3.1
_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap
More information about the Hostap
mailing list