mirror of https://github.com/BOINC/boinc.git
- client: (unix): if host name lookup fails, call res_init().
This is an attempt to fix a problem on Linux where, if the client starts before a VPN is set up, it can never communicate svn path=/trunk/boinc/; revision=17711
This commit is contained in:
parent
969e1043a7
commit
bc889ca27a
|
@ -3486,3 +3486,13 @@ David 30 Mar 2009
|
|||
|
||||
lib/
|
||||
gui_rpc_client_ops.cpp
|
||||
|
||||
David 31 Mar 2009
|
||||
- client: (unix): if host name lookup fails, call res_init().
|
||||
This is an attempt to fix a problem on Linux where,
|
||||
if the client starts before a VPN is set up, it can never communicate
|
||||
|
||||
client/
|
||||
http_curl.cpp
|
||||
lib/
|
||||
network.cpp,h
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <resolv.h>
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
@ -199,6 +200,11 @@ int WinsockCleanup() {
|
|||
return WSACleanup();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void reset_dns() {
|
||||
#ifndef _WIN32
|
||||
res_init();
|
||||
#endif
|
||||
}
|
||||
const char *BOINC_RCSID_557bf0741f="$Id$";
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue