summarylogtreecommitdiffstats
path: root/cngpij_bjcups.c.patch
blob: 40219f3ebb94388fe088df59e68d37aeb1d33031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
698,701c698
< 		pRequest = ippNew();
< 		
< 		pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
< 		pRequest->request.op.request_id   = 1;
---
> 		pRequest = ippNewRequest(IPP_OP_CUPS_GET_PRINTERS);
710c707
< 			if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
---
> 			if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
715c712
< 				pAttribute = pResponse->attrs;
---
> 				pAttribute = ippFirstAttribute(pResponse);
718,719c715,716
< 					while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
< 						pAttribute = pAttribute->next;
---
> 					while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
> 						pAttribute = ippNextAttribute(pResponse);
725,727c722,724
< 					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);
729,730c726,727
< 						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);
732c729
< 						pAttribute = pAttribute->next;
---
> 						pAttribute = ippNextAttribute(pResponse);
741c738
< 						 pAttribute = pAttribute->next;
---
> 						 pAttribute = ippNextAttribute(pResponse);