From 6647894889968030cfe8f567fb3a9ab410d8f1ea Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 16 Jul 2019 10:51:07 -0400 Subject: [PATCH] Fix potential excess logging from the scheduler when removing job files (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 | 2 ++ scheduler/job.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 9595a8077..9a434e750 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/scheduler/job.c b/scheduler/job.c index 89b1c28c5..2cfb1b03d 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -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); -- 2.39.2