Commit da41f9b5 authored by Justin Carlson's avatar Justin Carlson Committed by Commit Bot

Fix a IPP-E bug in zeroconf printer detector.

When converting from the mDNS service information to a DetectedPrinter
struct, we fail with an IPP-E service name because we forgot to check
for them.  This fixes that.

Bug: 806390
Change-Id: Iad2853f458ac3880f9d62f45e135ecb16ee942b8
Reviewed-on: https://chromium-review.googlesource.com/890046Reviewed-by: default avatarSean Kau <skau@chromium.org>
Commit-Queue: Justin Carlson <justincarlson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532576}
parent 3581c0a9
......@@ -140,11 +140,15 @@ bool ConvertToPrinter(const ServiceDescription& service_description,
printer.set_description(metadata.note);
printer.set_make_and_model(metadata.product);
const char* uri_protocol;
if (service_description.service_type() ==
base::StringPiece(kIppServiceName)) {
if ((service_description.service_type() ==
base::StringPiece(kIppServiceName)) ||
(service_description.service_type() ==
base::StringPiece(kIppEverywhereServiceName))) {
uri_protocol = "ipp";
} else if (service_description.service_type() ==
base::StringPiece(kIppsServiceName)) {
} else if ((service_description.service_type() ==
base::StringPiece(kIppsServiceName)) ||
(service_description.service_type() ==
base::StringPiece(kIppsEverywhereServiceName))) {
uri_protocol = "ipps";
} else {
// Since we only register for these services, we should never get back
......
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