Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 320220 Details for
Bug 428672
net-print/hplip-3.12.6 compilation error - "dereferencing pointer to incomplete type" (prnt/cupsext/cupsext.c)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
hplip-3.12.6-ipp_accessors2.patch
hplip-3.12.6-ipp_accessors2.patch (text/plain), 3.01 KB, created by
Chris Slycord
on 2012-08-03 21:33:53 UTC
(
hide
)
Description:
hplip-3.12.6-ipp_accessors2.patch
Filename:
MIME Type:
Creator:
Chris Slycord
Created:
2012-08-03 21:33:53 UTC
Size:
3.01 KB
patch
obsolete
>diff -up hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors hplip-3.12.6/scan/sane/hpaio.c >--- hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors 2012-06-18 12:42:51.000000000 +0200 >+++ hplip-3.12.6/scan/sane/hpaio.c 2012-07-19 17:12:34.557848760 +0200 >@@ -47,6 +47,43 @@ > #define DEBUG_DECLARE_ONLY > #include "sanei_debug.h" > >+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) >+#define HAVE_CUPS_1_6 1 >+#endif >+ >+#ifndef HAVE_CUPS_1_6 >+#define ippGetGroupTag(attr) attr->group_tag >+#define ippGetValueTag(attr) attr->value_tag >+#define ippGetName(attr) attr->name >+#define ippGetString(attr, element, language) attr->values[element].string.text >+ >+static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) >+{ >+ if (!ipp) >+ return (NULL); >+ return (ipp->current = ipp->attrs); >+} >+ >+static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) >+{ >+ if (!ipp || !ipp->current) >+ return (NULL); >+ return (ipp->current = ipp->current->next); >+} >+ >+static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) >+{ >+ ipp->request.op.operation_id = op; >+ return (1); >+} >+ >+static int ippSetRequestId( ipp_t *ipp, int request_id ) >+{ >+ ipp->request.any.request_id = request_id; >+ return (1); >+} >+#endif >+ > static SANE_Device **DeviceList = NULL; > > static int AddDeviceList(char *uri, char *model, SANE_Device ***pd) >@@ -186,8 +223,8 @@ static int GetCupsPrinters(char ***print > /* Assemble the IPP request */ > request = ippNew(); > >- request->request.op.operation_id = CUPS_GET_PRINTERS; >- request->request.any.request_id = 1; >+ ippSetOperation( request, CUPS_GET_PRINTERS ); >+ ippSetRequestId( request, 1 ); > > ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8"); > ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en"); >@@ -197,20 +234,20 @@ static int GetCupsPrinters(char ***print > if ((response = cupsDoRequest(http, request, "/")) == NULL) > goto bugout; > >- for (attr = response->attrs; attr != NULL; attr = attr->next) >+ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response )) > { > /* Skip leading attributes until we hit a printer. */ >- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER) >- attr = attr->next; >+ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) >+ attr = ippNextAttribute( response ); > > if (attr == NULL) > break; > >- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER) >+ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER) > { >- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0) >+ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0) > cnt++; >- attr = attr->next; >+ attr = ippNextAttribute( response ); > } > > if (attr == NULL)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 428672
:
319730
|
319732
|
320218
|
320220
|
320222
|
320244
|
320246
|
320262