cups/cups-ipp-multifile.patch
2013-08-06 17:27:37 +01:00

21 lines
928 B
Diff

diff -up cups-1.6.3/backend/ipp.c.ipp-multifile cups-1.6.3/backend/ipp.c
--- cups-1.6.3/backend/ipp.c.ipp-multifile 2013-08-06 17:17:19.359471503 +0100
+++ cups-1.6.3/backend/ipp.c 2013-08-06 17:19:03.346990727 +0100
@@ -1682,10 +1682,13 @@ main(int argc, /* I - Number of comm
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, argv[2]);
- if ((i + 1) >= num_files)
- ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);
+ 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);