From: Deepthi Gowri Date: Thu, 1 Aug 2013 12:39:47 +0000 (+0300) Subject: P2P: Reject p2p_find while P2P connection is in progress X-Git-Tag: aosp-kk-from-upstream~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce970851af76ed96d203d56c660c73ba02c99673;p=thirdparty%2Fhostap.git P2P: Reject p2p_find while P2P connection is in progress Though p2p_find is not expected during ongoing P2P connection, it is possible that any third party application issues a p2p_find resulting in connection failure. Address this by rejecting any p2p_find command while connection is in progress. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 2c363ec41..4d03ea0de 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4746,8 +4746,10 @@ int wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout, return wpa_drv_p2p_find(wpa_s, timeout, type); if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL || - wpa_s->p2p_in_provisioning) + wpa_s->p2p_in_provisioning || wpas_p2p_in_progress(wpa_s)) { + wpa_printf(MSG_DEBUG, "P2P: Reject p2p_find while P2P connection is in progress"); return -1; + } wpa_supplicant_cancel_sched_scan(wpa_s);