patch-1.3.14 linux/net/ipv4/tcp.c

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

diff -u --recursive --new-file v1.3.13/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -596,7 +596,7 @@
 		when=3;
 		printk("Error: Negative timer in xmit_timer\n");
 	}
-	sk->retransmit_timer.expires=when;
+	sk->retransmit_timer.expires=jiffies+when;
 	add_timer(&sk->retransmit_timer);
 }
 
@@ -749,7 +749,7 @@
 	if (sk->inuse || in_bh) 
 	{
 		/* Try again in 1 second */
-		sk->retransmit_timer.expires = HZ;
+		sk->retransmit_timer.expires = jiffies+HZ;
 		add_timer(&sk->retransmit_timer);
 		sti();
 		return;
@@ -1302,7 +1302,7 @@
 	/*
 	 *	Wait up to 1 second for the buffer to fill.
 	 */
-	sk->partial_timer.expires = HZ;
+	sk->partial_timer.expires = jiffies+HZ;
 	sk->partial_timer.function = (void (*)(unsigned long)) tcp_send_partial;
 	sk->partial_timer.data = (unsigned long) sk;
 	add_timer(&sk->partial_timer);
@@ -1956,7 +1956,7 @@
 		{
 			/* Force it to send an ack soon. */
 			int was_active = del_timer(&sk->retransmit_timer);
-			if (!was_active || TCP_ACK_TIME < sk->timer.expires) 
+			if (!was_active || jiffies+TCP_ACK_TIME < sk->timer.expires) 
 			{
 				reset_xmit_timer(sk, TIME_WRITE, TCP_ACK_TIME);
 			} 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this