]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Cancel extended listen on p2p_flush()
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 24 Sep 2015 17:37:51 +0000 (20:37 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 7 Oct 2015 14:07:21 +0000 (17:07 +0300)
It is expected that p2p_flush() should stop any ongoing p2p operation.
However, this was not the case with extended listen which was not
cancelled on p2p_flush() flows. Fix this, by cancelling the extended
listen in p2p_flush().

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/p2p/p2p.c

index 767706c01d6b318de1977fa0cf98f302997565cd..c876f19ce289218cc4a4f381bc068cee1e44b999 100644 (file)
@@ -2944,7 +2944,6 @@ void p2p_deinit(struct p2p_data *p2p)
        wpabuf_free(p2p->wfd_coupled_sink_info);
 #endif /* CONFIG_WIFI_DISPLAY */
 
-       eloop_cancel_timeout(p2p_ext_listen_timeout, p2p, NULL);
        eloop_cancel_timeout(p2p_scan_timeout, p2p, NULL);
        eloop_cancel_timeout(p2p_go_neg_start, p2p, NULL);
        eloop_cancel_timeout(p2p_go_neg_wait_timeout, p2p, NULL);
@@ -2971,6 +2970,8 @@ void p2p_deinit(struct p2p_data *p2p)
 void p2p_flush(struct p2p_data *p2p)
 {
        struct p2p_device *dev, *prev;
+
+       p2p_ext_listen(p2p, 0, 0);
        p2p_stop_find(p2p);
        dl_list_for_each_safe(dev, prev, &p2p->devices, struct p2p_device,
                              list) {