Skip to content

Commit

Permalink
Merge pull request #3102 from BOINC/dpa_punitive2
Browse files Browse the repository at this point in the history
validator: fix bugs in #3024
  • Loading branch information
lfield committed Apr 17, 2019
2 parents 3255b4e + 8090bd8 commit 1cfc426
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sched/validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ void scan_punitive(vector<VALIDATOR_ITEM>& items) {
if (result.server_state != RESULT_SERVER_STATE_OVER) continue;
if (result.outcome != RESULT_OUTCOME_CLIENT_ERROR) continue;
if (init_result(result, data) == VAL_RESULT_LONG_TERM_FAIL) {
DB_HOST_APP_VERSION hav;
sprintf(buf, "host_id=%ld and app_version_id=%ld",
DB_HOST_APP_VERSION hav, hav2;
sprintf(buf, "where host_id=%ld and app_version_id=%ld",
result.hostid, result.app_version_id
);
int retval = hav.lookup(buf);
Expand All @@ -205,9 +205,11 @@ void scan_punitive(vector<VALIDATOR_ITEM>& items) {
);
continue;
}
hav.max_jobs_per_day = 1;
hav.n_jobs_today = 1;
hav.update();
hav2 = hav;
hav2.max_jobs_per_day = 1;
hav2.n_jobs_today = 1;
hav2.update_scheduler(hav);
// update_scheduler() updates the above fields
}
if (data) {
cleanup_result(result, data);
Expand Down

0 comments on commit 1cfc426

Please sign in to comment.