CHANGES IN CUPS V2.2b1
+ - The IPP backend now continues on to the next job when the remote
+ server/printer puts the job on hold (<rdar://problem/24858548>)
- The scheduler did not cancel multi-document jobs immediately
(<rdar://problem/24854834>)
- The scheduler did not return non-shared printers to local clients
/*
- * "$Id$"
- *
* IPP backend for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
int delay, /* Delay for retries */
prev_delay; /* Previous delay */
const char *compression; /* Compression mode */
- int waitjob, /* Wait for job complete? */
+ int waitjob, /* Wait for job complete? */
waitjob_tries = 0, /* Number of times we've waited */
waitprinter; /* Wait for printer ready? */
+ time_t waittime; /* Wait time for held jobs */
_cups_monitor_t monitor; /* Monitoring data */
ipp_attribute_t *job_id_attr; /* job-id attribute */
int job_id; /* job-id value */
_cupsLangPrintFilter(stderr, "INFO", _("Waiting for job to complete."));
- for (delay = _cupsNextDelay(0, &prev_delay); !job_canceled;)
+ for (delay = _cupsNextDelay(0, &prev_delay), waittime = time(NULL) + 30; !job_canceled;)
{
/*
* Check for side-channel requests...
job_sheets->values[0].integer);
/*
- * Stop polling if the job is finished or pending-held...
+ * Stop polling if the job is finished or pending-held for 30 seconds...
*/
- if (job_state->values[0].integer > IPP_JOB_STOPPED)
+ if (job_state->values[0].integer > IPP_JSTATE_STOPPED ||
+ (job_state->values[0].integer == IPP_JSTATE_HELD && time(NULL) > waittime))
{
ippDelete(response);
break;
else if (rem[0])
fprintf(stderr, "%s\n", rem);
}
-
-/*
- * End of "$Id$".
- */