summaryrefslogtreecommitdiff
path: root/0001-Use-description-location-from-server-if-available-ot.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-05 01:47:26 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-05 01:47:26 +0000
commita3983ab9ef8afc038a2a1b411c50e4ebf500e13b (patch)
treeaddbbe7d71aad22b8223abcedca6729e61558286 /0001-Use-description-location-from-server-if-available-ot.patch
parent352c6c0781ec913669441ba2e6261a6f8bff5a80 (diff)
automatic import of cups-filtersopeneuler24.03_LTS
Diffstat (limited to '0001-Use-description-location-from-server-if-available-ot.patch')
-rw-r--r--0001-Use-description-location-from-server-if-available-ot.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/0001-Use-description-location-from-server-if-available-ot.patch b/0001-Use-description-location-from-server-if-available-ot.patch
new file mode 100644
index 0000000..8cdf96a
--- /dev/null
+++ b/0001-Use-description-location-from-server-if-available-ot.patch
@@ -0,0 +1,29 @@
+diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
+index d4396d7..6dba2ed 100644
+--- a/utils/cups-browsed.c
++++ b/utils/cups-browsed.c
+@@ -8793,6 +8793,10 @@ gboolean update_cups_queues(gpointer unused) {
+ IPP_PRINTER_IDLE);
+ /* ... and accepting jobs */
+ ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
++ // Location (only if the remote server actually provides a location string)
++ if (p->location && p->location[0])
++ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT,
++ "printer-location", NULL, p->location);
+ num_options = 0;
+ options = NULL;
+ /* Device URI: ipp(s)://<remote host>:631/printers/<remote queue>
+@@ -8808,6 +8812,13 @@ gboolean update_cups_queues(gpointer unused) {
+ num_options = cupsAddOption(p->options[i].name,
+ p->options[i].value,
+ num_options, &options);
++
++ // Description (only if the remote server actually provides a description
++ // string)
++ if (p->info && p->info[0])
++ num_options = cupsAddOption("printer-info", p->info,
++ num_options, &options);
++
+ /* Encode option list into IPP attributes */
+ cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
+ cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);