diff --git a/checkin_notes b/checkin_notes index c428838af7..296c099bc0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -10719,11 +10719,11 @@ Charlie 9 Nov 2007 clientgui/ sg_DlgPreferences.cpp -Janus 11 Nov 2007 +Janus 11 Nov 2007 - User web: Factored out the supermassive if-sentence in forum.inc:show_post() It is now a seperate function called should_show_post() and it returns a - boolean. - + boolean. + html/inc/ forum.inc @@ -11177,8 +11177,8 @@ David 16 Nov 2007 David 16 Nov 2007 - manager: compile fix - clientgui/ - BOINCTaskBar.cpp + clientgui/ + BOINCTaskBar.cpp Rytis 17 Nov 2007 - user web: add "Powered by BOINC" logo to the repository and update @@ -11697,15 +11697,15 @@ David 25 Nov 2007 forum_thread.php David 27 Nov 2007 - - API graphics: changes to REDUCED_ARRAY to support new S@h graphics - - API: fix format codes in stack trace printf + - API graphics: changes to REDUCED_ARRAY to support new S@h graphics + - API: fix format codes in stack trace printf - api/ - reduce.h - reduce_lib.C - reduce_main.C - lib/ - diagnostics_win.C + api/ + reduce.h + reduce_lib.C + reduce_main.C + lib/ + diagnostics_win.C David 27 Nov 2007 - client: clean up logic of handling DLL_INIT_FAILED exits on Win. @@ -12058,3 +12058,14 @@ David 2 Dec 2007 client/ hostinfo_unix.C + +David 3 Dec 2007 + - client: fix bug that would falsely report DLL init errors + - client: don't crash when detach a project using anonymous platform + (fixes #511) + + client/ + app_control.C + client_state.C,h + cs_cmdline.C + gui_rpc_server_ops.C diff --git a/client/app_control.C b/client/app_control.C index 82778944ef..631dac5234 100644 --- a/client/app_control.C +++ b/client/app_control.C @@ -178,7 +178,7 @@ bool ACTIVE_TASK::has_task_exited() { static void limbo_message(ACTIVE_TASK& at) { #ifdef _WIN32 - if (at.result->exit_status = STATUS_DLL_INIT_FAILED) { + if (at.result->exit_status == STATUS_DLL_INIT_FAILED) { msg_printf(at.result->project, MSG_INFO, "Task %s exited with a DLL initialization error.", at.result->name diff --git a/client/client_state.C b/client/client_state.C index c4c04547ab..2f6f8f078a 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -1346,7 +1346,7 @@ int CLIENT_STATE::report_result_error(RESULT& res, const char* format, ...) { // Note: does NOT delete persistent files or user-supplied files; // does not delete project dir // -int CLIENT_STATE::reset_project(PROJECT* project) { +int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) { unsigned int i; APP_VERSION* avp; APP* app; @@ -1394,7 +1394,7 @@ int CLIENT_STATE::reset_project(PROJECT* project) { // forcibly remove apps and app_versions // (but not if anonymous platform) // - if (!project->anonymous_platform) { + if (!project->anonymous_platform || detaching) { avp_iter = app_versions.begin(); while (avp_iter != app_versions.end()) { avp = *avp_iter; @@ -1439,7 +1439,7 @@ int CLIENT_STATE::detach_project(PROJECT* project) { char path[256]; int retval; - reset_project(project); + reset_project(project, true); msg_printf(project, MSG_INFO, "Detaching from project"); diff --git a/client/client_state.h b/client/client_state.h index 32f51abf09..4ca567119f 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -222,7 +222,7 @@ public: APP_VERSION* lookup_app_version(APP*, char* platform, int ver); int detach_project(PROJECT*); int report_result_error(RESULT&, const char *format, ...); - int reset_project(PROJECT*); + int reset_project(PROJECT*, bool detaching); bool no_gui_rpc; private: int link_app(PROJECT*, APP*); diff --git a/client/cs_cmdline.C b/client/cs_cmdline.C index d8343a16c8..407028a532 100644 --- a/client/cs_cmdline.C +++ b/client/cs_cmdline.C @@ -289,7 +289,7 @@ void CLIENT_STATE::do_cmdline_actions() { canonicalize_master_url(reset_project_url); PROJECT* project = lookup_project(reset_project_url); if (project) { - reset_project(project); + reset_project(project, false); msg_printf(project, MSG_INFO, "Project %s has been reset", reset_project_url); } else { msg_printf(NULL, MSG_USER_ERROR, "project %s not found\n", reset_project_url); diff --git a/client/gui_rpc_server_ops.C b/client/gui_rpc_server_ops.C index 1b353bdc12..1c72f8a2e2 100644 --- a/client/gui_rpc_server_ops.C +++ b/client/gui_rpc_server_ops.C @@ -235,7 +235,7 @@ static void handle_project_op(char* buf, MIOFILE& fout, const char* op) { if (!strcmp(op, "reset")) { gstate.request_schedule_cpus("project reset by user"); gstate.request_work_fetch("project reset by user"); - gstate.reset_project(p); + gstate.reset_project(p, false); } else if (!strcmp(op, "suspend")) { p->suspended_via_gui = true; gstate.request_schedule_cpus("project suspended by user");