patch-2.1.25 linux/net/x25/x25_timer.c

Next file: linux/CREDITS
Previous file: linux/net/x25/x25_link.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.24/linux/net/x25/x25_timer.c linux/net/x25/x25_timer.c
@@ -42,36 +42,14 @@
 static void x25_timer(unsigned long);
 
 /*
- *	Linux set/reset timer routines
+ *	Linux set timer
  */
 void x25_set_timer(struct sock *sk)
 {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
-
+	save_flags(flags); cli();
 	del_timer(&sk->timer);
-
-	restore_flags(flags);
-
-	sk->timer.next     = sk->timer.prev = NULL;	
-	sk->timer.data     = (unsigned long)sk;
-	sk->timer.function = &x25_timer;
-	sk->timer.expires  = jiffies + 100;
-
-	add_timer(&sk->timer);
-}
-
-static void x25_reset_timer(struct sock *sk)
-{
-	unsigned long flags;
-
-	save_flags(flags);
-	cli();
-
-	del_timer(&sk->timer);
-
 	restore_flags(flags);
 
 	sk->timer.data     = (unsigned long)sk;
@@ -125,7 +103,7 @@
 	}
 
 	if (sk->protinfo.x25->timer == 0 || --sk->protinfo.x25->timer > 0) {
-		x25_reset_timer(sk);
+		x25_set_timer(sk);
 		return;
 	}
 


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov