Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util.c: ippAddStrings(... IPP_TAG_NAME, "requested-attributes" ... #4567

Closed
michaelrsweet opened this issue Jan 29, 2015 · 2 comments
Closed

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.0-current
CUPS.org User: jsmeix.suse

It seems since the beginning of CUPS there is
in cups/util.c one case of this form

ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requested-attributes",

I found it in cups-1.1.20 cups-1.1.23 cups-1.3.9 cups-1.5.4
cups-1.7.3 cups-1.7.4 cups-1.7.5 cups-2.0.0 cups-2.0.1

Everywhere else I find only that form

ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", ...

I think IPP_TAG_KEYWORD must be used in any case for "requested-attributes".

I also found
http://cups.org/pipermail/cups/2013-February/025818.html
where Till had also used IPP_TAG_NAME for "requested-attributes".

This may indicate wrong documentation somewhere (perhaps a wrong example?).

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str4567.patch":

Index: cups/util.c

--- cups/util.c (revision 12444)
+++ cups/util.c (working copy)
@@ -1509,7 +1509,7 @@

ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);

  • ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);
  • ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(requested_attrs) / sizeof(requested_attrs[0]), NULL, requested_attrs);

/*

  • Do the request and get back a response...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant