summaryrefslogtreecommitdiff
path: root/debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch')
-rw-r--r--debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch b/debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
new file mode 100644
index 000000000..3b18e3345
--- /dev/null
+++ b/debian/patches/fixes-for-jobs-with-multiple-files-and-multiple-formats.patch
@@ -0,0 +1,28 @@
+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 8226acc..5902dd6 100644
+--- a/backend/ipp.c
++++ b/backend/ipp.c
+@@ -1803,7 +1803,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);
+