/*
* System management functions for the CUPS scheduler.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
DirtyFiles = CUPSD_DIRTY_NONE;
DirtyCleanTime = 0;
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
if (!DirtyCleanTime)
DirtyCleanTime = time(NULL) + DirtyCleanInterval;
- cupsdSetBusyState();
+ cupsdSetBusyState(0);
}
*/
void
-cupsdSetBusyState(void)
+cupsdSetBusyState(int working) /* I - Doing significant work? */
{
int i; /* Looping var */
cupsd_job_t *job; /* Current job */
*/
newbusy = (DirtyCleanTime ? 1 : 0) |
- (cupsArrayCount(ActiveClients) ? 4 : 0);
+ ((working || cupsArrayCount(ActiveClients) > 0) ? 4 : 0);
for (job = (cupsd_job_t *)cupsArrayFirst(PrintingJobs);
job;