SET_SS_FAMILY(&server_p->bind4, AF_UNSPEC);
SET_SS_LEN(&server_p->bind4, sizeof(struct sockaddr_in));
-#ifdef RB_IPV6
SET_SS_FAMILY(&server_p->connect6, AF_UNSPEC);
SET_SS_LEN(&server_p->connect6, sizeof(struct sockaddr_in6));
SET_SS_FAMILY(&server_p->bind6, AF_UNSPEC);
SET_SS_LEN(&server_p->bind6, sizeof(struct sockaddr_in6));
-#endif
server_p->aftype = AF_UNSPEC;
if(aftype == AF_INET)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->connect4);
+ rb_inet_pton_sock(result, &server_p->connect4);
server_p->dns_query_connect4 = 0;
}
-#ifdef RB_IPV6
else if(aftype == AF_INET6)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->connect6);
+ rb_inet_pton_sock(result, &server_p->connect6);
server_p->dns_query_connect6 = 0;
}
-#endif
}
/*
if(aftype == AF_INET)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->bind4);
+ rb_inet_pton_sock(result, &server_p->bind4);
server_p->dns_query_bind4 = 0;
}
-#ifdef RB_IPV6
else if(aftype == AF_INET6)
{
if(status == 1)
- rb_inet_pton_sock(result, (struct sockaddr *)&server_p->bind6);
+ rb_inet_pton_sock(result, &server_p->bind6);
server_p->dns_query_bind6 = 0;
}
-#endif
}
void
{
server_p->dns_query_connect4 =
lookup_hostname(server_p->connect_host, AF_INET, conf_connect_dns_callback, server_p);
-#ifdef RB_IPV6
server_p->dns_query_connect6 =
lookup_hostname(server_p->connect_host, AF_INET6, conf_connect_dns_callback, server_p);
-#endif
}
if(server_p->bind_host)
{
server_p->dns_query_bind4 =
lookup_hostname(server_p->bind_host, AF_INET, conf_bind_dns_callback, server_p);
-#ifdef RB_IPV6
server_p->dns_query_bind6 =
lookup_hostname(server_p->bind_host, AF_INET6, conf_bind_dns_callback, server_p);
-#endif
}
}