Blame SOURCES/0001-scheduler-job.c-use-gziptoany-for-raw-files-not-just.patch

a17bb8
From 08e9b6e1f8497a8159d6bd7cd6dc96ae79a2e704 Mon Sep 17 00:00:00 2001
a17bb8
From: Bryan Mason <bmason@redhat.com>
a17bb8
Date: Thu, 15 Jul 2021 16:26:27 -0700
a17bb8
Subject: [PATCH] scheduler/job.c: use gziptoany for raw files (not just raw
a17bb8
 printers)
a17bb8
a17bb8
---
a17bb8
 scheduler/job.c | 6 +++++-
a17bb8
 1 file changed, 5 insertions(+), 1 deletion(-)
a17bb8
a17bb8
diff --git a/scheduler/job.c b/scheduler/job.c
a17bb8
index d8c2efcc6..b448acda5 100644
a17bb8
--- a/scheduler/job.c
a17bb8
+++ b/scheduler/job.c
a17bb8
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job)	/* I - Job */
a17bb8
   int			backroot;	/* Run backend as root? */
a17bb8
   int			pid;		/* Process ID of new filter process */
a17bb8
   int			banner_page;	/* 1 if banner page, 0 otherwise */
a17bb8
+  int			raw_file;       /* 1 if file type is vnd.cups-raw */
a17bb8
   int			filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
a17bb8
 					/* Pipes used between filters */
a17bb8
   int			envc;		/* Number of environment variables */
a17bb8
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job)	/* I - Job */
a17bb8
   * Add decompression/raw filter as needed...
a17bb8
   */
a17bb8
 
a17bb8
+  raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
a17bb8
+    !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
a17bb8
+  
a17bb8
   if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
a17bb8
-      (!job->printer->remote && job->printer->raw && job->num_files > 1))
a17bb8
+      (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
a17bb8
   {
a17bb8
    /*
a17bb8
     * Add gziptoany filter to the front of the list...
a17bb8
-- 
a17bb8
2.31.1
a17bb8