update servers on CPID change

svn path=/trunk/boinc/; revision=9277
This commit is contained in:
David Anderson 2006-01-20 20:41:51 +00:00
parent a90bf323d1
commit b43a941ba9
3 changed files with 28 additions and 1 deletions

View File

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

View File

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

View File

@ -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; i<projects.size(); i++) {
PROJECT* pp = projects[i];
if (pp != p) {
pp->sched_rpc_pending = true;
}
}
}
}
const char *BOINC_RCSID_d35a4a7711 = "$Id$";