diff --git a/checkin_notes b/checkin_notes index 01e107d685..01c1e5af40 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5320,3 +5320,10 @@ David 30 Aug 2011 samples/vboxwrapper/ vboxwrapper.cpp + +David 30 Aug 2011 + - validator: in "credit_from_wu" case, record what the new credit + system would have assigned in result.claimed_credit. + + sched/ + validator.cpp diff --git a/sched/validator.cpp b/sched/validator.cpp index adac0404cc..092b52abc5 100644 --- a/sched/validator.cpp +++ b/sched/validator.cpp @@ -149,7 +149,7 @@ int handle_wu( bool update_result, retry; TRANSITION_TIME transition_time = NO_CHANGE; int retval = 0, canonicalid = 0, x; - double credit = 0; + double credit = 0, credit_new = 0; unsigned int i; WORKUNIT& wu = items[0].wu; @@ -360,6 +360,7 @@ int handle_wu( wu, results, app, app_versions, host_app_versions, max_granted_credit, credit ); + retval = get_credit_from_wu(wu, results, credit); if (retval) { log_messages.printf(MSG_CRITICAL, @@ -437,6 +438,13 @@ int handle_wu( ); } result.granted_credit = credit; + if (credit_from_wu) { + DB_RESULT r; + r = result; + char buf[256]; + sprintf(buf, "claimed_credit=%f", credit_new); + r.update_field(buf); + } grant_credit(host, result.sent_time, credit); log_messages.printf(MSG_NORMAL, "[RESULT#%d %s] Valid; granted %f credit [HOST#%d]\n",