Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

job-hold-until not working for remote IPP queues #3258

Closed

Description

@michaelrsweet

Version: 1.4rc1
CUPS.org User: twaugh.redhat

When a local queue for a remote IPP queue (e.g. a CUPS 'discovered' queue) is given a job with job-hold-until=18:00, the job is either sent directly to the queue blocking any other jobs submitted locally to that queue, or is printed after 300 seconds instead of when specified (depending on which IPP operation was used).

Instead of submitting held jobs to the remote queue they should stay in the local queue until it is time to release them. This makes it much easier for the user to discover the state of their submitted jobs anyway.

Patch attached.

Activity

  1. michaelrsweet commented on Jul 14, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Change looks reasonable, will incorporate into 1.4.x.

  2. michaelrsweet commented on Jul 14, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Actually, this patch won't work as-is since the job processing code passes the job-hold-until value through to the remote server.

    New patch coming up...

  3. michaelrsweet commented on Jul 14, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  4. michaelrsweet commented on Jul 14, 2009

    @michaelrsweet
    ContributorAuthor

    "0001-Don-t-forward-held-jobs-for-remote-IPP-queues.patch":

    From 32b71e348b373e9fd9d9d5b86a98cffb7c132763 Mon Sep 17 00:00:00 2001
    From: Tim Waugh twaugh@redhat.com
    Date: Fri, 10 Jul 2009 15:41:35 +0100
    Subject: [PATCH] Don't forward held jobs for remote IPP queues.

    Jobs queued locally destined for remote IPP queues, with the
    job-hold-until attribute set, should be queue locally until the job
    hold time. If this is not done, the hold time is not honoured in the
    case of a job being created with Create-Job: instead, the
    MultipleOperationTimeout elapses and the job is released.

    In the case of Print-Job, the job is sent directly to the remote queue
    with the correct job-hold-until attribute, but no other jobs submitted
    to the local queue will be forwarded to the remote queue until after
    the initial job has completed -- even when they are not held.

    • scheduler/ipp.c (add_job): Don't forward held jobs for remote IPP
      queues.

      scheduler/ipp.c | 3 +--
      1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/scheduler/ipp.c b/scheduler/ipp.c
    index ceb7f4e..14bc25c 100644
    --- a/scheduler/ipp.c
    +++ b/scheduler/ipp.c
    @@ -1727,8 +1727,7 @@ add_job(cupsd_client_t con, / I - Client connection */
    attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
    "job-hold-until", NULL, val);
    }

    • if (attr && strcmp(attr->values[0].string.text, "no-hold") &&
    •  !(printer->type & CUPS_PRINTER_REMOTE))
      
    • if (attr && strcmp(attr->values[0].string.text, "no-hold"))
      {
      /*

    * Hold job until specified time...

    1.6.2.5

  5. michaelrsweet commented on Jul 14, 2009

    @michaelrsweet
    ContributorAuthor

    "str3258.patch":

    Index: scheduler/ipp.c

    --- scheduler/ipp.c (revision 8751)
    +++ scheduler/ipp.c (working copy)
    @@ -1727,8 +1727,7 @@
    attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
    "job-hold-until", NULL, val);
    }

    • if (attr && strcmp(attr->values[0].string.text, "no-hold") &&

    •  !(printer->type & CUPS_PRINTER_REMOTE))
      
    • if (attr && strcmp(attr->values[0].string.text, "no-hold"))
      {
      /*

    • Hold job until specified time...
      Index: scheduler/job.c

      --- scheduler/job.c (revision 8751)
      +++ scheduler/job.c (working copy)
      @@ -3032,7 +3032,8 @@
      attr->value_tag == IPP_TAG_BEGIN_COLLECTION) /* Not yet supported */
      continue;

    •  if (!strncmp(attr->name, "time-", 5))
      
    •  if (!strncmp(attr->name, "time-", 5) ||
      
    •      !strcmp(attr->name, "job-hold-until"))
      

      continue;

      if (!strncmp(attr->name, "job-", 4) &&

  6. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions