1426567 - Added queues are not marked as remote ones

This commit is contained in:
Zdenek Dohnal 2017-02-24 12:31:41 +01:00
parent 916ff12bcd
commit 184b8ca807
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,42 @@
diff -up cups-filters-1.13.4/utils/cups-browsed.c.apremotequeueid cups-filters-1.13.4/utils/cups-browsed.c
--- cups-filters-1.13.4/utils/cups-browsed.c.apremotequeueid 2017-02-24 12:14:22.099865138 +0100
+++ cups-filters-1.13.4/utils/cups-browsed.c 2017-02-24 12:18:44.039943820 +0100
@@ -1,4 +1,4 @@
-/***
+ /***
This file is part of cups-filters.
This file is free software; you can redistribute it and/or modify it
@@ -3491,7 +3491,8 @@ gboolean handle_cups_queues(gpointer unu
cups_job_t *jobs;
ipp_t *request;
time_t current_time = time(NULL);
- int i, new_cupsfilter_line_inserted, cont_line_read, want_raw;
+ int i, new_cupsfilter_line_inserted, ap_remote_queue_id_line_inserted,
+ cont_line_read, want_raw;
char *disabled_str, *ptr, *prefix;
const char *loadedppd = NULL;
int pass_through_ppd;
@@ -3813,6 +3814,7 @@ gboolean handle_cups_queues(gpointer unu
" and inhibiting client-side filtering of the job" : ""),
buf);
new_cupsfilter_line_inserted = 0;
+ ap_remote_queue_id_line_inserted = 0;
cont_line_read = 0;
while (cupsFileGets(in, line, sizeof(line))) {
if (pass_through_ppd == 1 &&
@@ -3896,6 +3898,14 @@ gboolean handle_cups_queues(gpointer unu
cupsFilePrintf(out, "%s\n", line);
} else if (cont_line_read == 0 || strncmp(line, "*End", 4)) {
cont_line_read = 0;
+ /* Write an "APRemoteQueueID" line to make this queue marked
+ as remote printer by CUPS */
+ if (strncmp(line, "*%", 2) &&
+ strncmp(line, "*PPD-Adobe:", 11) &&
+ ap_remote_queue_id_line_inserted == 0) {
+ ap_remote_queue_id_line_inserted = 1;
+ cupsFilePrintf(out, "*APRemoteQueueID: \"\"\n");
+ }
/* Simply write out the line as we read it */
cupsFilePrintf(out, "%s\n", line);
}

View File

@ -20,6 +20,8 @@ License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
Patch01: cups-filters-apremotequeueid.patch
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
# Obsolete cups-php (bug #971741)
@ -114,6 +116,7 @@ This is the development package for OpenPrinting CUPS filters and backends.
%prep
%setup -q
%patch01 -p1 -b .apremotequeueid
%build
# work-around Rpath
@ -279,6 +282,7 @@ fi
%changelog
* Fri Feb 24 2017 Zdenek Dohnal <zdohnal@redhat.com> - 1.13.4-1
- rebase to 1.13.4
- 1426567 - Added queues are not marked as remote ones
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild