0

printer-make-and-model: Allow IPP_TAG_TEXTLANG

Bug: b/187343457

Change-Id: If31a27433f80f579fd6477488dbc464e3a22369e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2891222
Commit-Queue: Sean Kau <skau@chromium.org>
Auto-Submit: Pranav Batra <batrapranav@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#882308}
This commit is contained in:
Pranav Batra
2021-05-12 21:47:39 +00:00
committed by Chromium LUCI CQ
parent 45d5f8490f
commit 1ce6a7f7ae

@ -317,11 +317,9 @@ bool ParsePrinterInfo(ipp_t* response, PrinterInfo* printer_info) {
}
base::StringPiece name(value);
if (name == base::StringPiece(kPrinterMakeAndModel)) {
if (IPP_TAG_TEXT != ippGetValueTag(attr)) {
LOG(WARNING) << "printer-make-and-model value tag is "
<< ippGetValueTag(attr) << " instead of " << IPP_TAG_TEXT
<< " (IPP_TAG_TEXT).";
continue;
int tag = ippGetValueTag(attr);
if (tag != IPP_TAG_TEXT && tag != IPP_TAG_TEXTLANG) {
LOG(WARNING) << "printer-make-and-model value tag is " << tag << ".";
}
const char* make_and_model_string = ippGetString(attr, 0, nullptr);
if (make_and_model_string) {