mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-07 05:55:06 -05:00
Don't retry resolving in DNS_Name2IPAddress
Instead of retrying to resolve it in the function and blocking for a long time, return a TryAgain status and let the caller retry it later if necessary.
This commit is contained in:
10
nameserv.h
10
nameserv.h
@@ -34,12 +34,20 @@
|
||||
|
||||
#include "addressing.h"
|
||||
|
||||
typedef enum {
|
||||
DNS_Success,
|
||||
DNS_TryAgain,
|
||||
DNS_Failure
|
||||
} DNS_Status;
|
||||
|
||||
/* Resolve names only to selected address family */
|
||||
extern void DNS_SetAddressFamily(int family);
|
||||
|
||||
extern int DNS_Name2IPAddress(const char *name, IPAddr *addr, int retry);
|
||||
extern DNS_Status DNS_Name2IPAddress(const char *name, IPAddr *addr);
|
||||
|
||||
extern int DNS_IPAddress2Name(IPAddr *ip_addr, char *name, int len);
|
||||
|
||||
extern void DNS_Reload(void);
|
||||
|
||||
#endif /* GOT_NAMESERV_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user