cupsd.conf JobRetryLimit =0 not mentioned in documentation

Jens Redecker jens.redecker at gmx.de
Mon Jan 2 02:18:40 UTC 2017


Hi there,


the documentation of cupsd.conf 
https://www.freebsd.org/cgi/man.cgi?query=cupsd.conf mentions
"

*JobRetryLimit */count/
    Specifies the number of retries that are done for jobs. This is
    typically used for fax queues but can also be used with normal print
    queues whose error policy is "retry-job" or "retry-current-job". The
    default is "5"."

However i find it should be mentioned that setting it to "0" lets cups 
wait for an unlimited amount of time/retries.

As it says starting from line 3145 of 
https://opensource.apple.com/source/cups/cups-327/cups/scheduler/job.c?txt

if (job->tries > JobRetryLimit &&*JobRetryLimit > 0*)
           {
            /*
         * Too many tries...
         */

         snprintf(buffer, sizeof(buffer),
              "Job aborted after %d unsuccessful attempts.",
              JobRetryLimit);
         job_state = IPP_JOB_ABORTED;
         message   = buffer;

         ippSetString(job->attrs, &job->reasons, 0, "aborted-by-system");
           }
*else*
           {
            /*
         * Try again in N seconds...
         */

         snprintf(buffer, sizeof(buffer),
              "Job held for %d seconds since it could not be sent.",
              JobRetryInterval);

         job->hold_until = time(NULL) + JobRetryInterval;
         job_state       = IPP_JOB_HELD;
         message         = buffer;

         ippSetString(job->attrs, &job->reasons, 0,
                      "resources-are-not-ready");
           }



Regards
Jens


More information about the freebsd-doc mailing list