From: Zdenek Dohnal Date: Tue, 20 Sep 2022 16:01:39 +0000 (+0200) Subject: scheduler/ipp.c: Ignore some more IPP defaults (fixes #484) X-Git-Tag: v2.4.3~126^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F486%2Fhead;p=thirdparty%2Fcups.git scheduler/ipp.c: Ignore some more IPP defaults (fixes #484) If the application sends PPD option, don't override it via IPP default option. --- diff --git a/scheduler/ipp.c b/scheduler/ipp.c index bea2ad9584..60aa5544a5 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -2946,12 +2946,21 @@ apply_printer_defaults( i --, option ++) if (!ippFindAttribute(job->attrs, option->name, IPP_TAG_ZERO)) { + if (!strcmp(option->name, "media") && ippFindAttribute(job->attrs, "PageSize", IPP_TAG_NAME)) + continue; /* Don't override PageSize */ + + if (!strcmp(option->name, "output-bin") && ippFindAttribute(job->attrs, "OutputBin", IPP_TAG_NAME)) + continue; /* Don't override OutputBin */ + if (!strcmp(option->name, "print-quality") && ippFindAttribute(job->attrs, "cupsPrintQuality", IPP_TAG_NAME)) continue; /* Don't override cupsPrintQuality */ if (!strcmp(option->name, "print-color-mode") && ippFindAttribute(job->attrs, "ColorModel", IPP_TAG_NAME)) continue; /* Don't override ColorModel */ + if (!strcmp(option->name, "sides") && ippFindAttribute(job->attrs, "Duplex", IPP_TAG_NAME)) + continue; /* Don't override Duplex */ + cupsdLogJob(job, CUPSD_LOG_DEBUG, "Adding default %s=%s", option->name, option->value); num_options = cupsAddOption(option->name, option->value, num_options, &options);