Version: (using KDE KDE 3.5.1) Installed from: Unspecified Compiler: GCC 4 OS: Linux KDEprint incorrectly uses the private, undocumented CUPS APIs _ipp_add() and _ipp_free(). These APIs are now gone in CUPS 1.2, so anyone using CUPS 1.2 can't use KDE! I've temporarily added stub functions with the old names which call the new functions that serve the same purpose, however those will be removed for the final 1.2 release.
so the new functions aren't in the older releases, right? So there is no way to write code that will work with both releases beside evil #ifdefs?
No, _ipp_free() and _ipp_add() are only in the 1.1.x releases (and not even all of those!), and since they start with an underscore that means they are PRIVATE APIs that are subject to change, even within minor releasess! There is no reason to use them in user code; they are used internally by the ippAdd*() and ippDelete() functions, and by the scheduler when manipulating IPP requests. You should only be using the public, documented APIs...
I think those functions are necessary to remove some of the unnecessary information before displaying them to the user. But one could argue that it should be handled in a higher level.
Regardless, _ipp_add() and _ipp_free() are private APIs and subject to change. They aren't meant to be used by application developers.
I removed today the latest use of _ipp_free_attr(). Is this what you refer to?
Yes, thanks!
fixed with svn r526593 (branch 3.5) and r526940 (trunk). Thanks for reporting.
*** Bug 126275 has been marked as a duplicate of this bug. ***
> > is there a simple patch I could use - how do I fix this pls ? Yes. Look below. This is also commited to the 3.5 SVN branch right now. Index: ipprequest.cpp =================================================================== --- ipprequest.cpp (revision 534402) +++ ipprequest.cpp (working copy) @@ -511,7 +511,11 @@ cupsFreeOptions(n, options); // find an remove that annoying "document-format" attribute - // (can't use IppDeleteAttribute as cups 1.0.9 doesn't have that) +#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2 + ipp_attribute_t *attr = ippFindAttribute(request_, "document-format", IPP_TAG_NAME); + ippDeleteAttribute(request_, attr); +#else + // (can't use IppDeleteAttribute as older cups doesn't have that) ipp_attribute_t *attr = request_->attrs; while (attr) { @@ -524,4 +528,5 @@ } attr = attr->next; } +#endif }
*** *** *** *** *** *** *** *** with special thanks to : Cristian Tibirna, KDE developer *** *** *** *** *** *** *** ***
*** Bug 127705 has been marked as a duplicate of this bug. ***
Closing old Resolved status bug.