patch-2.3.43 linux/net/ipv4/igmp.c

Next file: linux/net/ipv4/ip_fragment.c
Previous file: linux/net/ipv4/icmp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/net/ipv4/igmp.c linux/net/ipv4/igmp.c
@@ -8,7 +8,7 @@
  *	the older version didn't come out right using gcc 2.5.8, the newer one
  *	seems to fall out with gcc 2.6.2.
  *
- *	Version: $Id: igmp.c,v 1.36 2000/01/06 00:41:54 davem Exp $
+ *	Version: $Id: igmp.c,v 1.37 2000/02/09 11:16:40 davem Exp $
  *
  *	Authors:
  *		Alan Cox <Alan.Cox@linux.org>
@@ -154,11 +154,9 @@
 	int tv=net_random() % max_delay;
 
 	spin_lock_bh(&im->lock);
-	if (!del_timer(&im->timer))
-		atomic_inc(&im->refcnt);
-	im->timer.expires=jiffies+tv+2;
 	im->tm_running=1;
-	add_timer(&im->timer);
+	if (!mod_timer(&im->timer, jiffies+tv+2))
+		atomic_inc(&im->refcnt);
 	spin_unlock_bh(&im->lock);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)