summaryrefslogtreecommitdiff
path: root/src/net/udp/dhcp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-06-15 18:13:36 +0100
committerMichael Brown <mcb30@ipxe.org>2010-06-22 14:30:20 +0100
commitc760ac3022ed655e857126ca8ed4df3bfc7ce15a (patch)
tree591b868661f9a15309772cab6ba6b88bc032e31b /src/net/udp/dhcp.c
parent4bfd5b52c1fae75eb0449af626ec69543f9334fa (diff)
downloadqemu-ipxe-c760ac3022ed655e857126ca8ed4df3bfc7ce15a.tar.gz
[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/dhcp.c')
-rw-r--r--src/net/udp/dhcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 33212b06..fff331f7 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -1442,10 +1442,10 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev ) {
ref_init ( &dhcp->refcnt, dhcp_free );
job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );
+ timer_init ( &dhcp->timer, dhcp_timer_expired );
dhcp->netdev = netdev_get ( netdev );
dhcp->local.sin_family = AF_INET;
dhcp->local.sin_port = htons ( BOOTPC_PORT );
- dhcp->timer.expired = dhcp_timer_expired;
/* Instantiate child objects and attach to our interfaces */
if ( ( rc = xfer_open_socket ( &dhcp->xfer, SOCK_DGRAM, &dhcp_peer,
@@ -1545,13 +1545,13 @@ int start_pxebs ( struct job_interface *job, struct net_device *netdev,
ref_init ( &dhcp->refcnt, dhcp_free );
job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );
+ timer_init ( &dhcp->timer, dhcp_timer_expired );
dhcp->netdev = netdev_get ( netdev );
dhcp->local.sin_family = AF_INET;
fetch_ipv4_setting ( netdev_settings ( netdev ), &ip_setting,
&dhcp->local.sin_addr );
dhcp->local.sin_port = htons ( BOOTPC_PORT );
dhcp->pxe_type = cpu_to_le16 ( pxe_type );
- dhcp->timer.expired = dhcp_timer_expired;
/* Construct PXE boot server IP address lists */
pxe_discovery_control =