diff options
author | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-04-21 11:39:06 -0400 |
---|---|---|
committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2021-04-21 11:39:06 -0400 |
commit | 9a13f253405cdfdff14a4387821f9aa62a479c21 (patch) | |
tree | 0e1e9bfa4af4f201789b331bcab37de6e5f2d31a | |
parent | 14a52682f82c17045fe99415f81ebfefe2100fa4 (diff) | |
download | cups-bug-fix-rollup-1.tar.gz |
Add WITH-DISTINCT-VALUES support for collections.bug-fix-rollup-1
-rw-r--r-- | doc/help/man-cupsd.conf.html | 3 | ||||
-rw-r--r-- | doc/help/man-ipptoolfile.html | 2 | ||||
-rw-r--r-- | man/ipptoolfile.5 | 2 | ||||
-rw-r--r-- | tools/ipptool.c | 24 |
4 files changed, 26 insertions, 5 deletions
diff --git a/doc/help/man-cupsd.conf.html b/doc/help/man-cupsd.conf.html index 1668eee8a..f1e519dab 100644 --- a/doc/help/man-cupsd.conf.html +++ b/doc/help/man-cupsd.conf.html @@ -145,9 +145,6 @@ The default is "5". <dd style="margin-left: 5.0em"><dt><b>KeepAlive No</b> <dd style="margin-left: 5.0em">Specifies whether to support HTTP keep-alive connections. The default is "Yes". -<dt><a name="KeepAliveTimeout"></a><b>KeepAliveTimeout </b><i>seconds</i> -<dd style="margin-left: 5.0em">Specifies how long an idle client connection remains open. -The default is "30". <dt><a name="LimitIPP"></a><b><Limit </b><i>operation </i>...<b>> </b>... <b></Limit></b> <dd style="margin-left: 5.0em">Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATION NAMES". <dt><a name="Limit"></a><b><Limit </b><i>method </i>...<b>> </b>... <b></Limit></b> diff --git a/doc/help/man-ipptoolfile.html b/doc/help/man-ipptoolfile.html index 3154560d0..64f800295 100644 --- a/doc/help/man-ipptoolfile.html +++ b/doc/help/man-ipptoolfile.html @@ -269,7 +269,7 @@ Comparisons are case-sensitive. <dt><b>WITH-DISTINCT-VALUES</b> <dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute are unique. Comparisons are case-sensitive. -Only charset, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate. +Only charset, collection, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate. <dt><b>WITH-HOSTNAME "</b><i>literal string</i><b>"</b> <dd style="margin-left: 5.0em"><dt><b>WITH-HOSTNAME "/</b><i>regular expression</i><b>/"</b> <dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching hostname. diff --git a/man/ipptoolfile.5 b/man/ipptoolfile.5 index 0fb894c61..a4ffd635c 100644 --- a/man/ipptoolfile.5 +++ b/man/ipptoolfile.5 @@ -353,7 +353,7 @@ Comparisons are case-sensitive. \fBWITH\-DISTINCT\-VALUES\fR Requires that all values of the \fBEXPECT\fR attribute are unique. Comparisons are case-sensitive. -Only charset, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate. +Only charset, collection, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate. .TP 5 \fBWITH\-HOSTNAME "\fIliteral string\fB"\fR .TP 5 diff --git a/tools/ipptool.c b/tools/ipptool.c index 0ebc016c0..e3692524c 100644 --- a/tools/ipptool.c +++ b/tools/ipptool.c @@ -5279,6 +5279,7 @@ with_distinct_values( case IPP_TAG_CHARSET : case IPP_TAG_LANGUAGE : case IPP_TAG_MIMETYPE : + case IPP_TAG_BEGIN_COLLECTION : break; default : @@ -5327,6 +5328,29 @@ with_distinct_values( case IPP_TAG_MIMETYPE : value = ippGetString(attr, i, NULL); break; + case IPP_TAG_BEGIN_COLLECTION : + { + ipp_t *col = ippGetCollection(attr, i); + // Collection value + ipp_attribute_t *member; // Member attribute + char *bufptr, // Pointer into buffer + *bufend, // End of buffer + prefix; // Prefix character + + for (prefix = '{', bufptr = buffer, bufend = buffer + sizeof(buffer) - 2, member = ippFirstAttribute(col); member && bufptr < bufend; member = ippNextAttribute(col)) + { + *bufptr++ = prefix; + prefix = ' '; + + ippAttributeString(member, bufptr, (size_t)(bufend - bufptr)); + bufptr += strlen(bufptr); + } + + *bufptr++ = '}'; + *bufptr = '\0'; + value = buffer; + } + break; default : // Should never happen value = "unsupported"; break; |