diff --git a/checkin_notes b/checkin_notes index 0772b4fe4d..e367cff26a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3826,3 +3826,12 @@ Rytis 11 Apr 2009 html/inc/ util.inc + +David 12 Apr 2009 + - client: put back the call to res_init() on lookup failure. + Apparently it worked after all. + + client/ + http_curl.cpp + lib/ + network.cpp,h diff --git a/client/http_curl.cpp b/client/http_curl.cpp index 2de133b451..83b949b7a4 100644 --- a/client/http_curl.cpp +++ b/client/http_curl.cpp @@ -1038,6 +1038,7 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) { strcpy(error_msg, curl_easy_strerror(CurlResult)); switch(CurlResult) { case CURLE_COULDNT_RESOLVE_HOST: + reset_dns(); http_op_retval = ERR_GETHOSTBYNAME; break; case CURLE_COULDNT_CONNECT: diff --git a/lib/network.cpp b/lib/network.cpp index befc1e2821..542f9eab30 100644 --- a/lib/network.cpp +++ b/lib/network.cpp @@ -202,4 +202,10 @@ int WinsockCleanup() { #endif +void reset_dns() { +#ifndef _WIN32 + res_init(); +#endif +} + const char *BOINC_RCSID_557bf0741f="$Id$"; diff --git a/lib/network.h b/lib/network.h index 69e03d3d0b..26094e04a2 100644 --- a/lib/network.h +++ b/lib/network.h @@ -46,6 +46,7 @@ extern int boinc_socket_asynch(int sock, bool asynch); extern void boinc_close_socket(int sock); extern int get_socket_error(int fd); extern const char* socket_error_str(); +extern void reset_dns(); #if defined(_WIN32) && defined(USE_WINSOCK) typedef int boinc_socklen_t;