John A. Murdie
john at cs.york.ac.uk
Thu Aug 18 09:56:36 PDT 2005
There's some code in ipp.c (CUPS 1.1.23) whose intent I'd like to understand:
835 if (ipp_status <= IPP_OK_CONFLICT && argc > 6)
837 fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv) : 1);
838 copies --;
840 else if (ipp_status != IPP_SERVICE_UNAVAILABLE &&
841 ipp_status != IPP_PRINTER_BUSY)
845 * Wait for the job to complete...
848 if (!job_id || !waitjob)
851 fputs("INFO: Waiting for job to complete...\n", stderr);
853 for (;;)
856 * Build an IPP_GET_JOB_ATTRIBUTES request...
The usual situation is for ipp_status to be IPP_OK, which is less than all other IPP_* values. argc is 6 if no filename has been supplied to ipp, and 7 if it has. The former seems to be the case every time I've tried it. So if the job is successful no PAGE status message gets written, and the 'break' at line 842 is taken, which causes the 'while (copies > 0)' loop (at line 685, not shown above) to be exited. No IPP_GET_JOB_ATTRIBUTES request is sent to the printer.
Why is 'copies' only decremented if 'ipp' is supplied with a filename (7th argument) - line 835? There's only the one explicit decrement of copies in the 'while (copies > 0)' loop - at line 836.
(Also, I note that INFO messages are added to the 'Printer History', and not to the CUPS error_log file. Where is the 'Printer History' log kept, and how can I see its accumulated contents?)
My ipp-sent jobs print ok on HP and Lexmark printers, btw, so all is not doom and gloom!
More information about the cups