diff options
author | SpineEyE | 2020-05-03 23:15:08 +0200 |
---|---|---|
committer | SpineEyE | 2020-05-03 23:15:08 +0200 |
commit | 8d21e4c19808615221b9a5cf7b374b45557d5a8f (patch) | |
tree | 069204b95acaf8af7029590887e3dac225cc1bcd | |
parent | 2881864154e486bab56eb12e329ff29889cd806f (diff) | |
download | aur-8d21e4c19808615221b9a5cf7b374b45557d5a8f.tar.gz |
Fix for CUPS upgrade
-rwxr-xr-x | PKGBUILD | 7 | ||||
-rwxr-xr-x | all.patch | 473 |
2 files changed, 477 insertions, 3 deletions
@@ -1,4 +1,5 @@ -# Maintainer: Samy Sadi <samy.sadi.contact@gmail.com> +# Maintainer: SpineEyE <name+aur@gmail.com> +# Contributor: Samy Sadi <samy.sadi.contact@gmail.com> # PKGBUILD based on: Bernhard Landauer <oberon@manjaro.org> # PKGBUILD based on: Robert Mihaly <robb.mihaly@gmail.com> # PKGBUILD based on: Gary Ayre <catchfire@gmail.com> @@ -8,7 +9,7 @@ _printername="ip7200" _printercode=406 pkgname=("cnijfilter-${_printername}") pkgver=3.80 -pkgrel=1 +pkgrel=2 _pkgrelsources=1 pkgdesc="Canon ${_printername} series printer driver (built from sources)" arch=('x86_64') @@ -19,7 +20,7 @@ makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc') conflicts=('cnijfilter-common' 'cnijfilter-common-i386' 'canon-pixma-ip7200-printer') install='cnijfilter.install' source=('http://gdlp01.c-wss.com/gds/3/0100004693/01/cnijfilter-source-3.80-1.tar.gz' 'all.patch') -sha256sums=('8b6d408f18191f19465ee8fc31aa08455e8bec186fdd3f02ee822f53a9b086a9' '37b91326022d94d3f0dc8a404a8c0550c28267820cabcd7b53b4d2d92c30b1f8') +sha256sums=('8b6d408f18191f19465ee8fc31aa08455e8bec186fdd3f02ee822f53a9b086a9' 'a3910d272d7525a1af586ad2965c64b85d0f9634fb2f2ab812a4f7f1dff418e3') package() { dirs="libs cngpij cngpijmnt cngpijmon ppd pstocanonij backend backendnet cnijfilter lgmon cngpijmon/cnijnpr maintenance" diff --git a/all.patch b/all.patch index f74844774ee6..9e772e69310f 100755 --- a/all.patch +++ b/all.patch @@ -54,3 +54,476 @@ diff -ura cnijfilter-source-3.80-1/cnijfilter/src/bjfimage.c cnijfilter-source-3 { png_destroy_read_struct(&png_p, &info_p, (png_infopp)NULL); goto onErr; +diff -ura cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.80-1_patched/cngpij/cngpij/bjcups.c +--- cnijfilter-source-3.80-1/cngpij/cngpij/bjcups.c 2012-03-22 02:50:19.000000000 +0100 ++++ cnijfilter-source-3.80-1_patched/cngpij/cngpij/bjcups.c 2020-05-03 21:47:17.827711720 +0200 +@@ -659,24 +659,6 @@ + } + } + +- +- +-static cups_lang_t * bjcupsLangDefault( ) +-{ +- cups_lang_t *pLanguage; +- char *tLang; +- +- if( (tLang = getenv("LC_ALL"))==NULL) +- tLang = getenv("LANG"); +- +- pLanguage = cupsLangDefault(); +- setlocale(LC_ALL,tLang); +- +- return pLanguage; +-} +- +- +- + static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize) + { + /*** Parameters start ***/ +@@ -684,7 +667,6 @@ + ipp_t *pRequest, // Pointer to CUPS IPP request. + *pResponse; // Pointer to CUPS IPP response. + ipp_attribute_t *pAttribute; // Pointer to CUPS attributes. +- cups_lang_t *pLanguage; // Pointer to language. + char *pPrinter = NULL; // Pointer to printer name. + char *pDUri = NULL; // Pointer to Device uri. + short retVal = -1; // Return value. +@@ -696,41 +678,32 @@ + goto onErr; + } + else { +- pRequest = ippNew(); +- +- pRequest->request.op.operation_id = CUPS_GET_PRINTERS; +- pRequest->request.op.request_id = 1; +- +- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 +- +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage)); +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language); +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL); +- ++ pRequest = ippNewRequest(CUPS_GET_PRINTERS); ++ + 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 +712,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + +@@ -750,7 +723,6 @@ + goto onErr; + } + +- cupsLangFree(pLanguage); + httpClose(pHTTP); + } + +diff -ura cnijfilter-source-3.80-1/cngpijmnt/src/main.c cnijfilter-source-3.80-1_patched/cngpijmnt/src/main.c +--- cnijfilter-source-3.80-1/cngpijmnt/src/main.c 2020-05-03 22:21:15.717278277 +0200 ++++ cnijfilter-source-3.80-1_patched/cngpijmnt/src/main.c 2020-05-03 22:25:09.912041029 +0200 +@@ -283,24 +283,6 @@ + } + } + +- +- +-static cups_lang_t * bjcupsLangDefault( ) +-{ +- cups_lang_t *pLanguage; +- char *tLang; +- +- if( (tLang = getenv("LC_ALL"))==NULL) +- tLang = getenv("LANG"); +- +- pLanguage = cupsLangDefault(); +- setlocale(LC_ALL,tLang); +- +- return pLanguage; +-} +- +- +- + static short getDeviceURI( const char *pDestName, char *pDeviceURI, short bufSize) + { + /*** Parameters start ***/ +@@ -308,7 +290,6 @@ + ipp_t *pRequest, // Pointer to CUPS IPP request. + *pResponse; // Pointer to CUPS IPP response. + ipp_attribute_t *pAttribute; // Pointer to CUPS attributes. +- cups_lang_t *pLanguage; // Pointer to language. + char *pPrinter = NULL; // Pointer to printer name. + char *pDUri = NULL; // Pointer to Device uri. + short retVal = -1; // Return value. +@@ -320,41 +301,32 @@ + goto onErr; + } + else { +- pRequest = ippNew(); +- +- pRequest->request.op.operation_id = CUPS_GET_PRINTERS; +- pRequest->request.op.request_id = 1; +- +- pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 +- +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(pLanguage)); +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, pLanguage->language); +- ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL); ++ pRequest = ippNewRequest(CUPS_GET_PRINTERS); + + 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) { +@@ -363,7 +335,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + +@@ -374,7 +346,6 @@ + goto onErr; + } + +- cupsLangFree(pLanguage); + httpClose(pHTTP); + } + +diff -ura cnijfilter-source-3.80-1/cngpijmnt/src/main.c cnijfilter-source-3.80-1_patched/cngpijmnt/src/main.c +--- cnijfilter-source-3.80-1/cngpijmon/src/bjcupsmon_cups.c 2012-05-22 04:49:27.000000000 -0500 ++++ cnijfilter-source-3.80-1_patched/cngpijmon/src/bjcupsmon_cups.c 2020-02-27 19:13:14.074174222 -0600 +@@ -215,8 +215,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, IPP_GET_PRINTER_ATTRIBUTES); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -225,12 +225,12 @@ + ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, pURI); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + retVal = ID_ERR_CUPS_API_FAILED; + } + else { + if ((pAttribute = ippFindAttribute(pResponse, "printer-state", IPP_TAG_ENUM)) != NULL) { +- printerState = (ipp_state_t)pAttribute->values[0].integer; ++ printerState = (ipp_state_t)ippGetInteger(pAttribute, 0); + } + } + +@@ -288,8 +288,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, IPP_GET_PRINTER_ATTRIBUTES); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -298,7 +298,7 @@ + ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printerURI); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + retVal = ID_ERR_CUPS_API_FAILED; + } + else { +@@ -310,7 +310,7 @@ + //} + pAttribute = ippFindAttribute(pResponse, "printer-state-message", IPP_TAG_TEXT); + if (pAttribute != NULL) { +- strncpy(pStatus, pAttribute->values[0].string.text, bufSize); ++ strncpy(pStatus, ippGetString(pAttribute, 0, NULL), bufSize); + } + } + ippDelete(pResponse); +@@ -369,8 +369,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = IPP_CANCEL_JOB; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, IPP_CANCEL_JOB); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -381,7 +381,7 @@ + ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser()); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/jobs/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + retVal = ID_ERR_CUPS_API_FAILED; + } + ippDelete(pResponse); +@@ -444,8 +444,8 @@ + else { + pRequest = ippNew(); + +- pRequest->request.op.operation_id = IPP_GET_JOBS; +- pRequest->request.op.request_id = 1; ++ ippSetOperation(pRequest, IPP_GET_JOBS); ++ ippSetRequestId(pRequest, 1); + + pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19 + +@@ -456,31 +456,31 @@ + ippAddStrings(pRequest, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes",(int)(sizeof(jobattrs) / sizeof(jobattrs[0])), NULL, jobattrs); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + retVal = ID_ERR_CUPS_API_FAILED; + } + else { +- pAttribute = pResponse->attrs; ++ pAttribute = ippFirstAttribute(pResponse); + + while (pAttribute != NULL) { +- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_JOB) { +- pAttribute = pAttribute->next; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_JOB) { ++ pAttribute = ippNextAttribute(pResponse); + } + if (pAttribute == NULL) { + break; + } + +- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_JOB) { +- if (strcmp(pAttribute->name, "job-id") == 0 && pAttribute->value_tag == IPP_TAG_INTEGER) { +- jobID = pAttribute->values[0].integer; ++ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_JOB) { ++ if (strcmp(ippGetName(pAttribute), "job-id") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_INTEGER) { ++ jobID = ippGetInteger(pAttribute, 0); + } +- if (strcmp(pAttribute->name, "job-state") == 0 && pAttribute->value_tag == IPP_TAG_ENUM) { +- jobState = (ipp_jstate_t)pAttribute->values[0].integer; ++ if (strcmp(ippGetName(pAttribute), "job-state") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_ENUM) { ++ jobState = (ipp_jstate_t)ippGetInteger(pAttribute, 0); + } +- if (strcmp(pAttribute->name, "job-originating-user-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) { +- pJobUserName = pAttribute->values[0].string.text; ++ if (strcmp(ippGetName(pAttribute), "job-originating-user-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) { ++ pJobUserName = ippGetString(pAttribute, 0, NULL); + } +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + if (jobState == IPP_JOB_PROCESSING) { + if (pJobUserName != NULL) { +@@ -497,7 +497,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + +@@ -555,8 +555,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 + +@@ -565,28 +565,28 @@ + ippAddStrings(pRequest, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(attributes) / sizeof(attributes[0]), NULL, attributes); + + if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) { +- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) { ++ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) { + retVal = ID_ERR_CUPS_API_FAILED; + } + 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, "printer-uri-supported") == 0 && pAttribute->value_tag == IPP_TAG_URI) { +- pUri = pAttribute->values[0].string.text; ++ if (strcmp(ippGetName(pAttribute), "printer-uri-supported") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) { ++ pUri = ippGetString(pAttribute, 0, NULL); + } +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + + // Tora 020418: Compare two printer names ignoring the character case. +@@ -603,7 +603,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + +@@ -658,8 +658,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 + +@@ -668,28 +668,28 @@ + 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) { + retVal = ID_ERR_CUPS_API_FAILED; + } + 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) { +@@ -698,7 +698,7 @@ + } + + if (pAttribute != NULL) +- pAttribute = pAttribute->next; ++ pAttribute = ippNextAttribute(pResponse); + } + } + |