From: Rahul Jain Date: Thu, 20 Feb 2014 11:04:09 +0000 (+0530) Subject: P2P: Fix missing eloop_cancel_timeout in invitation trigger X-Git-Tag: hostap_2_2~822 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aef5047acc971c97622c85236f0cd84d169221e6;p=thirdparty%2Fhostap.git 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 --- 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; }