aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-10-03 14:31:41 -0700
committerIrfan Sheriff <isheriff@google.com>2012-10-03 16:22:51 -0700
commitadddfc48d2d7bfa2b1a2405ab8f404b6383ec236 (patch)
treebdf1f0348d5a9901cfa86498bd7f88f216b6475c
parent069fa2c39ec7120656a2ea8cca83c5ee41ddab60 (diff)
downloadexternal_wpa_supplicant_8-adddfc48d2d7bfa2b1a2405ab8f404b6383ec236.zip
external_wpa_supplicant_8-adddfc48d2d7bfa2b1a2405ab8f404b6383ec236.tar.gz
external_wpa_supplicant_8-adddfc48d2d7bfa2b1a2405ab8f404b6383ec236.tar.bz2
P2P: Fix p2p_cancel processing during group formation
The wpa_s->p2p_in_provisioning flag did not get cleared in some cases where p2p_cancel command is used to stop group formation. This can result in some operations (like p2p_find) failing afterwards. Fix this by using wpas_group_formation_completed() when processing p2p_cancel for a group that has not yet completed group formation. Bug: 7280743 Change-Id: I2dea935bd7c0509237de54bd048954f75ce80bfc Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index c721a29..a51254a 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -5197,6 +5197,10 @@ int wpas_p2p_cancel(struct wpa_supplicant *wpa_s)
found = 1;
eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
wpa_s->parent, NULL);
+ if (wpa_s->p2p_in_provisioning) {
+ wpas_group_formation_completed(wpa_s, 0);
+ break;
+ }
wpas_p2p_group_delete(wpa_s,
P2P_GROUP_REMOVAL_REQUESTED);
break;