From: Jouni Malinen Date: Sun, 1 Mar 2015 20:35:21 +0000 (+0200) Subject: P2P: Continue find in GO-Neg-Resp-fail status corner cases X-Git-Tag: hostap_2_4~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de7c06ee171942d42d81189e235220c9c8d037dd;p=thirdparty%2Fhostap.git P2P: Continue find in GO-Neg-Resp-fail status corner cases It was possible for the GO Negotiation Response (failure) TX status to be processed at a point where there is no P2P timeout to continue search. Avoid stopping the ongoing search operation by explicitly restarting it from this callback. Signed-off-by: Jouni Malinen --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 32f68334d..6adb3dc20 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -3521,13 +3521,19 @@ static void p2p_go_neg_resp_failure_cb(struct p2p_data *p2p, int success, p2p_dbg(p2p, "GO Negotiation Response (failure) TX callback: success=%d", success); if (p2p->go_neg_peer && p2p->go_neg_peer->status != P2P_SC_SUCCESS) { p2p_go_neg_failed(p2p, p2p->go_neg_peer->status); - } else if (success) { + return; + } + + if (success) { struct p2p_device *dev; dev = p2p_get_device(p2p, addr); if (dev && dev->status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) dev->flags |= P2P_DEV_PEER_WAITING_RESPONSE; } + + if (p2p->state == P2P_SEARCH || p2p->state == P2P_SD_DURING_FIND) + p2p_continue_find(p2p); }