From: Jithu Jance Date: Wed, 15 Jan 2014 10:22:51 +0000 (+0530) Subject: P2P: Don't expire the peer, if GO Negotiation is in progress X-Git-Tag: hostap_2_1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a691d99ff58e7b0f6cbc2aacfbde7ac985538483;p=thirdparty%2Fhostap.git P2P: Don't expire the peer, if GO Negotiation is in progress This adds one more case of active P2P peer detection so that p2p_expire_peers() cannot hit a case where a GO Negotiation peer would be removed. Signed-hostap: Jithu Jance --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 083a156b7..138ba16bd 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 (dev == p2p->go_neg_peer) { + /* + * GO Negotiation is in progress with the peer, so + * don't expire the peer entry until GO Negotiation + * fails or times out. + */ + continue; + } + if (p2p->cfg->go_connected && p2p->cfg->go_connected(p2p->cfg->cb_ctx, dev->info.p2p_device_addr)) {