Message ID | 487748591.372101438600217285.JavaMail.weblogic@epmlwas03c |
---|---|
State | Rejected |
Headers | show |
On Mon, Aug 03, 2015 at 11:10:17AM +0000, Avichal Agarwal wrote: > According to spcs if p2p is already connected then connection request can not be done. > So if p2p is connected , it will return FAIL. There is no such requirement in the P2P spec -- a device can support multiple concurrent P2P groups. As such, I'm not applying this.
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 04db856..f17dd68 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4986,6 +4986,11 @@ int wpas_p2p_connect(struct wpa_supplicant *wpa_s, const u8 *peer_addr, if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL) return -1; + + if(wpa_s->wpa_state == WPA_COMPLETED) { + wpa_printf(MSG_INFO, "P2P: Already connected \n"); + return -1; + } if (persistent_id >= 0) { ssid = wpa_config_get_network(wpa_s->conf, persistent_id);