mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +03:00
[retry] Use start_timer_fixed() instead of direct timeout manipulation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -225,8 +225,7 @@ static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) {
|
|||||||
|
|
||||||
/* Set the reassembly timer */
|
/* Set the reassembly timer */
|
||||||
timer_init ( &fragbuf->frag_timer, ipv4_frag_expired );
|
timer_init ( &fragbuf->frag_timer, ipv4_frag_expired );
|
||||||
fragbuf->frag_timer.timeout = IP_FRAG_TIMEOUT;
|
start_timer_fixed ( &fragbuf->frag_timer, IP_FRAG_TIMEOUT );
|
||||||
start_timer ( &fragbuf->frag_timer );
|
|
||||||
|
|
||||||
/* Add the fragment buffer to the list of fragment buffers */
|
/* Add the fragment buffer to the list of fragment buffers */
|
||||||
list_add ( &fragbuf->list, &frag_buffers );
|
list_add ( &fragbuf->list, &frag_buffers );
|
||||||
|
|||||||
@@ -1016,8 +1016,7 @@ static int tcp_rx ( struct io_buffer *iobuf,
|
|||||||
* timer to expire and cause the connection to be freed.
|
* timer to expire and cause the connection to be freed.
|
||||||
*/
|
*/
|
||||||
if ( TCP_CLOSED_GRACEFULLY ( tcp->tcp_state ) ) {
|
if ( TCP_CLOSED_GRACEFULLY ( tcp->tcp_state ) ) {
|
||||||
tcp->timer.timeout = ( 2 * TCP_MSL );
|
start_timer_fixed ( &tcp->timer, ( 2 * TCP_MSL ) );
|
||||||
start_timer ( &tcp->timer );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user