diff options
| author | Michael Brown | 2010-06-15 19:16:02 +0200 |
|---|---|---|
| committer | Michael Brown | 2010-06-22 15:32:49 +0200 |
| commit | 5fa6775b617d4e2b7911c062996fd5ffe799e4cb (patch) | |
| tree | a94cc1ac6413f148db36fa9b25dab6ec874cae81 /src | |
| parent | [retry] Add timer_init() wrapper function (diff) | |
| download | ipxe-5fa6775b617d4e2b7911c062996fd5ffe799e4cb.tar.gz ipxe-5fa6775b617d4e2b7911c062996fd5ffe799e4cb.tar.xz ipxe-5fa6775b617d4e2b7911c062996fd5ffe799e4cb.zip | |
[retry] Use start_timer_fixed() instead of direct timeout manipulation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/ipv4.c | 3 | ||||
| -rw-r--r-- | src/net/tcp.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 2354097b7..954865270 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -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 ); diff --git a/src/net/tcp.c b/src/net/tcp.c index 118c6d0fe..b5b9ff608 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -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; |
