scheduler/quotas.c:cupsdUpdateQuota() fails to scan all of the (500 per default) last jobs #3030

michaelrsweet opened this Issue Dec 2, 2008 · 3 comments


None yet
1 participant

michaelrsweet commented Dec 2, 2008

Version: 1.3-current User: Lothar_Brendel

If I'm not utterly off the track, scheduler/quotas.c:cupsdUpdateQuota() shouldn't stop summing pages and kilobytes as soon as it encounters a job without a time-at-* attribute (i.e. neither time-at-completion nor time-at-processing nor time-at-creation).

Yet in the job scanning loop it reads:
if (attr == NULL)

Could someone explain why the "break" ought not to be a "continue"?


michaelrsweet commented Dec 5, 2008 User: mike

Moving to 1.3-current... This condition actually signals a serious problem with your system, however, in that the job history files are corrupt.

Continuing may or may not be the right thing to do in this case...


michaelrsweet commented Dec 8, 2008 User: mike

Fixed in Subversion repository.


michaelrsweet commented Dec 8, 2008


Index: scheduler/job.c

--- scheduler/job.c (revision 8166)
+++ scheduler/job.c (working copy)
@@ -1112,6 +1112,17 @@

  • Copy attribute data to the job object...
  • if (!ippFindAttribute(job->attrs, "time-at-creation", IPP_TAG_INTEGER))
  • {
  • cupsdLogMessage(CUPSD_LOG_ERROR,
  •       "[Job %d] Missing or bad time-at-creation attribute in "
  •       "control file!", job->id);
  • ippDelete(job->attrs);
  • job->attrs = NULL;
  • unlink(jobfile);
  • return;
  • }

if ((job->state = ippFindAttribute(job->attrs, "job-state",

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment