]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add media-source to media-col-ready for iOS 17+ (Issue #738)
authorMichael R Sweet <msweet@msweet.org>
Fri, 29 Dec 2023 14:02:57 +0000 (09:02 -0500)
committerMichael R Sweet <msweet@msweet.org>
Fri, 29 Dec 2023 14:02:57 +0000 (09:02 -0500)
CHANGES.md
scheduler/printers.c

index a110a01377a2c1dadb4e5e23d13729776dc422e5..398d84462032bec2b4809660ae3b93309aabeede 100644 (file)
@@ -6,40 +6,41 @@ Changes in CUPS v2.5b1 (TBA)
 
 - Added `cupsDNSSD` APIs.
 - Added `cupsConcatString` and `cupsCopyString` string APIs.
-- Added a new argument value for `lpstat` argument '-W' - `successful` -
-  to get successfully printed jobs (Issue #830)
 - Added new APIs for form, JSON, JWT, IPP, and raster setup.
 - Added OpenSSL support for `cupsHashData` (Issue #762)
 - Added warning if the device has to do IPP request for 'all,media-col-database'
   in separate requests (Issue #829)
+- Added a new argument value for `lpstat` argument '-W' - `successful` -
+  to get successfully printed jobs (Issue #830)
 - Added driver filter to web interface (Issue #848)
-- Building with TLS support is now required - CUPS supports OpenSSL, GNUTLS
-  and LibreSSL.
-- Updated `cupsArray` APIs.
+- Updated CUPS to require TLS support - OpenSSL, GNUTLS and LibreSSL are
+  supported.
+- Updated CUPS to require ZLIB.
+- Updated CUPS to require support for `poll` API.
+- Updated `cupsArray` APIs to support modern naming and types.
+- Updated `cups_enum_dests()` timeout for listing available IPP printers (Issue #751)
 - Updated `httpAddrConnect2()` to handle `POLLHUP` together with `POLLIN` or
   `POLLOUT` (Issue #839)
-- Fixed crash in `scan_ps()` if incoming argument is NULL (Issue #831)
+- Fixed use-after-free in `cupsdAcceptClient()` when we log warning during error
+  handling (fixes CVE-2023-34241)
+- Fixed hanging of `lpstat` on Solaris (Issue #156)
 - Fixed Digest authentication support (Issue #260)
-- Fixed delays in lpd backend (Issue #741)
 - Fixed extensive looping in scheduler (Issue #604)
-- Fixed hanging of `lpstat` on IBM AIX (Issue #773)
-- Fixed hanging of `lpstat` on Solaris (Issue #156)
-- Fixed memory leak when creating color profiles (Issue #814)
-- Fixed memory leak when unloading a job (Issue #813)
+- Fixed printing multiple files on specific printers (Issue #643)
 - Fixed segfault in `cupsGetNamedDest()` when trying to get default printer, but
   the default printer is not set (Issue #719)
-- Fixed setting job state reasons for successful jobs (Issue #832)
-- Fixed RFC 1179 port reserving behavior in LPD backend (Issue #743)
-- Fixed printing multiple files on specific printers (Issue #643)
-- Fixed printing to stderr if we can't open cups-files.conf (Issue #777)
+- Fixed ready media support for iOS 17+ (Issue #738)
+- Fixed delays in lpd backend (Issue #741)
 - Fixed purging job files via `cancel -x` (Issue #742)
-- Fixed use-after-free in `cupsdAcceptClient()` when we log warning during error
-  handling (fixes CVE-2023-34241)
+- Fixed RFC 1179 port reserving behavior in LPD backend (Issue #743)
 - Fixed a bug in the PPD command interpretation code (Issue #768)
-- Raised `cups_enum_dests()` timeout for listing available IPP printers (Issue #751)
-- Removed `HAVE_LIBZ` and `HAVE_POLL` defines, making CUPS to depend
-  on the functionality
-- Removed hash support for SHA2-512-224 and SHA2-512-256
+- Fixed hanging of `lpstat` on IBM AIX (Issue #773)
+- Fixed printing to stderr if we can't open cups-files.conf (Issue #777)
+- Fixed memory leak when unloading a job (Issue #813)
+- Fixed memory leak when creating color profiles (Issue #814)
+- Fixed crash in `scan_ps()` if incoming argument is NULL (Issue #831)
+- Fixed setting job state reasons for successful jobs (Issue #832)
+- Removed hash support for SHA2-512-224 and SHA2-512-256.
 - Removed `mantohtml` script for generating html pages (use
   `https://www.msweet.org/mantohtml/`)
 - Removed SSPI and Security.framework support (CDSA)
index 7bca3bdc9b4e0b8cf1177f7e75ebb6bd6a73cc33..fc0bc36c288f28b96f4a787f8c24b151866ad0c1 100644 (file)
@@ -4485,7 +4485,8 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
 
       for (media_col_ready = NULL, media_ready = NULL, i = p->pc->num_sizes, pwgsize = p->pc->sizes; i > 0; i --, pwgsize ++)
       {
-       ipp_t *col;                     // media-col-ready value
+       ipp_t   *col;                   // media-col-ready value
+       char    source[128];            // media-source value
 
         // Skip printer sizes that don't have a PPD size or aren't in the ready
         // sizes array...
@@ -4501,6 +4502,13 @@ load_ppd(cupsd_printer_t *p)             /* I - Printer */
         // Add or append a media-col-ready value
        col = new_media_col(pwgsize);
 
+        // Add "media-source" for iOS 17 (Issue #738)
+       if (media_col_ready)
+         snprintf(source, sizeof(source), "auto.%d", ippGetCount(media_col_ready) + 1);
+       else
+         cupsCopyString(source, "auto", sizeof(source));
+       ippAddString(col, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "media-source", NULL, source);
+
        if (media_col_ready)
          ippSetCollection(p->ppd_attrs, &media_col_ready, ippGetCount(media_col_ready), col);
        else