From aef5047acc971c97622c85236f0cd84d169221e6 Mon Sep 17 00:00:00 2001 From: Rahul Jain Date: Thu, 20 Feb 2014 16:34:09 +0530 Subject: [PATCH] P2P: Fix missing eloop_cancel_timeout in invitation trigger 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 --- src/p2p/p2p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index b88a10640..6f3cd6877 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -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; } -- 2.47.2