mirror of https://github.com/BOINC/boinc.git
client: if account manager has specified resource share, don't override it
The resource share passed in a scheduler reply was incorrectly overriding the one specified by an account manager.
This commit is contained in:
parent
73a6345984
commit
8b2d7ffba1
|
@ -100,6 +100,7 @@ int PROJECT::parse_account(FILE* in) {
|
||||||
char buf2[256];
|
char buf2[256];
|
||||||
int retval;
|
int retval;
|
||||||
bool in_project_prefs = false, btemp;
|
bool in_project_prefs = false, btemp;
|
||||||
|
|
||||||
for (int i=0; i<coprocs.n_rsc; i++) {
|
for (int i=0; i<coprocs.n_rsc; i++) {
|
||||||
no_rsc_pref[i] = false;
|
no_rsc_pref[i] = false;
|
||||||
}
|
}
|
||||||
|
@ -193,6 +194,7 @@ int PROJECT::parse_account_file_venue() {
|
||||||
char attr_buf[256], venue[256], path[MAXPATHLEN], buf2[256];
|
char attr_buf[256], venue[256], path[MAXPATHLEN], buf2[256];
|
||||||
int retval;
|
int retval;
|
||||||
bool in_right_venue = false, btemp;
|
bool in_right_venue = false, btemp;
|
||||||
|
double dtemp;
|
||||||
|
|
||||||
get_account_filename(master_url, path);
|
get_account_filename(master_url, path);
|
||||||
FILE* in = boinc_fopen(path, "r");
|
FILE* in = boinc_fopen(path, "r");
|
||||||
|
@ -237,7 +239,12 @@ int PROJECT::parse_account_file_venue() {
|
||||||
);
|
);
|
||||||
if (retval) return retval;
|
if (retval) return retval;
|
||||||
continue;
|
continue;
|
||||||
} else if (xp.parse_double("resource_share", resource_share)) {
|
} else if (xp.parse_double("resource_share", dtemp)) {
|
||||||
|
// if account manager has specified resource share, don't override
|
||||||
|
//
|
||||||
|
if (ams_resource_share < 0) {
|
||||||
|
resource_share = dtemp;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (xp.parse_bool("no_cpu", btemp)) {
|
else if (xp.parse_bool("no_cpu", btemp)) {
|
||||||
|
|
|
@ -107,7 +107,7 @@ struct PROJECT : PROJ_AM {
|
||||||
double host_create_time;
|
double host_create_time;
|
||||||
double ams_resource_share;
|
double ams_resource_share;
|
||||||
// resource share according to AMS; overrides project
|
// resource share according to AMS; overrides project
|
||||||
// -1 means not specified by AMS
|
// -1 means not specified by AMS, or not using an AMS
|
||||||
|
|
||||||
// stuff related to scheduler RPCs and master fetch
|
// stuff related to scheduler RPCs and master fetch
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue