mirror of https://github.com/BOINC/boinc.git
client: fix bug where get_screensaver_tasks GUI RPC returned no tasks during CPU throttling
This commit is contained in:
parent
9faa9e6e55
commit
8a6b77ef59
|
@ -599,8 +599,7 @@ static void handle_get_screensaver_tasks(GUI_RPC_CONN& grc) {
|
|||
);
|
||||
for (i=0; i<gstate.active_tasks.active_tasks.size(); i++) {
|
||||
atp = gstate.active_tasks.active_tasks[i];
|
||||
if ((atp->task_state() == PROCESS_EXECUTING) ||
|
||||
((atp->task_state() == PROCESS_SUSPENDED) && (gstate.suspend_reason == SUSPEND_REASON_CPU_THROTTLE))) {
|
||||
if (atp->scheduler_state == CPU_SCHED_SCHEDULED) {
|
||||
atp->result->write_gui(grc.mfout);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,8 +92,11 @@
|
|||
// (used internally within the client;
|
||||
// changed to MSG_USER_ALERT before passing to manager)
|
||||
|
||||
// bitmap defs for task_suspend_reason, network_suspend_reason
|
||||
// Note: doesn't need to be a bitmap, but keep for compatibility
|
||||
// values for suspend_reason, network_suspend_reason
|
||||
// Notes:
|
||||
// - doesn't need to be a bitmap, but keep for compatibility
|
||||
// - with new CPU throttling implementation (separate thread)
|
||||
// CLIENT_STATE.suspend_reason will never be SUSPEND_REASON_CPU_THROTTLE.
|
||||
//
|
||||
enum SUSPEND_REASON {
|
||||
SUSPEND_REASON_BATTERIES = 1,
|
||||
|
|
Loading…
Reference in New Issue