diff options
Diffstat (limited to 'net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch')
-rw-r--r-- | net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch b/net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch new file mode 100644 index 00000000..dfc0bb22 --- /dev/null +++ b/net-print/cnijfilter/files/cnijfilter-3.80-1-cups-1.6.patch @@ -0,0 +1,62 @@ +--- a/cngpij/cngpij/bjcups.c ++++ a/cngpij/cngpij/bjcups.c +@@ -698,8 +719,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = CUPS_GET_PRINTERS; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, CUPS_GET_PRINTERS); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -708,29 +729,29 @@ + ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + fputs("ERROR: IPP ERROR\n", stderr); + goto onErr; + } + else { +- pAttribute = pResponse->attrs; ++ pAttribute = ippFirstAttribute(pResponse); + + while (pAttribute != NULL) { +- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) { +- pAttribute = pAttribute->next; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) { ++ pAttribute = ippNextAttribute(pResponse); + } + if (pAttribute == NULL) { + break; + } + +- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) { +- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) { +- pPrinter = pAttribute->values[0].string.text; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) { ++ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) { ++ pPrinter = ippGetString(pAttribute, 0, NULL); + } +- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) { +- pDUri = pAttribute->values[0].string.text; ++ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) { ++ pDUri = ippGetString(pAttribute, 0, NULL); + } +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + + if (strcasecmp(pDestName, pPrinter) == 0) { +@@ -739,7 +760,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + |