Maybe a solution for STR #4185

Bernd Krumböck b.krumboeck at universalnet.at
Sat Sep 15 09:05:25 PDT 2012


Problem:
https://www.cups.org/str.php?L4185


Maybe following patch is a solution for my problem?

--- ipp.c.orig  2012-09-15 17:47:42.000000000 +0200
+++ ipp.c       2012-09-15 17:57:21.000000000 +0200
@@ -1727,19 +1727,12 @@

     ippSetString(job->attrs, &job->reasons, 0, "job-hold-until-specified");
   }
-  else if (job->attrs->request.op.operation_id == IPP_CREATE_JOB)
+  else
   {
     job->hold_until               = time(NULL) + MultipleOperationTimeout;
     job->state->values[0].integer = IPP_JOB_HELD;
     job->state_value              = IPP_JOB_HELD;
   }
-  else
-  {
-    job->state->values[0].integer = IPP_JOB_PENDING;
-    job->state_value              = IPP_JOB_PENDING;
-
-    ippSetString(job->attrs, &job->reasons, 0, "none");
-  }

   if (!(printer->type & CUPS_PRINTER_REMOTE) || Classification)
   {
@@ -8331,6 +8324,8 @@
   if ((job = add_job(con, printer, filetype)) == NULL)
     return;

+  job->pending_timeout = 1;
+
  /*
   * Update quota data...
   */
@@ -8358,6 +8353,15 @@
   rename(con->filename, filename);
   cupsdClearString(&con->filename);

+ /*
+  * Set job state...
+  */
+
+  job->state->values[0].integer = IPP_JOB_PENDING;
+  job->state_value              = IPP_JOB_PENDING;
+
+  ippSetString(job->attrs, &job->reasons, 0, "none");
+
  /*
   * See if we need to add the ending sheet...
   */


best regards,
Bernd




More information about the cups-devel mailing list