Added improved debug for Win32 BIP init (CN)

This commit is contained in:
skarg
2007-04-04 12:42:08 +00:00
parent 23807e0c83
commit 09c774418a
+8 -3
View File
@@ -51,11 +51,16 @@ static long gethostaddr(void)
if (gethostname(host_name, sizeof(host_name)) != 0)
return -1;
#ifdef BIP_DEBUG
printf("host name: %s\n", host_name);
#endif
if ((host_ent = gethostbyname(host_name)) == NULL)
return -1;
#ifdef BIP_DEBUG
printf("host: %s at %03u.%03u.%03u.%03u\n", host_name,
((uint8_t*)host_ent->h_addr)[0],
((uint8_t*)host_ent->h_addr)[1],
((uint8_t*)host_ent->h_addr)[2],
((uint8_t*)host_ent->h_addr)[3]);
#endif
return *(long *) host_ent->h_addr;
}