From b43a941ba987a70c69d4e4696d34587cccb15d6a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 20 Jan 2006 20:41:51 +0000 Subject: [PATCH] update servers on CPID change svn path=/trunk/boinc/; revision=9277 --- checkin_notes | 10 ++++++++++ client/client_state.h | 1 + client/cs_scheduler.C | 18 +++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index eecd624298..37ed0b2dc5 100755 --- a/checkin_notes +++ b/checkin_notes @@ -699,3 +699,13 @@ Charlie 20 Jan 2006 mac_installer/ release_boinc.sh Postinstall.cpp + +David 20 Jan 2006 + - core client: if we change host CPID and we're using an account manager, + do scheduler RPCs to all projects, + so that the account manager gets a consistent view when + it gets host data from the project servers + + client/ + client_state.h + cs_scheduler.C diff --git a/client/client_state.h b/client/client_state.h index e96b1c209d..1cc0220664 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -361,6 +361,7 @@ private: bool rr_misses_deadline(double, double); bool edf_misses_deadline(double); void set_scheduler_modes(); + void generate_new_host_cpid(PROJECT*); // --------------- cs_statefile.C: public: diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 0e3cf3f31e..6aba9cb055 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -750,7 +750,7 @@ int CLIENT_STATE::handle_scheduler_reply( if (sr.hostid) { project->hostid = sr.hostid; project->rpc_seqno = 0; - host_info.generate_host_cpid(); + generate_new_host_cpid(project); } // see if we have a new venue from this project @@ -1430,4 +1430,20 @@ void CLIENT_STATE::scale_duration_correction_factors(double factor) { } } +// Choose a new host CPID. +// If we're using an account manager, do scheduler RPCs to all projects +// to propagate the CPID +// +void CLIENT_STATE::generate_new_host_cpid(PROJECT* p) { + host_info.generate_host_cpid(); + if (strlen(acct_mgr_info.login_name)) { + for (unsigned int i=0; isched_rpc_pending = true; + } + } + } +} + const char *BOINC_RCSID_d35a4a7711 = "$Id$";