]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Continue listening next request if no post-PD operations
authorJimmy Chen <jimmycmchen@google.com>
Thu, 17 Oct 2019 13:36:50 +0000 (21:36 +0800)
committerJouni Malinen <j@w1.fi>
Fri, 25 Oct 2019 13:03:37 +0000 (16:03 +0300)
If there are no post-provision discovery operations, we should continue
in find mode to avoid getting the p2p_find operation stopped (stuck in
SEARCH state) unexpectedly.

Signed-off-by: Jimmy Chen <jimmycmchen@google.com>
src/p2p/p2p.c

index a08ba02686c6050f1cd845dfa291322318ea1521..24e429c590b7f5ab9e217ef24ffd2845d0216dde 100644 (file)
@@ -3451,12 +3451,18 @@ static void p2p_prov_disc_resp_cb(struct p2p_data *p2p, int success)
 
        p2p->pending_action_state = P2P_NO_PENDING_ACTION;
 
-       if (!success)
+       if (!success) {
+               if (p2p->state == P2P_SEARCH)
+                       p2p_continue_find(p2p);
                return;
+       }
 
        if (!p2p->cfg->prov_disc_resp_cb ||
-           p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1)
+           p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1) {
+               if (p2p->state == P2P_SEARCH)
+                       p2p_continue_find(p2p);
                return;
+       }
 
        p2p_dbg(p2p,
                "Post-Provision Discovery operations started - do not try to continue other P2P operations");