Send-Document failure ignored #4190

Closed
michaelrsweet opened this Issue Sep 18, 2012 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Sep 18, 2012

Version: 1.5.4
CUPS.org User: twaugh.redhat

If the ipp backend finds that Create-Job and Send-Document are both supported, but the Send-Document operation fails (e.g. as in https://bugzilla.redhat.com/show_bug.cgi?id=854989), the job not does fail. Instead it completes and is removed from the queue as though everything were printed successfully.

Collaborator

michaelrsweet commented Sep 18, 2012

CUPS.org User: mike

In this case the print job is going to an unknown type of IPP/1.0 server that reports support for Create-Job and Send-Document but doesn't really support them (client-error-not-found means there is no job history...)

We'll fix the error reporting here, but long term the user needs to stick with a fallback protocol or get a firmware update from Samsung (we've also communicated this to Samsung separately, although I don't know how likely it is they will update the firmware for this printer...)

Collaborator

michaelrsweet commented Sep 21, 2012

CUPS.org User: mike

Fixed in Subversion repository.

The attached change falls back to Print-Job on IPP/1.0 printers, which allows for a workaround for broken IPP/1.1 and later printers - just add "?version=1.0" to the end of the device URI.

I also took the opportunity to fix the handling of authenticated-but-not-authorized print situations (previously we spun on Create-Job/Print-Job on client-error-not-authorized).

Collaborator

michaelrsweet commented Sep 21, 2012

"str4190.patch":

Index: backend/ipp.c

--- backend/ipp.c (revision 10611)
+++ backend/ipp.c (working copy)
@@ -1279,6 +1279,16 @@
}

/*

  • * If the printer only claims to support IPP/1.0, or if the user specifically
  • * included version=1.0 in the URI, then do not try to use Create-Job or
  • * Send-Document. This is another dreaded compatibility hack, but unfortunately
  • * there are enough broken printers out there that we need this for now...
  • */
  • if (version == 10)
  • create_job = send_document = 0;
  • /*
    • Start monitoring the printer in the background...
      */

@@ -1494,10 +1504,9 @@
goto cleanup;
}
}

  •  else if (ipp_status == IPP_ERROR_JOB_CANCELED)
    
  •  else if (ipp_status == IPP_ERROR_JOB_CANCELED ||
    
  •           ipp_status == IPP_NOT_AUTHORIZED)
     goto cleanup;
    
  •  else if (ipp_status == IPP_NOT_AUTHORIZED)
    
  •    continue;
    

    else
    {
    /*
    @@ -1678,14 +1687,35 @@
    ipp_status == IPP_NOT_POSSIBLE ||
    ipp_status == IPP_PRINTER_BUSY)
    continue;

  • else if (ipp_status == IPP_REQUEST_VALUE)

  • else if (ipp_status == IPP_REQUEST_VALUE ||

  •         ipp_status == IPP_ERROR_JOB_CANCELED ||
    
  •         ipp_status == IPP_NOT_AUTHORIZED)
    

    {
    /*

  •  \* Print file is too large, abort this job...
    
  •  \* Print file is too large, job was canceled, or we need new
    
  •  * authentication data...
    

    */

    goto cleanup;
    }

  • else if (ipp_status == IPP_NOT_FOUND)

  • {

  • /*
    
  •  \* Printer does not actually implement support for Create-Job/
    
  •  \* Send-Document, so log the conformance issue and stop the printer.
    
  •  */
    
  •  fputs("DEBUG: This printer claims to support Create-Job and "
    
  •        "Send-Document, but those operations failed.\n", stderr);
    
  •  fputs("DEBUG: Add '?version=1.0' to the device URI to use legacy "
    
  •        "compatibility mode.\n", stderr);
    
  •  update_reasons(NULL, "+cups-ipp-conformance-failure-report,"
    
  •          "cups-ipp-missing-send-document");
    
  •  ipp_status = IPP_INTERNAL_ERROR; /\* Force queue to stop */
    
  •  goto cleanup;
    
  • }
    else
    copies_remaining --;

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment