From 7e68be38e46d8f6cc7d5bc8083fe470d0418fb4f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 15 May 2014 22:16:19 +0300 Subject: [PATCH] P2P: Refrain from performing extended listen during PD Extend the previous commit 0f1034e3889e7b8f54ed59317f1234db8167d12e to skip extended listen also based on ongoing provision discovery operation (which does not show up as a separate P2P module state and as such, was not coveraged by the previous commit). Signed-off-by: Jouni Malinen --- src/p2p/p2p.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 5e227ec30..442e47357 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -3849,8 +3849,10 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx) p2p_ext_listen_timeout, p2p, NULL); } - if (p2p->cfg->is_p2p_in_progress && - p2p->cfg->is_p2p_in_progress(p2p->cfg->cb_ctx)) { + if ((p2p->cfg->is_p2p_in_progress && + p2p->cfg->is_p2p_in_progress(p2p->cfg->cb_ctx)) || + (p2p->pending_action_state == P2P_PENDING_PD && + p2p->pd_retries > 0)) { p2p_dbg(p2p, "Operation in progress - skip Extended Listen timeout (%s)", p2p_state_txt(p2p->state)); return;