host CPID fix

svn path=/trunk/boinc/; revision=9290
This commit is contained in:
David Anderson 2006-01-23 18:59:05 +00:00
parent 571aff00f2
commit 0a8438794d
3 changed files with 13 additions and 7 deletions

View File

@ -856,3 +856,11 @@ Charlie 23 Jan 2006
GR-Description.plist (Remove)
GR-preinstall (Remove)
GR-preupgrade (Remove)
David 23 Jan 2006
- Core client: D'oh! When change host CPID,
need to notify ALL projects, even the one we just contacted.
client/
client_state.h
cs_scheduler.C

View File

@ -361,7 +361,7 @@ private:
bool rr_misses_deadline(double, double);
bool edf_misses_deadline(double);
void set_scheduler_modes();
void generate_new_host_cpid(PROJECT*);
void generate_new_host_cpid();
// --------------- 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;
generate_new_host_cpid(project);
generate_new_host_cpid();
}
// see if we have a new venue from this project
@ -1424,6 +1424,7 @@ double CLIENT_STATE::work_needed_secs() {
}
void CLIENT_STATE::scale_duration_correction_factors(double factor) {
if (factor <= 0) return;
for (unsigned int i=0; i<projects.size(); i++) {
PROJECT* p = projects[i];
p->duration_correction_factor *= factor;
@ -1434,14 +1435,11 @@ void CLIENT_STATE::scale_duration_correction_factors(double factor) {
// 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) {
void CLIENT_STATE::generate_new_host_cpid() {
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;
}
projects[i]->sched_rpc_pending = true;
}
}
}