summaryrefslogtreecommitdiff
path: root/scheduler/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'scheduler/job.c')
-rw-r--r--scheduler/job.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/scheduler/job.c b/scheduler/job.c
index 3076a2930..adb708455 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -216,6 +216,16 @@ cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */
cupsArrayRemove(ActiveJobs, job);
cupsArrayRemove(PrintingJobs, job);
+#ifdef __APPLE__
+ /*
+ * If we are going to sleep and the PrintingJobs count is now 0, allow the
+ * sleep to happen immediately...
+ */
+
+ if (Sleeping && cupsArrayCount(PrintingJobs) == 0)
+ cupsdAllowSleep();
+#endif /* __APPLE__ */
+
/*
* Remove any authentication data...
*/
@@ -478,13 +488,11 @@ cupsdCheckJobs(void)
!printer->job)) /* and not printing */
{
/*
- * Clear any message and reasons for the queue...
+ * Clear any message for the queue...
*/
printer->state_message[0] = '\0';
- cupsdSetPrinterReasons(printer, "none");
-
/*
* Start the job...
*/