rpms/cups/devel cups-str1881.patch,1.2,1.3 cups.spec,1.246,1.247
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Aug 16 09:08:29 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/cups/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24095
Modified Files:
cups-str1881.patch cups.spec
Log Message:
* Wed Aug 16 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.2-11
- Use upstream patch to fix STR #1881.
cups-str1881.patch:
backend/ipp.c | 3 +++
scheduler/job.c | 23 ++++++++---------------
scheduler/printers.c | 12 ++++++++----
scheduler/printers.h | 1 +
4 files changed, 20 insertions(+), 19 deletions(-)
Index: cups-str1881.patch
===================================================================
RCS file: /cvs/dist/rpms/cups/devel/cups-str1881.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cups-str1881.patch 10 Aug 2006 17:10:47 -0000 1.2
+++ cups-str1881.patch 16 Aug 2006 09:08:21 -0000 1.3
@@ -1,24 +1,148 @@
---- cups-1.2.2/scheduler/job.c 2006-08-06 11:56:29.000000000 +0100
-+++ cups-1.2.2/scheduler/job.c 2006-08-10 17:34:27.000000000 +0100
-@@ -3018,11 +3018,17 @@
+--- cups-1.2.2/scheduler/job.c.str1881 2006-08-16 09:42:32.000000000 +0100
++++ cups-1.2.2/scheduler/job.c 2006-08-16 09:43:26.000000000 +0100
+@@ -2425,7 +2425,6 @@
+ /* PRINTER env variable */
+ rip_max_cache[255];
+ /* RIP_MAX_CACHE env variable */
+- int remote_job; /* Remote print job? */
+ static char *options = NULL;/* Full list of options */
+ static int optlength = 0; /* Length of option buffer */
+
+@@ -2567,17 +2566,10 @@
+ FilterLevel += job->cost;
+
+ /*
+- * Determine if we are printing to a remote printer...
+- */
+-
+- remote_job = printer->raw && job->num_files > 1 &&
+- !strncmp(printer->device_uri, "ipp://", 6);
+-
+- /*
+ * Add decompression filters, if any...
+ */
+
+- if (!remote_job && job->compressions[job->current_file])
++ if (!printer->raw && job->compressions[job->current_file])
+ {
+ /*
+ * Add gziptoany filter to the front of the list...
+@@ -2911,7 +2903,7 @@
+ * For remote jobs, we send all of the files in the argument list.
+ */
+
+- if (remote_job)
++ if (printer->remote && job->num_files > 1)
+ argv = calloc(7 + job->num_files, sizeof(char *));
+ else
+ argv = calloc(8, sizeof(char *));
+@@ -2925,7 +2917,7 @@
+ argv[4] = copies;
+ argv[5] = options;
+
+- if (remote_job)
++ if (printer->remote && job->num_files > 1)
+ {
+ for (i = 0; i < job->num_files; i ++)
+ {
+@@ -3018,7 +3010,8 @@
envp[envc ++] = device_uri;
envp[envc ++] = printer_name;
- if ((filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
-+ if (!remote_job &&
++ if (!printer->remote &&
+ (filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
{
-- snprintf(final_content_type, sizeof(final_content_type),
-- "FINAL_CONTENT_TYPE=%s/%s",
-- filter->src->super, filter->src->type);
-+ if (!strcmp (filter->dst->super, "printer"))
-+ snprintf(final_content_type, sizeof(final_content_type),
-+ "FINAL_CONTENT_TYPE=application/octet-stream");
-+ else
-+ snprintf(final_content_type, sizeof(final_content_type),
-+ "FINAL_CONTENT_TYPE=%s/%s",
-+ filter->dst->super, filter->dst->type);
-+
- envp[envc ++] = final_content_type;
+ snprintf(final_content_type, sizeof(final_content_type),
+ "FINAL_CONTENT_TYPE=%s/%s",
+@@ -3059,7 +3052,7 @@
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] envp[%d]=\"DEVICE_URI=%s\"",
+ job->id, i, sani_uri);
+
+- if (remote_job)
++ if (printer->remote)
+ job->current_file = job->num_files;
+ else
+ job->current_file ++;
+@@ -3401,7 +3394,7 @@
+ slot, filterfds[slot][0], filterfds[slot][1]);
+ cupsdClosePipe(filterfds[slot]);
+
+- if (remote_job)
++ if (printer->remote && job->num_files > 1)
+ {
+ for (i = 0; i < job->num_files; i ++)
+ free(argv[i + 6]);
+@@ -3445,7 +3438,7 @@
+
+ cupsArrayDelete(filters);
+
+- if (remote_job)
++ if (printer->remote && job->num_files > 1)
+ {
+ for (i = 0; i < job->num_files; i ++)
+ free(argv[i + 6]);
+--- cups-1.2.2/scheduler/printers.h.str1881 2006-03-23 21:07:20.000000000 +0000
++++ cups-1.2.2/scheduler/printers.h 2006-08-16 09:42:48.000000000 +0100
+@@ -66,6 +66,7 @@
+ char *device_uri; /* Device URI */
+ char *port_monitor; /* Port monitor */
+ int raw; /* Raw queue? */
++ int remote; /* Remote queue? */
+ mime_type_t *filetype; /* Pseudo-filetype for printer */
+ cups_array_t *filetypes; /* Supported file types */
+ void *job; /* Current job in queue */
+--- cups-1.2.2/scheduler/printers.c.str1881 2006-08-16 09:42:32.000000000 +0100
++++ cups-1.2.2/scheduler/printers.c 2006-08-16 09:42:48.000000000 +0100
+@@ -1502,7 +1502,8 @@
+ else
+ snprintf(resource, sizeof(resource), "/printers/%s", p->name);
+
+- if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL)
++ if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
++ auth->type == AUTH_NONE)
+ auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+
+ if (auth)
+@@ -1582,7 +1583,8 @@
+
+ printer_type = p->type;
+
+- p->raw = 0;
++ p->raw = 0;
++ p->remote = 0;
+
+ if (p->type & CUPS_PRINTER_REMOTE)
+ {
+@@ -1600,7 +1602,8 @@
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "device-uri", NULL,
+ p->uri);
+
+- p->raw = 1;
++ p->raw = 1;
++ p->remote = 1;
}
+ else
+ {
+@@ -2040,7 +2043,8 @@
+ * Print all files directly...
+ */
+
+- p->raw = 1;
++ p->raw = 1;
++ p->remote = 1;
+ }
+ else
+ {
+--- cups-1.2.2/backend/ipp.c.str1881 2006-07-12 20:42:35.000000000 +0100
++++ cups-1.2.2/backend/ipp.c 2006-08-16 09:42:48.000000000 +0100
+@@ -214,6 +214,9 @@
+ if ((content_type = getenv("CONTENT_TYPE")) == NULL)
+ content_type = "application/octet-stream";
++ if (!strncmp(content_type, "printer/", 8))
++ content_type = "application/vnd.cups-raw";
++
+ /*
+ * Extract the hostname and printer name from the URI...
+ */
Index: cups.spec
===================================================================
RCS file: /cvs/dist/rpms/cups/devel/cups.spec,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -r1.246 -r1.247
--- cups.spec 11 Aug 2006 17:13:35 -0000 1.246
+++ cups.spec 16 Aug 2006 09:08:22 -0000 1.247
@@ -6,7 +6,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.2.2
-Release: 10
+Release: 11
License: GPL
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@@ -419,6 +419,9 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
+* Wed Aug 16 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.2-11
+- Use upstream patch to fix STR #1881.
+
* Fri Aug 11 2006 Tim Waugh <twaugh at redhat.com> 1:1.2.2-10
- Remove 'Provides: LPRng = 3.8.15-3' (bug #148757).
- Applied patch to fix STR #1893 (bug #201800).
More information about the fedora-cvs-commits
mailing list