From: Andrei Otcheretianski Date: Thu, 24 Sep 2015 17:37:51 +0000 (+0300) Subject: P2P: Cancel extended listen on p2p_flush() X-Git-Tag: hostap_2_6~1568 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3de16768beacd90bfe53dfa2afcacf74505f032;p=thirdparty%2Fhostap.git P2P: Cancel extended listen on p2p_flush() 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 --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 767706c01..c876f19ce 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -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) {