[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>
This commit is contained in:
Michael Brown
2010-06-22 14:30:20 +01:00
parent 4bfd5b52c1
commit c760ac3022
9 changed files with 23 additions and 11 deletions
+2 -2
View File
@@ -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 );