[resolv] Use a one-shot process for the numeric resolver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
ccc2655540
commit
5694b71b11
|
@ -88,14 +88,13 @@ struct numeric_resolv {
|
||||||
|
|
||||||
static void numeric_step ( struct numeric_resolv *numeric ) {
|
static void numeric_step ( struct numeric_resolv *numeric ) {
|
||||||
|
|
||||||
process_del ( &numeric->process );
|
|
||||||
if ( numeric->rc == 0 )
|
if ( numeric->rc == 0 )
|
||||||
resolv_done ( &numeric->resolv, &numeric->sa );
|
resolv_done ( &numeric->resolv, &numeric->sa );
|
||||||
intf_shutdown ( &numeric->resolv, numeric->rc );
|
intf_shutdown ( &numeric->resolv, numeric->rc );
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct process_descriptor numeric_process_desc =
|
static struct process_descriptor numeric_process_desc =
|
||||||
PROC_DESC ( struct numeric_resolv, process, numeric_step );
|
PROC_DESC_ONCE ( struct numeric_resolv, process, numeric_step );
|
||||||
|
|
||||||
static int numeric_resolv ( struct interface *resolv,
|
static int numeric_resolv ( struct interface *resolv,
|
||||||
const char *name, struct sockaddr *sa ) {
|
const char *name, struct sockaddr *sa ) {
|
||||||
|
|
Reference in New Issue