]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
scheduler/job.c: Merge fix from master for extensive logging
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 13 Sep 2023 07:52:13 +0000 (09:52 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 13 Sep 2023 07:52:13 +0000 (09:52 +0200)
Master commit:
https://github.com/OpenPrinting/cups/commit/541f72d1cc1

Fixes #604

CHANGES.md
scheduler/job.c

index bb304704910f39958e0c48c34f36a72e1144491f..23dbb6e1b3812a097fd4c62277e1f0e338947554 100644 (file)
@@ -6,6 +6,7 @@ Changes in CUPS v2.4.7 (TBA)
 
 - Added OpenSSL support for cupsHashData (Issue #762)
 - Fixed delays in lpd backend (Issue #741)
+- Fixed extensive logging in scheduler (Issue #604)
 - Fixed printing to stderr if we can't open cups-files.conf (Issue #777)
 - Fixed purging job files via `cancel -x` (Issue #742)
 - Fixed a bug in the PPD command interpretation code (Issue #768)
index 5ac782e7599d44aa7aed19174fd06a849a76c9f9..49e4fa3379521eb575f736d8f0ef375ede1829f5 100644 (file)
@@ -443,12 +443,12 @@ cupsdCleanJobs(void)
        job;
        job = (cupsd_job_t *)cupsArrayNext(Jobs))
   {
-    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: Job %d, state=%d, printer=%p, history_time=%d, file_time=%d", job->id, (int)job->state_value, (void *)job->printer, (int)job->history_time, (int)job->file_time);
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: Job %d, state=%d, printer=%p, history_time=%d, file_time=%d, num_files=%d", job->id, (int)job->state_value, (void *)job->printer, (int)job->history_time, (int)job->file_time, (int)job->num_files);
 
     if ((job->history_time && job->history_time < JobHistoryUpdate) || !JobHistoryUpdate)
       JobHistoryUpdate = job->history_time;
 
-    if ((job->file_time && job->file_time < JobHistoryUpdate) || !JobHistoryUpdate)
+    if (job->num_files > 0 && ((job->file_time && job->file_time < JobHistoryUpdate) || !JobHistoryUpdate))
       JobHistoryUpdate = job->file_time;
 
     if (job->state_value >= IPP_JOB_CANCELED && !job->printer)