aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-08-31 21:35:32 +0300
committerDmitry Shmidt <dimitrysh@google.com>2012-09-09 14:04:22 -0700
commit5c44edb00c9384534a1b50981071874436aaecd5 (patch)
tree2a83852f01ff11b33d21344867371468e013c17a /wpa_supplicant
parent31be0a4b946ecab910c0a9af3837dbccea5d204b (diff)
downloadexternal_wpa_supplicant_8-5c44edb00c9384534a1b50981071874436aaecd5.zip
external_wpa_supplicant_8-5c44edb00c9384534a1b50981071874436aaecd5.tar.gz
external_wpa_supplicant_8-5c44edb00c9384534a1b50981071874436aaecd5.tar.bz2
P2P: Do not fail p2p_group_remove just based on current_ssid
The wpa_s->current_ssid pointer may get cleared, e.g., when disconnected. Commit 30ee769235f3170d9bf6b62c11c6e018e97deb84 made wpas_p2p_group_delete() exit early before removing a P2P interface in this type of case. That can cause number of issues from p2p_group_remove command failing to busy loop when terminating wpa_supplicant if there is a P2P group interface in client mode and that interface happens to be in disconnected state. Fix these issues by allowing wpas_p2p_group_delete() remove the P2P group interface regardless of whether wpa_s->currnt_ssid is set. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index c43469e..8bddeb3 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -300,7 +300,9 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
break;
ssid = ssid->next;
}
- if (ssid == NULL) {
+ if (ssid == NULL &&
+ wpa_s->p2p_group_interface == NOT_P2P_GROUP_INTERFACE)
+ {
wpa_printf(MSG_ERROR, "P2P: P2P group interface "
"not found");
return -1;