summaryrefslogtreecommitdiff
path: root/debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
blob: f9aa1e641e61d0405c7f638600e0c41c5f8660cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 90bb4c7dd4730b04496f104dbd39a9273821766c Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Tue, 9 Aug 2016 18:11:07 +0200
Subject: Fix jobs with multiple files or multiple formats

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=972242
Bug: https://www.cups.org/str.php?L4348
Last-Updated: 2015-02-10
Patch-Name: fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
---
 backend/ipp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/ipp.c b/backend/ipp.c
index 5a86eff81..c83d5cbf1 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -1776,7 +1776,10 @@ main(int  argc,				/* I - Number of command-line args */
 	ippAddBoolean(request, IPP_TAG_OPERATION, "last-document",
         	      (i + 1) >= num_files);
 
-	if (document_format)
+	if (num_files > 1)
+	  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+		       "document-format", NULL, "application/octet-stream");
+	else if (document_format)
 	  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
 		       "document-format", NULL, document_format);