- validator: fix another bug with --credit_from_wu

- make_project, update scripts: don't quit it user_profiles
    already exists


svn path=/trunk/boinc/; revision=22630
This commit is contained in:
David Anderson 2010-11-05 17:15:27 +00:00
parent 561c5bdd75
commit 8aa29bec33
5 changed files with 20 additions and 11 deletions

View File

@ -7859,3 +7859,15 @@ David 04 Nov 2010
html/ops/
manage_apps.php
David 05 Nov 2010
- validator: fix another bug with --credit_from_wu
- make_project, update scripts: don't quit it user_profiles
already exists
sched
credit.cpp
validate_util.cpp
validator.cpp
py/Boinc/
setup_project.py

View File

@ -306,7 +306,10 @@ def install_boinc_files(dest_dir, install_web_files, install_server_files):
create_project_dirs(dest_dir);
# make a symbolic link from html/user/user_profile to html/user_profile
my_symlink(dir('html/user_profile'), dir('html/user/user_profile'));
try:
my_symlink(dir('html/user_profile'), dir('html/user/user_profile'));
except:
pass
# copy html/ops files in all cases.
# The critical one is db_update.php,

View File

@ -704,8 +704,7 @@ double vec_min(vector<double>& v) {
}
// Called by validator when canonical result has been selected.
// Compute credit for valid instances, store in result.granted_credit
// and return as credit
// Compute credit for valid instances
//
int assign_credit_set(
WORKUNIT& wu, vector<RESULT>& results,
@ -772,11 +771,6 @@ int assign_credit_set(
wu.id, x
);
}
for (i=0; i<results.size(); i++) {
RESULT& r = results[i];
if (r.validate_state != VALIDATE_STATE_VALID) continue;
r.granted_credit = x;
}
credit = x;
return 0;
}

View File

@ -184,7 +184,7 @@ int get_credit_from_wu(WORKUNIT& wu, vector<RESULT>&, double& credit) {
double x;
int retval;
DB_WORKUNIT dbwu;
dbwu.id = wu.id;
retval = dbwu.get_field_str("xml_doc", dbwu.xml_doc, sizeof(dbwu.xml_doc));
if (!retval) {

View File

@ -427,9 +427,9 @@ int handle_wu(
result.id, result.name, retval
);
}
result.granted_credit = credit;
grant_credit(
host, result.sent_time, result.cpu_time,
result.granted_credit
host, result.sent_time, result.cpu_time, credit
);
log_messages.printf(MSG_NORMAL,
"[RESULT#%d %s] Valid; granted %f credit [HOST#%d]\n",