[cups.development] Maybe a solution for STR #4185

Michael Sweet msweet at apple.com
Mon Sep 17 18:23:18 PDT 2012


Bernd,

Create-Job and Print-Job work differently, so your proposed patch will cause problems for otherwise correctly functioning clients/networks.


On 2012-09-15, at 12:05 PM, Bernd Krumböck <b.krumboeck at universalnet.at> wrote:

> 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
> _______________________________________________
> cups-dev mailing list
> cups-dev at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-dev

__________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair





More information about the cups-devel mailing list