From 8aa29bec33b45945a59dfc94dbdf5c92ae8e89c1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 5 Nov 2010 17:15:27 +0000 Subject: [PATCH] - 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 --- checkin_notes | 12 ++++++++++++ py/Boinc/setup_project.py | 5 ++++- sched/credit.cpp | 8 +------- sched/validate_util.cpp | 2 +- sched/validator.cpp | 4 ++-- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/checkin_notes b/checkin_notes index 6722627500..02a8425cdc 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 3ef356d23d..5f023fdaab 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -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, diff --git a/sched/credit.cpp b/sched/credit.cpp index e18d7dcec7..8fe4a4aee7 100644 --- a/sched/credit.cpp +++ b/sched/credit.cpp @@ -704,8 +704,7 @@ double vec_min(vector& 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& results, @@ -772,11 +771,6 @@ int assign_credit_set( wu.id, x ); } - for (i=0; i&, 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) { diff --git a/sched/validator.cpp b/sched/validator.cpp index 55289fc46b..277f30a42a 100644 --- a/sched/validator.cpp +++ b/sched/validator.cpp @@ -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",