[PATCH] P2P: Notify upper framework on stopping the p2p_find(SEARCH)
Jouni Malinen
j
Sun Jan 22 07:23:04 PST 2012
On Wed, Jan 18, 2012 at 01:51:59PM -0800, Jithu Jance wrote:
> This patch notifies the upper framework that an on-going discovery has been stopped. This is useful in cases where
> a p2p_find with a timeout value initiated by the upper framework has been finished or when the framework initiated
> "p2p_find" is stopped by a "p2p_connect".
Thanks, applied.
> diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
> @@ -994,6 +995,10 @@ 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) {
> + wpa_printf(MSG_DEBUG, "P2P-FIND-STOPPED");
> + wpa_msg(p2p->cfg->msg_ctx, MSG_INFO, P2P_EVENT_FIND_STOPPED);
> + }
Though, I removed the wpa_printf call here to avoid duplicated entry in
debug log.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list