]> git.ipfire.org Git - thirdparty/cups.git/commit
scheduler/job.c: Fix extensive logging in scheduler 767/head
authorZdenek Dohnal <zdohnal@redhat.com>
Thu, 27 Jul 2023 10:34:52 +0000 (12:34 +0200)
committerZdenek Dohnal <zdohnal@redhat.com>
Thu, 27 Jul 2023 10:34:52 +0000 (12:34 +0200)
commit541f72d1cc11471fe30350ab80f4c069ddfb552b
tree00db8cd1d0cb90fd613c753eb3ee3b455922370c
parentd705eca65fbf6c9a8806e2a54ba57ea8c434ce6a
scheduler/job.c: Fix extensive logging in scheduler

Based on currently unknown trigger scheduler sometimes sets
JobHistoryUpdate into past, which causes `select()` to timeout after one
second.

It happens when `job->file_time` of a job without files to remove gets
assigned to `JobHistoryUpdate`. If we check for `job->num_files` and
assign the `job->file_time` only if there are any, we will fix extensive
logging (and unneeded cupsd execution) in various places, e.g. cleaning
jobs, expiring subscriptions, deleting temporary queues...

Fixes #604
scheduler/job.c