mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10158
This commit is contained in:
parent
e40962d2ad
commit
7e4031a824
|
@ -52,6 +52,11 @@ int boinc_init_graphics(void (*worker)()) {
|
|||
}
|
||||
|
||||
int boinc_init_options_graphics(BOINC_OPTIONS& opt, void (*worker)()) {
|
||||
int retval;
|
||||
if (!diagnostics_is_initialized()) {
|
||||
retval = boinc_init_diagnostics(BOINC_DIAG_USEDEFULATS);
|
||||
if (retval) return retval;
|
||||
}
|
||||
init_main_state();
|
||||
return boinc_init_options_graphics_impl(opt, worker, &boinc_main_state);
|
||||
}
|
||||
|
|
|
@ -4816,4 +4816,21 @@ Rom 16 May 2006
|
|||
|
||||
client/win/
|
||||
hostinfo_win.cpp
|
||||
|
||||
|
||||
Rom 16 May 2006
|
||||
- Bug Fix: When an application is running in standalone mode the missing
|
||||
init file should not cause the diagnostics_init() routine to return
|
||||
an error.
|
||||
- Bug Fix: Prevent the exception handling thread from stalling when the
|
||||
foreground window happens to be from its own process space. If you
|
||||
were single stepping inside of a debugger then the process acted as
|
||||
though it was deadlocked since the debugger had suspended the other
|
||||
threads.
|
||||
- Bug Fix: Initialize the diagnostics library even thuogh an alternate
|
||||
entrypoint might have been used.
|
||||
|
||||
api/
|
||||
graphics_api.C
|
||||
lib/
|
||||
diagnostics.C
|
||||
diagnostics_win.C
|
||||
|
|
|
@ -249,20 +249,21 @@ int diagnostics_init(
|
|||
proxy_port = 0;
|
||||
|
||||
p = fopen(INIT_DATA_FILE, "r");
|
||||
if (!p) return ERR_FOPEN;
|
||||
mf.init_file(p);
|
||||
while(mf.fgets(buf, sizeof(buf))) {
|
||||
if (match_tag(buf, "</app_init_data>")) break;
|
||||
else if (parse_str(buf, "<boinc_dir>", boinc_dir, 256)) continue;
|
||||
else if (parse_str(buf, "<project_symstore>", symstore, 256)) continue;
|
||||
else if (match_tag(buf, "<use_http_proxy/>")) {
|
||||
boinc_proxy_enabled = true;
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<http_server_name>", proxy_address, 256)) continue;
|
||||
else if (parse_int(buf, "<http_server_port>", proxy_port)) continue;
|
||||
}
|
||||
fclose(p);
|
||||
if (p) {
|
||||
mf.init_file(p);
|
||||
while(mf.fgets(buf, sizeof(buf))) {
|
||||
if (match_tag(buf, "</app_init_data>")) break;
|
||||
else if (parse_str(buf, "<boinc_dir>", boinc_dir, 256)) continue;
|
||||
else if (parse_str(buf, "<project_symstore>", symstore, 256)) continue;
|
||||
else if (match_tag(buf, "<use_http_proxy/>")) {
|
||||
boinc_proxy_enabled = true;
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<http_server_name>", proxy_address, 256)) continue;
|
||||
else if (parse_int(buf, "<http_server_port>", proxy_port)) continue;
|
||||
}
|
||||
fclose(p);
|
||||
}
|
||||
|
||||
if (boinc_proxy_enabled) {
|
||||
int buffer_used = snprintf(boinc_proxy, sizeof(boinc_proxy), "%s:%d", proxy_address, proxy_port);
|
||||
|
|
|
@ -1220,23 +1220,32 @@ int diagnostics_capture_foreground_window(PBOINC_WINDOWCAPTURE window_info) {
|
|||
|
||||
window_info->hwnd = GetForegroundWindow();
|
||||
|
||||
GetWindowText(
|
||||
window_info->hwnd,
|
||||
window_info->window_name,
|
||||
sizeof(window_info->window_name)
|
||||
);
|
||||
|
||||
GetClassName(
|
||||
window_info->hwnd,
|
||||
window_info->window_class,
|
||||
sizeof(window_info->window_class)
|
||||
);
|
||||
|
||||
window_info->window_thread_id = GetWindowThreadProcessId(
|
||||
window_info->hwnd,
|
||||
&window_info->window_process_id
|
||||
);
|
||||
|
||||
// Only query the window text from windows in a different process space.
|
||||
// All threads that might have windows are suspended in this process
|
||||
// space and attempting to get the window text will deadlock the exception
|
||||
// handler.
|
||||
if (window_info->window_process_id != GetCurrentProcessId()) {
|
||||
GetWindowText(
|
||||
window_info->hwnd,
|
||||
window_info->window_name,
|
||||
sizeof(window_info->window_name)
|
||||
);
|
||||
|
||||
GetClassName(
|
||||
window_info->hwnd,
|
||||
window_info->window_class,
|
||||
sizeof(window_info->window_class)
|
||||
);
|
||||
} else {
|
||||
strcpy(window_info->window_name, "");
|
||||
strcpy(window_info->window_class, "");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue