From ce3398402c1a5322bb4fd95d6bc24011e384fc31 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 16 Feb 2024 12:57:42 -0500 Subject: [PATCH] Update cupsCreateRequestedArray for Get-Output-Device-Attributes. --- CHANGES.md | 3 ++- cups/ipp-support.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b47520898..3ad65d1ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,8 @@ libcups v3.0rc1 (TBD) - Updated `httpAddrConnect()` to handle `POLLHUP` together with `POLLIN` or `POLLOUT`. - Updated the various tool man pages, usage output, and examples. -- Updated `ippCreateRequestedArray` for the Get-Documents operation. +- Updated `ippCreateRequestedArray` for the Get-Documents and + Get-Output-Device-Attributes operations. - Now use installed PDFio library, if available. - Now use NotoSansMono font for `ipptransform` text conversions. - The `ipptransform` program now supports uncollated copies. diff --git a/cups/ipp-support.c b/cups/ipp-support.c index 74db3f1f9..69d7ef319 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -1,7 +1,7 @@ // // Internet Printing Protocol support functions for CUPS. // -// Copyright © 2022-2023 by OpenPrinting. +// Copyright © 2022-2024 by OpenPrinting. // Copyright © 2007-2018 by Apple Inc. // Copyright © 1997-2007 by Easy Software Products, all rights reserved. // @@ -2055,7 +2055,7 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request added = true; } - if (!strcmp(value, "job-template") || (!strcmp(value, "all") && (op == IPP_OP_GET_JOB_ATTRIBUTES || op == IPP_OP_GET_JOBS || op == IPP_OP_GET_PRINTER_ATTRIBUTES))) + if (!strcmp(value, "job-template") || (!strcmp(value, "all") && (op == IPP_OP_GET_JOB_ATTRIBUTES || op == IPP_OP_GET_JOBS || op == IPP_OP_GET_PRINTER_ATTRIBUTES || op == IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES))) { for (j = 0; j < (sizeof(job_template) / sizeof(job_template[0])); j ++) cupsArrayAdd(ra, (void *)job_template[j]); @@ -2063,7 +2063,7 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request added = true; } - if (!strcmp(value, "printer-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_PRINTER_ATTRIBUTES || op == IPP_OP_GET_PRINTERS || op == IPP_OP_CUPS_GET_DEFAULT || op == IPP_OP_CUPS_GET_PRINTERS || op == IPP_OP_CUPS_GET_CLASSES))) + if (!strcmp(value, "printer-description") || (!strcmp(value, "all") && (op == IPP_OP_GET_PRINTER_ATTRIBUTES || op == IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES || op == IPP_OP_GET_PRINTERS || op == IPP_OP_CUPS_GET_DEFAULT || op == IPP_OP_CUPS_GET_PRINTERS || op == IPP_OP_CUPS_GET_CLASSES))) { for (j = 0; j < (sizeof(printer_description) / sizeof(printer_description[0])); j ++) cupsArrayAdd(ra, (void *)printer_description[j]);