Merge pull request #3999 from BOINC/dpa_wrapper_prio

wrapper: interpret priority value in cc_config.xml correctly
This commit is contained in:
David Anderson 2020-09-25 01:04:46 -07:00 committed by GitHub
commit 24548b00cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
// Copyright (C) 2019 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
@ -15,15 +15,16 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
// #defines and enums that are shared by more than one BOINC component
// (e.g. client, server, Manager, etc.)
// TODO: more enums, fewer defines
#ifndef BOINC_COMMON_DEFS_H
#define BOINC_COMMON_DEFS_H
#include "miofile.h"
#include "parse.h"
// #defines or enums that are shared by more than one BOINC component
// (e.g. client, server, Manager, etc.)
#define GUI_RPC_PORT 31416
// for TCP connection
#define GUI_RPC_FILE "boinc_socket"

View File

@ -746,9 +746,9 @@ int TASK::run(int argct, char** argvt) {
if (aid.no_priority_change) {
priority_val = 0;
} else {
if (aid.process_priority > 0) {
if (aid.process_priority > CONFIG_PRIORITY_UNSPECIFIED) {
// priority coming from the client is on scale where 0 is idle.
// for us, 1 is idle
// we use the scale where 1 is idle
//
priority_val = process_priority_value(aid.process_priority+1);
} else {