]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix missing eloop_cancel_timeout in invitation trigger
authorRahul Jain <rahul.jain@samsung.com>
Thu, 20 Feb 2014 11:04:09 +0000 (16:34 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 21 Feb 2014 11:54:09 +0000 (13:54 +0200)
When a Probe Request frame from an invitation peer is received, a timer
is schedule to start invitation. However, this could have been scheduled
multiple times (once per Probe Request frame) which is undesirable since
only a single invitation should be initiated.

Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
src/p2p/p2p.c

index b88a10640a87cb5de6e9397df52fb85875bd155f..6f3cd6877be7c59bb732118774f0820d046e0cc1 100644 (file)
@@ -2143,6 +2143,7 @@ p2p_probe_req_rx(struct p2p_data *p2p, const u8 *addr, const u8 *dst,
            == 0) {
                /* Received a Probe Request from Invite peer */
                p2p_dbg(p2p, "Found Invite peer - try to start Invite from timeout");
+               eloop_cancel_timeout(p2p_invite_start, p2p, NULL);
                eloop_register_timeout(0, 0, p2p_invite_start, p2p, NULL);
                return P2P_PREQ_PROCESSED;
        }