/*
* 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
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * missing or damaged, see the license at "http://www.cups.org/".
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
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;