mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 20:08:21 +08:00
rename dns_init to fiber_dns_init internal
This commit is contained in:
parent
df87f8e2af
commit
5ca8be3da4
@ -9,7 +9,7 @@ struct dns_resolv_conf *var_dns_conf = NULL;
|
||||
struct dns_hosts *var_dns_hosts = NULL;
|
||||
struct dns_hints *var_dns_hints = NULL;
|
||||
|
||||
void dns_set_read_wait(int timeout)
|
||||
void fiber_dns_set_read_wait(int timeout)
|
||||
{
|
||||
set_read_timeout(timeout);
|
||||
}
|
||||
@ -32,7 +32,7 @@ static void dns_on_exit(void)
|
||||
}
|
||||
}
|
||||
|
||||
void dns_init(void)
|
||||
void fiber_dns_init(void)
|
||||
{
|
||||
#ifdef SYS_WIN
|
||||
static pthread_mutex_t __lock;
|
||||
|
@ -149,7 +149,7 @@ int acl_fiber_getaddrinfo(const char *node, const char *service,
|
||||
}
|
||||
|
||||
if (var_dns_conf == NULL || var_dns_hosts == NULL) {
|
||||
dns_init();
|
||||
fiber_dns_init();
|
||||
}
|
||||
|
||||
*res = NULL;
|
||||
|
@ -170,7 +170,7 @@ int acl_fiber_gethostbyname_r(const char *name, struct hostent *ent,
|
||||
}
|
||||
|
||||
if (var_dns_conf == NULL || var_dns_hosts == NULL) {
|
||||
dns_init();
|
||||
fiber_dns_init();
|
||||
}
|
||||
|
||||
memset(ent, 0, sizeof(struct hostent));
|
||||
|
@ -5,7 +5,7 @@ extern struct dns_resolv_conf *var_dns_conf;
|
||||
extern struct dns_hosts *var_dns_hosts;
|
||||
extern struct dns_hints *var_dns_hints;
|
||||
|
||||
extern void dns_set_read_wait(int timeout);
|
||||
extern void dns_init(void);
|
||||
extern void fiber_dns_set_read_wait(int timeout);
|
||||
extern void fiber_dns_init(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user