P2P: Deauth p2p client just after dbus notify

Currently to signal PropertiesChanged upon group client
removal (group property), wpa_supplicant dbus uses wpa_s
members like go_dev_addr and current_ssid, for instance.
Thus, deferring p2p client deauth to after dbus notify,
but keeping the same order as before, solves the issue,
as wpa_s is not yet completely deinitialized.

Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
This commit is contained in:
Eduardo Abinader 2014-08-20 23:30:24 -04:00 committed by Jouni Malinen
parent 3ee18569f5
commit c45dabb855

View file

@ -449,11 +449,16 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
(ssid && ssid->mode == WPAS_MODE_INFRA)) { (ssid && ssid->mode == WPAS_MODE_INFRA)) {
wpa_s->reassociate = 0; wpa_s->reassociate = 0;
wpa_s->disconnected = 1; wpa_s->disconnected = 1;
wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING);
gtype = "client"; gtype = "client";
} else } else
gtype = "GO"; gtype = "GO";
if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
if (os_strcmp(gtype, "client") == 0)
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
if (wpa_s->cross_connect_in_use) { if (wpa_s->cross_connect_in_use) {
wpa_s->cross_connect_in_use = 0; wpa_s->cross_connect_in_use = 0;
wpa_msg_global(wpa_s->parent, MSG_INFO, wpa_msg_global(wpa_s->parent, MSG_INFO,
@ -511,9 +516,6 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
*/ */
wpa_s->global->p2p_go_wait_client.sec = 0; wpa_s->global->p2p_go_wait_client.sec = 0;
if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);
if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) { if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
struct wpa_global *global; struct wpa_global *global;
char *ifname; char *ifname;