failed printer not disabled when printing to class

a42n8k9 at dejazzd.com a42n8k9 at dejazzd.com
Wed Nov 23 08:49:40 PST 2005


I had recently posted about the ability to turn the round-robin feature on and off in the class printing.  I realize that the round-robin feature exists by design and completely understand why.  Unfortunately our specific needs can make use of the class but need it to try the primary printer first and then try the secondary ... in that order.  (we have sales books that get printed out of order if it doesn't)

I decided to play with the source and added a config option named "RoundRobin" which takes a value of Yes or No.  Obviously this is to disable the round-robin feature.

Now for my question....

In doing this I discovered that it is by design that failed printers are not disabled when printing to a class or an implicit class.

I'm curious as to why this was designed this way.

What am I at risk of breaking if I change:

        if (current->status < 0 &&
            !(current->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) &&
            !(current->printer->type & CUPS_PRINTER_FAX))
          SetPrinterState(current->printer, IPP_PRINTER_STOPPED, 1);
        else if (current->printer->state != IPP_PRINTER_STOPPED)
          SetPrinterState(current->printer, IPP_PRINTER_IDLE, 0);

to

        if (current->status < 0 &&
            !(current->printer->type & CUPS_PRINTER_FAX))
          SetPrinterState(current->printer, IPP_PRINTER_STOPPED, 1);
        else if (current->printer->state != IPP_PRINTER_STOPPED)
          SetPrinterState(current->printer, IPP_PRINTER_IDLE, 0);

in scheduler/jobs.c

Thanks in advance
- Bennett






More information about the cups-devel mailing list