]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix potential excess logging from the scheduler when removing job files
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 14:51:07 +0000 (10:51 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 14:51:07 +0000 (10:51 -0400)
(Issue #5597)

(may be Debian-specific, as I was unable to duplicate - the extra check is in
place in case file_time is reset)

CHANGES.md
scheduler/job.c

index 9595a8077818a214d4727eb5149d6f03026855d5..9a434e7509dda593d41c3fefca6b647ed39ad641 100644 (file)
@@ -11,6 +11,8 @@ Changes in CUPS v2.3.0
 - Eliminated some new GCC compiler warnings (Issue #5591)
 - Removed dead code from the scheduler (Issue #5593)
 - "make" failed with GZIP options (Issue #5595)
+- Fixed potential excess logging from the scheduler when removing job files
+  (Issue #5597)
 - Fixed a NULL pointer dereference bug in `httpGetSubField2` (Issue #5598)
 - The scheduler no longer provides a default value for the description
   (Issue #5603)
index 89b1c28c58b7600d6d69c994c7204d1db1470441..2cfb1b03db27d3d89947c7e882fbbc9fd2b5bd47 100644 (file)
@@ -462,7 +462,7 @@ cupsdCleanJobs(void)
         cupsdLogJob(job, CUPSD_LOG_DEBUG, "Removing from history.");
        cupsdDeleteJob(job, CUPSD_JOB_PURGE);
       }
-      else if (job->file_time && job->file_time <= curtime)
+      else if (job->file_time && job->file_time <= curtime && job->num_files > 0)
       {
         cupsdLogJob(job, CUPSD_LOG_DEBUG, "Removing document files.");
         remove_job_files(job);