- client: fix crashing bug in proxy autodetect

svn path=/trunk/boinc/; revision=18997
This commit is contained in:
David Anderson 2009-09-03 04:20:09 +00:00
parent 675421d382
commit 7c6adea563
2 changed files with 7 additions and 6 deletions

View File

@ -7473,3 +7473,9 @@ Rom 2 Sept 2009
boinc_gl.h boinc_gl.h
win_build/ win_build/
*.vcproj *.vcproj
David 2 Sept 2009
- client: fix crashing bug in proxy autodetect
client/
sysmon_win.cpp

View File

@ -128,7 +128,6 @@ static void windows_detect_autoproxy_settings() {
char proxy_server[256]; char proxy_server[256];
int proxy_port = 0; int proxy_port = 0;
char proxy_file[256]; char proxy_file[256];
std::wstring user_agent_string;
std::wstring network_test_url; std::wstring network_test_url;
size_t pos; size_t pos;
@ -142,11 +141,10 @@ static void windows_detect_autoproxy_settings() {
WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A; WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A;
autoproxy_options.fAutoLogonIfChallenged = TRUE; autoproxy_options.fAutoLogonIfChallenged = TRUE;
user_agent_string = A2W(std::string(get_user_agent_string())).c_str();
network_test_url = A2W(config.network_test_url).c_str(); network_test_url = A2W(config.network_test_url).c_str();
hWinHttp = pWinHttpOpen( hWinHttp = pWinHttpOpen(
user_agent_string.c_str(), L"BOINC client",
WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_ACCESS_TYPE_NO_PROXY,
WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_NAME,
WINHTTP_NO_PROXY_BYPASS, WINHTTP_NO_PROXY_BYPASS,
@ -348,9 +346,6 @@ static DWORD WINAPI WindowsMonitorSystemThread( LPVOID ) {
log_message_error("Failed to create the WindowsMonitorSystem timer."); log_message_error("Failed to create the WindowsMonitorSystem timer.");
} }
// Check for a proxy at startup
gstate.proxy_info.need_autodetect_proxy_settings = true;
while (GetMessage(&msg, NULL, 0, 0)) { while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);