[PATCH] printing/cups: pack requested-attributes with IPP_TAG_KEYWORD

Michael Sweet msweet at apple.com
Tue Feb 3 11:40:05 MST 2015


Right, the "requested-attribute" attribute needs to be of keyword (IPP_TAG_KEYWORD) type to be used.  Previous versions of CUPS did not validate the type, but more recent versions (probably CUPS 1.5 and later, would need to check) *do* validate the type...

> On Feb 3, 2015, at 1:26 PM, David Disseldorp <ddiss at samba.org> wrote:
> 
> The CUPS IPP_GET_JOBS requested-attributes array indicates which job
> attributes the caller would like in the cupsd response.
> 
> Until now, Samba has packed these attributes with a IPP_TAG_NAME
> format tag. In recent versions of CUPS, this results in the IPP_GET_JOBS
> response only including the job-id and job-printer-uri fields, even with
> JobPrivateValues=none configured.
> 
> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10808
> 
> Signed-off-by: David Disseldorp <ddiss at samba.org>
> ---
> source3/printing/print_cups.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
> index 68f367c..561e07d 100644
> --- a/source3/printing/print_cups.c
> +++ b/source3/printing/print_cups.c
> @@ -1157,7 +1157,7 @@ static int cups_queue_get(const char *sharename,
> 	ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
>                      "attributes-natural-language", NULL, language->language);
> 
> -        ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
> +        ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
> 	              "requested-attributes",
> 		      (sizeof(jattrs) / sizeof(jattrs[0])),
> 		      NULL, jattrs);
> -- 
> 2.1.4
> 

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair



More information about the samba-technical mailing list