Message ID | 20140115102251.GA9645@jithu@broadcom.com |
---|---|
State | Accepted |
Headers | show |
On Wed, Jan 15, 2014 at 03:52:51PM +0530, Jithu Jance wrote: > diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c > @@ -56,6 +56,15 @@ static void p2p_expire_peers(struct p2p_data *p2p) > + if (p2p->go_neg_peer && (os_memcmp(p2p->go_neg_peer->info.p2p_device_addr, > + dev->info.p2p_device_addr, ETH_ALEN) == 0)) { Thanks, applied. Though, I replaced this memcpy with simpler dev == p2p->go_neg_peer.
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 083a156..e5877d7 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -56,6 +56,15 @@ static void p2p_expire_peers(struct p2p_data *p2p) if (dev->last_seen.sec + P2P_PEER_EXPIRATION_AGE >= now.sec) continue; + if (p2p->go_neg_peer && (os_memcmp(p2p->go_neg_peer->info.p2p_device_addr, + dev->info.p2p_device_addr, ETH_ALEN) == 0)) { + /* + * GO Negotiation is in progress with the Peer. So don't expire the + * Peer till GO-Neg fails or timeout happens + */ + continue; + } + if (p2p->cfg->go_connected && p2p->cfg->go_connected(p2p->cfg->cb_ctx, dev->info.p2p_device_addr)) {