You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cups/SOURCES/0001-Fix-IPP-everywhere-pri...

45 lines
1.9 KiB

From 313c388dbc023bbcb75d1efed800d0cfc992a6cc Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Wed, 14 Aug 2024 21:18:54 -0400
Subject: [PATCH] Fix IPP everywhere printer setup (Issue #1033)
---
CHANGES.md | 1 +
scheduler/ipp.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 37623c54e..d334f70cf 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -5346,7 +5346,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 2, 0);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, device_uri);
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
response = cupsDoRequest(http, request, resource);
@@ -5367,7 +5367,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 1, 1);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, device_uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "all");
response = cupsDoRequest(http, request, resource);
@@ -5390,7 +5390,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 2, 0);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
- "printer-uri", NULL, uri);
+ "printer-uri", NULL, device_uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", NULL, "media-col-database");
response2 = cupsDoRequest(http, request, resource);
--
2.46.0