diff --git a/checkin_notes b/checkin_notes index a276d6edd6..ed251e9b95 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2557,3 +2557,7 @@ David Dec 5 2002 tools/ backend_lib.C,h create_work.C + +David Dec 6 2002 + - fix bugs in get_local_ip_addr() + (need to figure out why they were happening) diff --git a/client/hostinfo.C b/client/hostinfo.C index 4ac8091ed5..128638ba06 100644 --- a/client/hostinfo.C +++ b/client/hostinfo.C @@ -170,10 +170,15 @@ int get_local_ip_addr_str(char* p) { #if HAVE_NETDB_H || _WIN32 char buf[256]; struct in_addr addr; - if (gethostname(buf, 256)) + if (gethostname(buf, 256)) { + printf("gethostname() didn't return name\n"); return -1; + } struct hostent* he = gethostbyname(buf); - if (!he) return -1; + if (!he || !he->h_addr_list[0]) { + printf("gethostbyname() didn't return any IP addresses\n"); + return -1; + } memcpy(&addr, he->h_addr_list[0], sizeof(addr)); strcpy(p, inet_ntoa(addr)); #endif diff --git a/todo b/todo index 09db044752..9a14005e2b 100755 --- a/todo +++ b/todo @@ -1,3 +1,5 @@ +support for HTTP and SOCKS proxies +make get_local_ip_addr() work in all cases est_time_to_completion doesn't work for non-running tasks get timezone working on all platforms get benchmark working as separate process