*/
cupsdLogMessage(CUPSD_LOG_DEBUG2,
- "cupsdCheckJobs: Job %d: state_value=%d, loaded=%s",
- job->id, job->state_value, job->attrs ? "yes" : "no");
+ "cupsdCheckJobs: Job %d: dest=%s, dtype=%x, "
+ "state_value=%d, loaded=%s", job->id, job->dest, job->dtype,
+ job->state_value, job->attrs ? "yes" : "no");
if (job->state_value == IPP_JOB_HELD &&
job->hold_until &&
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
/*
- * If the job was queued to a class, try requeuing it... For
- * faxes and retry-job queues, hold the current job for 5 minutes.
+ * If the job was queued to a class or the error policy is
+ * "retry-current-job", try requeuing it... For faxes and retry-job
+ * queues, hold the current job for 5 minutes.
*/
- if (job->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+ if ((job->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) ||
+ !strcmp(printer->error_policy, "retry-current-job"))
cupsdCheckJobs();
else if ((printer->type & CUPS_PRINTER_FAX) ||
!strcmp(printer->error_policy, "retry-job"))
job->dirty = 1;
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
-
- cupsdCheckJobs();
}
if (job->state_value == IPP_JOB_HELD)
{
+ /*
+ * Add trailing banner as needed...
+ */
+
+ if (job->pending_timeout)
+ cupsdTimeoutJob(job);
+
DEBUG_puts("cupsdReleaseJob: setting state to pending...");
job->state->values[0].integer = IPP_JOB_PENDING;
job->state_value = IPP_JOB_PENDING;
job->dirty = 1;
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
- cupsdCheckJobs();
}
}
if (old_state > IPP_JOB_STOPPED)
cupsArrayAdd(ActiveJobs, job);
-
- cupsdCheckJobs();
}
}