} else { /* Alphanumeric node name: */
printf("HTTCP: Calling gethostbyname2(\"%s\",AF_INET)\n", host);
phost=gethostbyname2(host,AF_INET); /* See netdb.h */
- printf("HTTCP: gethostbyname() returned %d\n", phost);
- printf("HTTCP: h_errno %d\n",h_errno);
if (!phost) {
printf(
- "HTTPAccess: Can't find internet node name `%s'.\n",host);
+ "HTTPAccess: Can't find internet node name `%s', h_errno: %d.\n",host,h_errno);
return -1; /* Fail? */
}
memcpy(&sin->sin_addr, phost->h_addr, phost->h_length);