|
gethostbyname_r returns NULL when hostname has dash
We have a code to find the DNS entry of a host that has a trailing '-' in its url (format example: mysite-.watch.com):
if(gethostbyname_r(host,host_ent,host_buffer,host_buffer_size,&host_error)==NULL)
{
//failed
}
But when remove the '-' from the host name the code does not return failure. IE and nslookup works fine.
What we need to do in such a case?
Last edited by uunniixx; 05-15-2008 at 06:20 PM.
|