Browse Source

[retry] Use start_timer_fixed() instead of direct timeout manipulation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
5fa6775b61
2 changed files with 2 additions and 4 deletions
  1. 1
    2
      src/net/ipv4.c
  2. 1
    2
      src/net/tcp.c

+ 1
- 2
src/net/ipv4.c View File

225
 
225
 
226
 		/* Set the reassembly timer */
226
 		/* Set the reassembly timer */
227
 		timer_init ( &fragbuf->frag_timer, ipv4_frag_expired );
227
 		timer_init ( &fragbuf->frag_timer, ipv4_frag_expired );
228
-		fragbuf->frag_timer.timeout = IP_FRAG_TIMEOUT;
229
-		start_timer ( &fragbuf->frag_timer );
228
+		start_timer_fixed ( &fragbuf->frag_timer, IP_FRAG_TIMEOUT );
230
 
229
 
231
 		/* Add the fragment buffer to the list of fragment buffers */
230
 		/* Add the fragment buffer to the list of fragment buffers */
232
 		list_add ( &fragbuf->list, &frag_buffers );
231
 		list_add ( &fragbuf->list, &frag_buffers );

+ 1
- 2
src/net/tcp.c View File

1016
 	 * timer to expire and cause the connection to be freed.
1016
 	 * timer to expire and cause the connection to be freed.
1017
 	 */
1017
 	 */
1018
 	if ( TCP_CLOSED_GRACEFULLY ( tcp->tcp_state ) ) {
1018
 	if ( TCP_CLOSED_GRACEFULLY ( tcp->tcp_state ) ) {
1019
-		tcp->timer.timeout = ( 2 * TCP_MSL );
1020
-		start_timer ( &tcp->timer );
1019
+		start_timer_fixed ( &tcp->timer, ( 2 * TCP_MSL ) );
1021
 	}
1020
 	}
1022
 
1021
 
1023
 	return 0;
1022
 	return 0;

Loading…
Cancel
Save