summaryrefslogtreecommitdiffstats
path: root/src/net/tcp.c
diff options
context:
space:
mode:
authorMichael Brown2010-06-15 19:13:36 +0200
committerMichael Brown2010-06-22 15:30:20 +0200
commitc760ac3022ed655e857126ca8ed4df3bfc7ce15a (patch)
tree591b868661f9a15309772cab6ba6b88bc032e31b /src/net/tcp.c
parent[refcnt] Add ref_init() wrapper function (diff)
downloadipxe-c760ac3022ed655e857126ca8ed4df3bfc7ce15a.tar.gz
ipxe-c760ac3022ed655e857126ca8ed4df3bfc7ce15a.tar.xz
ipxe-c760ac3022ed655e857126ca8ed4df3bfc7ce15a.zip
[retry] Add timer_init() wrapper function
Standardise on using timer_init() to initialise an embedded retry timer, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tcp.c')
-rw-r--r--src/net/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index 449f434a..118c6d0f 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -226,12 +226,12 @@ static int tcp_open ( struct xfer_interface *xfer, struct sockaddr *peer,
DBGC ( tcp, "TCP %p allocated\n", tcp );
ref_init ( &tcp->refcnt, NULL );
xfer_init ( &tcp->xfer, &tcp_xfer_operations, &tcp->refcnt );
+ timer_init ( &tcp->timer, tcp_expired );
tcp->prev_tcp_state = TCP_CLOSED;
tcp->tcp_state = TCP_STATE_SENT ( TCP_SYN );
tcp_dump_state ( tcp );
tcp->snd_seq = random();
INIT_LIST_HEAD ( &tcp->queue );
- tcp->timer.expired = tcp_expired;
memcpy ( &tcp->peer, st_peer, sizeof ( tcp->peer ) );
/* Bind to local port */