]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/job.c
First half of new "local temporary printer" queues, to support on-demand IPP
[thirdparty/cups.git] / scheduler / job.c
index 36719d89a50e3bb2b7c6391f0bde9941a76471af..de40bae59da319b8c04d74c62a0cc69b7323027e 100644 (file)
@@ -2195,6 +2195,15 @@ cupsdSaveAllJobs(void)
        job;
        job = (cupsd_job_t *)cupsArrayNext(Jobs))
   {
+    if (job->printer && job->printer->temporary)
+    {
+     /*
+      * Don't save jobs on temporary printers...
+      */
+
+      continue;
+    }
+
     cupsFilePrintf(fp, "<Job %d>\n", job->id);
     cupsFilePrintf(fp, "State %d\n", job->state_value);
     cupsFilePrintf(fp, "Created %ld\n", (long)job->creation_time);
@@ -2234,6 +2243,16 @@ cupsdSaveJob(cupsd_job_t *job)           /* I - Job */
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
                   job, job->id, job->attrs);
 
+  if (job->printer && job->printer->temporary)
+  {
+   /*
+    * Don't save jobs on temporary printers...
+    */
+
+    job->dirty = 0;
+    return;
+  }
+
   snprintf(filename, sizeof(filename), "%s/c%05d", RequestRoot, job->id);
 
   if ((fp = cupsdCreateConfFile(filename, ConfigFilePerm & 0600)) == NULL)