[cups.bugs] [HIGH] STR #2228: Infinite loop in cups when printing to remote class

Donald Boettner dwb at umich.edu
Thu Feb 1 07:00:49 PST 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Printing to remote printers is ok, but a job sent to a remote class causes
cups to loop in cupsdCheckJobs in this section:

   while (printer &&
             (printer->type & (CUPS_PRINTER_IMPLICIT |
CUPS_PRINTER_CLASS)))
      {
       /*
        * If the class is remote, just pass it to the remote server...
        */

        pclass = printer;

        if (!(pclass->type & CUPS_PRINTER_REMOTE))
        {
          if (pclass->state != IPP_PRINTER_STOPPED)
            printer = cupsdFindAvailablePrinter(job->dest);
          else
            printer = NULL;
        }
     }

I fixed it by putting in a "break" as follows:

     while (printer &&
             (printer->type & (CUPS_PRINTER_IMPLICIT |
CUPS_PRINTER_CLASS)))
      {
       /*
        * If the class is remote, just pass it to the remote server...
        */

        pclass = printer;

        if (!(pclass->type & CUPS_PRINTER_REMOTE))
        {
          if (pclass->state != IPP_PRINTER_STOPPED)
            printer = cupsdFindAvailablePrinter(job->dest);
          else
            printer = NULL;
        }
        else
        {
          break;
        }
      }

Link: http://www.cups.org/str.php?L2228
Version: 1.2.7





More information about the cups mailing list