Commit 7a4c6e24 authored by Luum Habtemariam's avatar Luum Habtemariam Committed by Commit Bot

Fill 'printer-name' IPP attribute with printer uuid

It seems CUPS expects that 'printer-name' holds last part of the
printer's uri, despite contradicting the RFC2911. This change
implements that and stuffs the printer's display_name into the
'printer-info' attribute.

Bug: chromium:945409, chromium:1013698, b:117218264
Test: confirmed successful printer installation via cups_proxy
Change-Id: I8db45623679160b681f2337600fafc4e8f5c0826
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1856889Reviewed-by: default avatarSean Kau <skau@chromium.org>
Commit-Queue: Luum Habtemariam <luum@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705347}
parent cd299c4d
...@@ -81,8 +81,12 @@ base::Optional<IppResponse> BuildGetDestsResponse( ...@@ -81,8 +81,12 @@ base::Optional<IppResponse> BuildGetDestsResponse(
ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_TEXT, ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_TEXT,
"printer-uri-supported", nullptr, printer_uri.c_str()); "printer-uri-supported", nullptr, printer_uri.c_str());
// Setting the display name. // Setting the printer uuid.
ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name",
nullptr, printer.id().c_str());
// Setting the display name.
ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info",
nullptr, printer.display_name().c_str()); nullptr, printer.display_name().c_str());
// Optional setting of the make_and_model, if known. // Optional setting of the make_and_model, if known.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment