Skip to content

Commit 2d514fe

Browse files
committed
Update ippeveprinter to include all the xxx-supported and xxx-ready attributes
and values in the environment.
1 parent b20f51d commit 2d514fe

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ libcups v3.0.0 (YYYY-MM-DD)
1717
- Updated the `httpSetCookie` API to support multiple "Set-Cookie:" header
1818
values.
1919
- Updated `ippfind` to use the `cupsGetClock` API.
20+
- Updated `ippeveprinter` to include all ready and supported attributes and
21+
values in the environment when processing a job.
2022
- Fixed `cupsJSONExport` functions with empty arrays or objects.
2123
- Fixed `httpGetDateTime` for dates in the far future (Issue #124)
2224
- Fixed input checks for `cupsCreateCredentials` and

doc/ippeveprinter.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ <h2 id="ippeveprinter-1.environment">Environment</h2>
332332
adds environment variables starting with &quot;IPP_&quot; for all IPP Job attributes in the print request.
333333
For example, when executing a command for an IPP Job containing the &quot;media&quot; Job Template attribute, the &quot;IPP_MEDIA&quot; environment variable will be set to the value of that attribute.
334334
</p>
335-
<p>In addition, all IPP &quot;xxx-default&quot; and &quot;pwg-xxx&quot; Printer Description attributes are added to the environment.
335+
<p>In addition, all IPP &quot;xxx-default&quot;, &quot;xxx-ready&quot;, and &quot;xxx-supported&quot; Printer Description attributes are added to the environment.
336336
For example, the &quot;IPP_MEDIA_DEFAULT&quot; environment variable will be set to the default value for the &quot;media&quot; Job Template attribute.
337337
</p>
338338
<p>Enumerated values are converted to their keyword equivalents.
@@ -400,6 +400,6 @@ <h2 id="ippeveprinter-1.see-also">See Also</h2>
400400
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp">http://www.pwg.org/ipp</a>)
401401
</p>
402402
<h2 id="ippeveprinter-1.copyright">Copyright</h2>
403-
<p>Copyright &copy; 2021-2025 by OpenPrinting.
403+
<p>Copyright &copy; 2021-2026 by OpenPrinting.
404404
</body>
405405
</html>

man/ippeveprinter.1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.\"
22
.\" ippeveprinter man page for CUPS.
33
.\"
4-
.\" Copyright © 2021-2025 by OpenPrinting.
4+
.\" Copyright © 2021-2026 by OpenPrinting.
55
.\" Copyright © 2014-2019 by Apple Inc.
66
.\"
77
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
88
.\" information.
99
.\"
10-
.TH ippeveprinter 1 "CUPS" "2025-12-28" "OpenPrinting"
10+
.TH ippeveprinter 1 "CUPS" "2026-01-07" "OpenPrinting"
1111
.SH NAME
1212
ippeveprinter \- an ipp everywhere printer application for cups
1313
.SH SYNOPSIS
@@ -231,7 +231,7 @@ program is unique to CUPS and conforms to the IPP Everywhere (PWG 5100.14) speci
231231
adds environment variables starting with "IPP_" for all IPP Job attributes in the print request.
232232
For example, when executing a command for an IPP Job containing the "media" Job Template attribute, the "IPP_MEDIA" environment variable will be set to the value of that attribute.
233233
.LP
234-
In addition, all IPP "xxx-default" and "pwg-xxx" Printer Description attributes are added to the environment.
234+
In addition, all IPP "xxx-default", "xxx-ready", and "xxx-supported" Printer Description attributes are added to the environment.
235235
For example, the "IPP_MEDIA_DEFAULT" environment variable will be set to the default value for the "media" Job Template attribute.
236236
.LP
237237
Enumerated values are converted to their keyword equivalents.
@@ -295,4 +295,4 @@ Make a copy of a real printer's attributes and simulate it locally:
295295
.BR ipptool (1),
296296
PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp)
297297
.SH COPYRIGHT
298-
Copyright \[co] 2021-2025 by OpenPrinting.
298+
Copyright \[co] 2021-2026 by OpenPrinting.

tools/ippeveprinter.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// IPP Everywhere printer application for CUPS.
33
//
4-
// Copyright © 2021-2025 by OpenPrinting.
4+
// Copyright © 2021-2026 by OpenPrinting.
55
// Copyright © 2020 by the IEEE-ISTO Printer Working Group.
66
// Copyright © 2010-2021 by Apple Inc.
77
//
@@ -5683,14 +5683,20 @@ process_job(ippeve_job_t *job) // I - Job
56835683
for (attr = ippGetFirstAttribute(job->printer->attrs); attr && myenvc < (int)(sizeof(myenvp) / sizeof(myenvp[0]) - 1); attr = ippGetNextAttribute(job->printer->attrs))
56845684
{
56855685
// Convert "attribute-name-default" to "IPP_ATTRIBUTE_NAME_DEFAULT=",
5686-
// "pclm-xxx" to "IPP_PCLM_XXX", and "pwg-xxx" to "IPP_PWG_XXX", then add
5687-
// the value(s) from the attribute.
5686+
// "attribute-name-ready" to "IPP_ATTRIBUTE_NAME_READY",
5687+
// "attribute-name-supported" to "IPP_ATTRIBUTE_NAME_SUPPORTED",
5688+
// "pclm-xxx" to "IPP_PCLM_XXX", and "pwg-xxx" to "IPP_PWG_XXX",
5689+
// then add the value(s) from the attribute.
56885690
const char *name = ippGetName(attr),
56895691
// Attribute name
5690-
*suffix = strstr(name, "-default");
5692+
*default_suffix = strstr(name, "-default"),
5693+
// Suffix on attribute name
5694+
*ready_suffix = strstr(name, "-ready"),
5695+
// Suffix on attribute name
5696+
*supported_suffix = strstr(name, "-supported");
56915697
// Suffix on attribute name
56925698

5693-
if (strncmp(name, "pclm-", 5) && strncmp(name, "pwg-", 4) && strcmp(name, "urf-supported") && (!suffix || suffix[8]))
5699+
if (strncmp(name, "pclm-", 5) && strncmp(name, "pwg-", 4) && (!default_suffix || default_suffix[8]) && (!ready_suffix || ready_suffix[6]) && (!supported_suffix || supported_suffix[10]))
56945700
continue;
56955701

56965702
valptr = val;

0 commit comments

Comments
 (0)