]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not indicate P2P_FIND failure if p2p_scan is in progress
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 10 Feb 2014 12:36:39 +0000 (14:36 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 11 Feb 2014 10:29:39 +0000 (12:29 +0200)
It was possible to FAIL return for a P2P_FIND command that was issued
while an already started P2P_FIND operation was in the scan phase. This
can be confusing for upper layer software, so hide the failure report
from the ctrl_iface response. The previously started scan will continue
the find operation after this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/p2p/p2p.c

index c103c0211188d1a5f8539105519c854d3e281714..3010377e546d7aa38c30735839a8fad2b26faa2d 100644 (file)
@@ -1049,6 +1049,7 @@ int p2p_find(struct p2p_data *p2p, unsigned int timeout,
        } else if (p2p->p2p_scan_running) {
                p2p_dbg(p2p, "Failed to start p2p_scan - another p2p_scan was already running");
                /* wait for the previous p2p_scan to complete */
+               res = 0; /* do not report failure */
        } else {
                p2p_dbg(p2p, "Failed to start p2p_scan");
                p2p_set_state(p2p, P2P_IDLE);