]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/job.c
Fix source file header text duplication text duplication.
[thirdparty/cups.git] / scheduler / job.c
index 53af0031984a761b8cdfed1996444464aab88b4a..1b12fe5a152826774544c93db180c94678e0b82b 100644 (file)
@@ -8,7 +8,7 @@
  * property of Apple Inc. and are protected by Federal copyright
  * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
  * which should have been included with this file.  If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
+ * missing or damaged, see the license at "http://www.cups.org/".
  */
 
 /*
@@ -387,16 +387,14 @@ cupsdCheckJobs(void)
         if (pclass)
        {
         /*
-         * Add/update a job-actual-printer-uri attribute for this job
+         * Add/update a job-printer-uri-actual attribute for this job
          * so that we know which printer actually printed the job...
          */
 
-          if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
-                                      IPP_TAG_URI)) != NULL)
+          if ((attr = ippFindAttribute(job->attrs, "job-printer-uri-actual", IPP_TAG_URI)) != NULL)
             ippSetString(job->attrs, &attr, 0, printer->uri);
          else
-           ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI,
-                        "job-actual-printer-uri", NULL, printer->uri);
+           ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri-actual", NULL, printer->uri);
 
           job->dirty = 1;
           cupsdMarkDirty(CUPSD_DIRTY_JOBS);
@@ -750,8 +748,8 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
   * Add decompression/raw filter as needed...
   */
 
-  if (job->compressions[job->current_file] &&
-      (!job->printer->remote || job->num_files == 1))
+  if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
+      (!job->printer->remote && job->printer->raw && job->num_files > 1))
   {
    /*
     * Add gziptoany filter to the front of the list...
@@ -3208,7 +3206,7 @@ finalize_job(cupsd_job_t *job,            /* I - Job */
 
    /*
     * Convert the status to an exit code.  Due to the way the W* macros are
-    * implemented on MacOS X (bug?), we have to store the exit status in a
+    * implemented on macOS (bug?), we have to store the exit status in a
     * variable first and then convert...
     */
 
@@ -3546,6 +3544,13 @@ finalize_job(cupsd_job_t *job,           /* I - Job */
 
   cupsArrayRemove(PrintingJobs, job);
 
+ /*
+  * Clear informational messages...
+  */
+
+  if (job->status_level > CUPSD_LOG_ERROR)
+    job->printer->state_message[0] = '\0';
+
  /*
   * Apply any PPD updates...
   */
@@ -5185,7 +5190,7 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
         ptr = message;
 
       if (*ptr)
-        cupsdLogJob(job, loglevel, "%s", ptr);
+        cupsdLogJob(job, loglevel == CUPSD_LOG_INFO ? CUPSD_LOG_DEBUG : loglevel, "%s", ptr);
 
       if (loglevel < CUPSD_LOG_DEBUG &&
           strcmp(job->printer->state_message, ptr))