]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: In cfFilterImageToRaster() removed unneeded media-type parsing
authorTill Kamppeter <till.kamppeter@gmail.com>
Fri, 26 Aug 2022 11:38:39 +0000 (13:38 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Fri, 26 Aug 2022 11:38:39 +0000 (13:38 +0200)
The option/attribute "maedia-type"/"MediaType" got read out but
nowhere used, so removed the code reading it.

cupsfilters/imagetoraster.c

index 66f8079239bb51025a5cf027d0fa5e34ec3051a5..a749aa885cf7e049d8dbdce199e7dc69956f3798 100644 (file)
@@ -208,7 +208,6 @@ cfFilterImageToRaster(int inputfd,         /* I - File descriptor input stream *
                                           coords */
                        xc1, yc1;
   cups_cspace_t         cspace = -1;    /* CUPS color space */
-  char                 *media_type;    /* Media type */
   cups_raster_t                *ras;           /* Raster stream */
   cups_page_header2_t  header;         /* Page header */
   int                  num_options = 0;        /* Number of print options */
@@ -592,24 +591,6 @@ cfFilterImageToRaster(int inputfd,         /* I - File descriptor input stream *
               !strcasecmp(val, "yes")))
     doc.Flip = 1;
 
- /*
-  * Get the media type that have been chosen...
-  */
-
-  if ((val = cupsGetOption("MediaType", num_options, options)) != NULL ||
-      (val = cupsGetOption("media-type", num_options, options)) != NULL ||
-      (ipp = ippFindAttribute(job_attrs, "media-type", IPP_TAG_ZERO)) != NULL ||
-      (ipp = ippFindAttribute(printer_attrs, "media-type-supported",
-                             IPP_TAG_ZERO)) != NULL)
-  {
-    if (val != NULL)
-      media_type = strdup(val);
-    else if (ipp != NULL)
-      media_type = strdup(ippGetString(ipp, 0, NULL));
-  }
-  else
-    media_type = strdup("");
-
   /* support the "cm-calibration" option */
   cm_calibrate = cfCmGetCupsColorCalibrateMode(data);
 
@@ -1861,7 +1842,6 @@ cfFilterImageToRaster(int inputfd,         /* I - File descriptor input stream *
   */
 
  canceled:
-  free(media_type);
   free(row);
   cupsRasterClose(ras);
   cfImageClose(img);