libs/libc/netdb/lib_dnsbind.c: Make DNS recevie timeout configurable.
This commit is contained in:
parent
71a6244198
commit
ec00670eb7
|
@ -54,6 +54,13 @@ menuconfig NETDB_DNSCLIENT
|
|||
|
||||
if NETDB_DNSCLIENT
|
||||
|
||||
config NETDB_DNSCLIENT_RECV_TIMEOUT
|
||||
int "DNS receive tiemout"
|
||||
default 30
|
||||
---help---
|
||||
This the timeout value when DNS receive response after
|
||||
dns_send_query, unit: seconds
|
||||
|
||||
config NETDB_DNSCLIENT_ENTRIES
|
||||
int "Number of DNS resolver entries"
|
||||
default 0 if DEFAULT_SMALL
|
||||
|
|
|
@ -107,7 +107,7 @@ int dns_bind(void)
|
|||
|
||||
/* Set up a receive timeout */
|
||||
|
||||
tv.tv_sec = 30;
|
||||
tv.tv_sec = CONFIG_NETDB_DNSCLIENT_RECV_TIMEOUT;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval));
|
||||
|
|
Loading…
Reference in New Issue