mirror of https://github.com/ipxe/ipxe.git
Merge branch 'master' of git://git.etherboot.org/scm/gpxe
commit
c340fe858e
|
@ -35,6 +35,7 @@ struct retry_timer {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void start_timer ( struct retry_timer *timer );
|
extern void start_timer ( struct retry_timer *timer );
|
||||||
|
extern void start_timer_nodelay ( struct retry_timer *timer );
|
||||||
extern void stop_timer ( struct retry_timer *timer );
|
extern void stop_timer ( struct retry_timer *timer );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,6 +73,18 @@ void start_timer ( struct retry_timer *timer ) {
|
||||||
timer, timer->start, ( timer->start + timer->timeout ) );
|
timer, timer->start, ( timer->start + timer->timeout ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start timer with no delay
|
||||||
|
*
|
||||||
|
* @v timer Retry timer
|
||||||
|
*
|
||||||
|
* This starts the timer running with a zero timeout value.
|
||||||
|
*/
|
||||||
|
void start_timer_nodelay ( struct retry_timer *timer ) {
|
||||||
|
start_timer ( timer );
|
||||||
|
timer->timeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop timer
|
* Stop timer
|
||||||
*
|
*
|
||||||
|
|
|
@ -232,7 +232,7 @@ static int tcp_open ( struct xfer_interface *xfer, struct sockaddr *peer,
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* Start timer to initiate SYN */
|
/* Start timer to initiate SYN */
|
||||||
start_timer ( &tcp->timer );
|
start_timer_nodelay ( &tcp->timer );
|
||||||
|
|
||||||
/* Attach parent interface, transfer reference to connection
|
/* Attach parent interface, transfer reference to connection
|
||||||
* list and return
|
* list and return
|
||||||
|
|
|
@ -912,7 +912,7 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev,
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* Start timer to initiate initial DHCPREQUEST */
|
/* Start timer to initiate initial DHCPREQUEST */
|
||||||
start_timer ( &dhcp->timer );
|
start_timer_nodelay ( &dhcp->timer );
|
||||||
|
|
||||||
/* Attach parent interface, mortalise self, and return */
|
/* Attach parent interface, mortalise self, and return */
|
||||||
job_plug_plug ( &dhcp->job, job );
|
job_plug_plug ( &dhcp->job, job );
|
||||||
|
|
|
@ -657,7 +657,7 @@ int tftp_open ( struct xfer_interface *xfer, struct uri *uri ) {
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* Start timer to initiate RRQ */
|
/* Start timer to initiate RRQ */
|
||||||
start_timer ( &tftp->timer );
|
start_timer_nodelay ( &tftp->timer );
|
||||||
|
|
||||||
/* Attach to parent interface, mortalise self, and return */
|
/* Attach to parent interface, mortalise self, and return */
|
||||||
xfer_plug_plug ( &tftp->xfer, xfer );
|
xfer_plug_plug ( &tftp->xfer, xfer );
|
||||||
|
|
Loading…
Reference in New Issue