Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cups-browsed,implicitclass: Do fallback without mediacol #173

Merged

Conversation

deepak0405
Copy link
Contributor

The fallback is required in three cases :

  1. Some printers doesn't support "media-col-database", so in that case we can do a IPP2.0 request without asking for media-col-database. In this case the ipp status returned is IPP_STATUS_ERROR_BAD_REQUEST.

  2. Some printer doesn't support IPP2.0 and return error IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED, so in this case we do a IPP1.1 request.

  3. In some case, the ipp status is null, but still no information is returned from the printer, the printer only returns attributes-natural-language and attribute charset, in this case, we can do one of the above fallback to get better output.

Implementation
First we do a normal IPP 2.0 request with requested attributes {"all", "media-col-database"}, if it fails we do a IPP1.1 request, and if that also fails we do a request without asking for media-col-database.

Testing

  1. Tested on a remote cups Queue where the cups version on the printer side was 2.2.10
  2. Tested for legacy printer, where the cups version was 1.4.2
  3. Tested for a IPP network printer supporting only IPP 1.1
  4. Tested for a IPP network printer supporting IPP 2.0.

@tillkamppeter tillkamppeter merged commit db7d7b7 into OpenPrinting:master Nov 29, 2019
tillkamppeter added a commit that referenced this pull request Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants