Comment 26 for bug 881843

Revision history for this message
Robert Bradley (robert-bradley1) wrote :

Hi Thierry,

Thanks for the packet logs - they were very interesting! It looks to me as if CUPS is continually trying to talk to your print server using IPP/2.0, which it does not appear to support. With the present code, CUPS expects it to return an error of IPP_VERSION_NOT_SUPPORTED, which is used as a hint to downgrade the connection. In practice, your server acts in a similar way to Web servers, and returns a response as IPP/1.0.

Would you mind applying the following inline patch to the existing version from comment #12 and seeing if that helps?

=== modified file 'backend/ipp.c'
--- old/backend/ipp.c 2011-10-28 09:12:41 +0000
+++ new/backend/ipp.c 2011-10-29 00:11:43 +0000
@@ -247,6 +247,7 @@
   ppd_file_t *ppd; /* PPD file */
   _ppd_cache_t *pc; /* PPD cache and mapping data */
   fd_set input; /* Input set for select() */
+ int server_ipp_version;

  /*
@@ -830,6 +831,18 @@

     supported = cupsDoRequest(http, request, resource);
     ipp_status = cupsLastError();
+
+ /* Extract server IPP version, and use this to downgrade */
+ server_ipp_version = supported->request.any.version[0]*10;
+ server_ipp_version += supported->request.any.version[1];
+ if (version > server_ipp_version)
+ {
+ fprintf(stderr, "INFO: Server responded to our IPP/%d.%d request ",
+ version / 10, version % 10);
+ fprintf(stderr, "with an IPP/%d.%d response - downgrading!\n",
+ server_ipp_version / 10, server_ipp_version % 10);
+ version = server_ipp_version;
+ }

     fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
             ippErrorString(ipp_status), cupsLastErrorString());