summaryrefslogtreecommitdiffstats
path: root/src/net/udp/tftp.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/udp/tftp.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/udp/tftp.c')
-rw-r--r--src/net/udp/tftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index 49c857fb..5e98f58c 100644
--- a/src/net/udp/tftp.c
+++ b/src/net/udp/tftp.c
@@ -1136,13 +1136,13 @@ static int tftp_core_open ( struct xfer_interface *xfer, struct uri *uri,
return -ENOMEM;
ref_init ( &tftp->refcnt, tftp_free );
xfer_init ( &tftp->xfer, &tftp_xfer_operations, &tftp->refcnt );
- tftp->uri = uri_get ( uri );
xfer_init ( &tftp->socket, &tftp_socket_operations, &tftp->refcnt );
xfer_init ( &tftp->mc_socket, &tftp_mc_socket_operations,
&tftp->refcnt );
+ timer_init ( &tftp->timer, tftp_timer_expired );
+ tftp->uri = uri_get ( uri );
tftp->blksize = TFTP_DEFAULT_BLKSIZE;
tftp->flags = flags;
- tftp->timer.expired = tftp_timer_expired;
/* Open socket */
tftp->port = uri_port ( tftp->uri, default_port );