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

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