[cups.bugs] [HIGH] STR #1370: IPP Fix for Print Servers that don't support capability queries

Bill Reynolds grendel at swcp.com
Sat Jan 7 05:22:53 PST 2006


[STR New]

Evidently USR MaxG (USR5461) router/print servers don't support capability
queries, so ipp gets a status IPP_SERVICE_UNAVAILABLE when querying for
capabilities and never prints the page, treating it as a PRINTER_BUSY and
infinitely retrying the query every 10 seconds. 

I've given this priority high, since it means cups can't support print
servers that lack capability query, which from my reading of RFC3196 seems
to be legal. 

The side effects of the patch seem to be minimal, the cups code is robust
enough to handle the null supported pointer and supply intelligent
defaults (as far as I can tell after an evening hacking). I have now
printed a few large documents (order 100 pages) and have had no problems.
My only recommendation might be to print an info message (right before the
"break;") that the printer object does not support capability query and
warn about the implications of this (which I don't understand). Thanks for
the great software.

To get the USR print server working, set the printer up as
http://<routerIP>:1631/printers/My_Printer, and apply the attached patch
to backend/ipp.c. Works for me, YMMV:

*** cups-1.1.23/backend/ipp.c   Mon Jan  3 12:29:44 2005
--- /root/ipp.c Fri Jan  6 17:47:43 2006
***************
*** 516,525 ****
      else
        ipp_status = supported->request.status.status_code;

!     if (ipp_status > IPP_OK_CONFLICT)
      {
!       if (ipp_status == IPP_PRINTER_BUSY ||
!         ipp_status == IPP_SERVICE_UNAVAILABLE)
        {
        fputs("INFO: Printer busy; will retry in 10 seconds...\n",
stderr);
          report_printer_state(supported);
--- 516,530 ----
      else
        ipp_status = supported->request.status.status_code;

!     // some braindead print servers can't return status
!     // eg USR MaxG router
!     if (ipp_status == IPP_SERVICE_UNAVAILABLE)
!     {
!               break;
!     }
!     else if (ipp_status > IPP_OK_CONFLICT)
      {
!       if (ipp_status == IPP_PRINTER_BUSY)
        {
        fputs("INFO: Printer busy; will retry in 10 seconds...\n",
stderr);
          report_printer_state(supported);

Link: http://www.cups.org/str.php?L1370
Version: 1.1.23





More information about the cups mailing list