From: Pavan Kumar Date: Tue, 15 Jan 2013 09:52:20 +0000 (+0200) Subject: P2P: Send P2P-FIND-STOPPED event in the new continue-search states X-Git-Tag: aosp-kk-from-upstream~622 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a16ed53a06d35857a5c6dc0f552d88d91e51642b;p=thirdparty%2Fhostap.git P2P: Send P2P-FIND-STOPPED event in the new continue-search states The P2P-FIND-STOPPED event was sent only in the P2P_SEARCH state, but this needs to be send also in the new continue-search-when-ready states P2P_CONTINUE_SEARCH_WHEN_READY and P2P_SEARCH_WHEN_READY for consistent behavior. Signed-hostap: Jouni Malinen --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index a21781685..43f8673db 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1077,7 +1077,9 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq) wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Stopping find"); eloop_cancel_timeout(p2p_find_timeout, p2p, NULL); p2p_clear_timeout(p2p); - if (p2p->state == P2P_SEARCH) + if (p2p->state == P2P_SEARCH || + p2p->state == P2P_CONTINUE_SEARCH_WHEN_READY || + p2p->state == P2P_SEARCH_WHEN_READY) wpa_msg(p2p->cfg->msg_ctx, MSG_INFO, P2P_EVENT_FIND_STOPPED); p2p_set_state(p2p, P2P_IDLE); p2p_free_req_dev_types(p2p);