rename dns_init to fiber_dns_init internal

This commit is contained in:
shuxin   zheng 2020-10-09 14:16:46 +08:00
parent df87f8e2af
commit 5ca8be3da4
4 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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));

View File

@ -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