From a810ae3be7ce6eb279ae0815e1909b6e188a4392 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 8 Jan 2007 22:15:21 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11806 --- checkin_notes | 12 ++++++++++++ client/client_types.h | 6 ++++-- client/cs_scheduler.C | 6 +----- client/scheduler_op.C | 4 ++-- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index 36bea85796..7703cab009 100755 --- a/checkin_notes +++ b/checkin_notes @@ -285,3 +285,15 @@ David 8 Jan 2007 html/inc/ prefs.inc + +David 8 Jan 2007 + - core client: fixed crashing bug that happens when attaching + to a project with wrong URL (e.g. setiathome.ssl.berkeley.edu). + The fix allows the project to attach but prints a warning. + It would be better to not allow the attach; + I'll get back to this later + + client/ + client_types.h + cs_scheduler.C + scheduler_op.C diff --git a/client/client_types.h b/client/client_types.h index a3003344ce..d7fda02070 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -219,8 +219,10 @@ public: // should be done (as requested by server) bool possibly_backed_off; bool trickle_up_pending; // have trickle up to send - bool tentative; // we haven't done a scheduler RPC to this project yet - // (still need to verify that its name isn't a dup) + bool tentative; + // we haven't done a scheduler RPC to this project yet; + // still need to verify that its name isn't a dup, + // and that the URL is correct double last_rpc_time; // when last RPC finished // Other stuff diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 22924dcf7e..ca0907581d 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -882,14 +882,11 @@ int CLIENT_STATE::handle_scheduler_reply( canonicalize_master_url(sr.master_url); if (strcmp(sr.master_url, project->master_url)) { msg_printf(project, MSG_ERROR, - "You are using the wrong URL for this project" + "You used the wrong URL for this project" ); msg_printf(project, MSG_ERROR, "The correct URL is %s", sr.master_url ); - if (project->tentative) { - return ERR_WRONG_URL; - } p2 = gstate.lookup_project(sr.master_url); if (p2) { msg_printf(project, MSG_INFO, @@ -934,7 +931,6 @@ int CLIENT_STATE::handle_scheduler_reply( msg_printf(project, MSG_ERROR, "Consider detaching this project, then trying again" ); - return ERR_DUP_NAME; } } diff --git a/client/scheduler_op.C b/client/scheduler_op.C index 460be0aad7..4dfecd99af 100644 --- a/client/scheduler_op.C +++ b/client/scheduler_op.C @@ -481,8 +481,8 @@ bool SCHEDULER_OP::poll() { } else { retval = gstate.handle_scheduler_reply(cur_proj, scheduler_url, nresults); if (cur_proj->tentative) { - cur_proj->tentative = false; - retval = cur_proj->write_account_file(); + cur_proj->tentative = false; + retval = cur_proj->write_account_file(); if (retval) { cur_proj->attach_failed(ERR_ATTACH_FAIL_FILE_WRITE); } else {