- client: fix bug that would falsely report DLL init errors

- client: don't crash when detach a project using anonymous platform
        (fixes #511)

svn path=/trunk/boinc/; revision=14348
This commit is contained in:
David Anderson 2007-12-03 17:46:07 +00:00
parent de60bc19aa
commit f7c8bc5280
6 changed files with 31 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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");

View File

@ -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*);

View File

@ -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);

View File

@ -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");