[PATCH] P2P: Add missing stop_listen call in p2p_state_timeout

Jouni Malinen j
Sun Sep 28 09:44:56 PDT 2014


On Fri, Sep 12, 2014 at 10:22:19AM +0300, Constantin Musca wrote:
> When a P2P timeout occurs and p2p_state_timeout is executed, the stop_listen
> function should also be called besides setting in_listen to zero to avoid
> the incorrect cancellation of the new start_listen request ("P2P: Reject
> start_listen since p2p_listen_work already exists").

Could you please clarify in what kind of sequence you were seeing
start_listen getting rejected? The earlier commit
17e20912790a2cca616ddd2856e60e871a377726 ('P2P: Fix radio work
issue with wait-for-peer GO Negotiation') was also addressing a case
that hit this case and I would like to understand whether you are
addressing the same issue or something else.

> diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
> @@ -3451,6 +3451,7 @@ static void p2p_state_timeout(void *eloop_ctx, void *timeout_ctx)
>  	p2p_dbg(p2p, "Timeout (state=%s)", p2p_state_txt(p2p->state));
>  
>  	p2p->in_listen = 0;
> +	p2p->cfg->stop_listen(p2p->cfg->cb_ctx);

I'm not completely sure about this change since it is quite different
approach compared to how stop_listen is used currently. As such, I'd
like to understand better the case(s) you are trying to address with
this change.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list