]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[retry] Use start_timer_fixed() instead of direct timeout manipulation
authorMichael Brown <mcb30@ipxe.org>
Tue, 15 Jun 2010 17:16:02 +0000 (18:16 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 22 Jun 2010 13:32:49 +0000 (14:32 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/ipv4.c
src/net/tcp.c

index 2354097b7e259c818ae17f9ceeaf5ae58200e569..9548652701efd8fca5b358d519d016c1a95a0b2e 100644 (file)
@@ -225,8 +225,7 @@ static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) {
 
                /* Set the reassembly timer */
                timer_init ( &fragbuf->frag_timer, ipv4_frag_expired );
-               fragbuf->frag_timer.timeout = IP_FRAG_TIMEOUT;
-               start_timer ( &fragbuf->frag_timer );
+               start_timer_fixed ( &fragbuf->frag_timer, IP_FRAG_TIMEOUT );
 
                /* Add the fragment buffer to the list of fragment buffers */
                list_add ( &fragbuf->list, &frag_buffers );
index 118c6d0fe14dd6e67edcd313e685f2006be2729d..b5b9ff608919931b1b30195734e7636b5e8b7250 100644 (file)
@@ -1016,8 +1016,7 @@ static int tcp_rx ( struct io_buffer *iobuf,
         * timer to expire and cause the connection to be freed.
         */
        if ( TCP_CLOSED_GRACEFULLY ( tcp->tcp_state ) ) {
-               tcp->timer.timeout = ( 2 * TCP_MSL );
-               start_timer ( &tcp->timer );
+               start_timer_fixed ( &tcp->timer, ( 2 * TCP_MSL ) );
        }
 
        return 0;