fixing hostname error problem

This commit is contained in:
solusipse
2013-09-16 22:49:39 +02:00
parent 8b553306f0
commit 6ee6fa3100

View File

@@ -156,7 +156,8 @@ struct client_data get_client_address(struct sockaddr_in client_address)
hostp = gethostbyaddr((const char *)&client_address.sin_addr.s_addr, sizeof(client_address.sin_addr.s_addr), AF_INET); hostp = gethostbyaddr((const char *)&client_address.sin_addr.s_addr, sizeof(client_address.sin_addr.s_addr), AF_INET);
if (hostp == NULL) if (hostp == NULL)
{ {
nerror("ERROR: Couldn't obtain client's hostname"); /*nerror("ERROR: Couldn't obtain client's hostname");*/
printf("ERROR: Couldn't obtain client's hostname");
data.hostname = "error"; data.hostname = "error";
} }
else else