]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2PS: Send P2P_FIND_STOPPED event during P2P SD also
authorKrishna Vamsi <vamsin@qti.qualcomm.com>
Fri, 17 Oct 2014 11:44:48 +0000 (17:14 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 2 Feb 2015 23:35:07 +0000 (01:35 +0200)
During service discovery if P2P_FIND times out, P2P_FIND_STOPPED event
is sent to upper layers to allow follow up P2P_FIND commands. This needs
to be done also in case an SD was in progress during the find operation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p.c

index f59e919d243a5792c6fdcd9ed4d2817ea50d454a..07776b2aaa0c5b151dac7386039ecfbf4be3dced 100644 (file)
@@ -1265,7 +1265,7 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq)
        p2p_dbg(p2p, "Stopping find");
        eloop_cancel_timeout(p2p_find_timeout, p2p, NULL);
        p2p_clear_timeout(p2p);
-       if (p2p->state == P2P_SEARCH)
+       if (p2p->state == P2P_SEARCH || p2p->state == P2P_SD_DURING_FIND)
                p2p->cfg->find_stopped(p2p->cfg->cb_ctx);
 
        p2p->p2ps_seek_count = 0;