<dd></dd>
<dd>Specifies the directory where the server configuration files can be found.
</dd>
-<dt>SyncOnClose Yes
-</dt>
-<dd></dd>
-<dt>SyncOnClose No
-</dt>
-<dd>Specifies whether the scheduler calls <i>fsync(2)</i> after writing configuration
-or state files. The default is No.
-</dd>
<dt>SystemGroup group-name [group-name ...]
</dt>
<dd></dd>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
<i>smbd(8)</i>, <i>smb.conf(5)</i>,
<a href='http://localhost:631/help'>http://localhost:631/help</a>
+<br>
+<a href='http://www.cups.org/windows/'>http://www.cups.org/windows/</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
Copyright 2007-2013 by Apple Inc.
CUPS IPP specification for CUPS.
- Copyright 2007-2012 by Apple Inc.
+ Copyright 2007-2013 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
These coded instructions, statements, and computer programs are the
<p>The job-billing attribute provides a text value to associate with a job
for billing purposes.
+<h4><a name="job-cancel-after">job-cancel-after (integer(1:MAX))</a><span class='info'>CUPS 2.0</span></h4>
+
+<p>The job-cancel-after attribute provides the maximum number of seconds that are allowed for processing a job.</p>
+
<h4><a name="job-hold-until">job-hold-until (keyword | name(MAX))</a><span class='info'>CUPS 1.1</span></h4>
<p>The job-hold-until attribute specifies a hold time. In addition to the
cupsd_printer_t *printer) /* I - Printer to print job */
{
const char *filename; /* Support filename */
+ ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
+ "job-cancel-after",
+ IPP_TAG_INTEGER);
+ /* job-cancel-after attribute */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))",
job->printer = printer;
printer->job = job;
- if (MaxJobTime > 0)
+ if (cancel_after)
+ job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
+ else if (MaxJobTime > 0)
job->cancel_time = time(NULL) + MaxJobTime;
else
job->cancel_time = 0;
{
event |= CUPSD_EVENT_PRINTER_STATE;
- if (MaxJobTime > 0 && strstr(message, "connecting-to-device") != NULL)
+ if (MaxJobTime > 0)
{
/*
* Reset cancel time after connecting to the device...
*/
+ ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
+ "job-cancel-after",
+ IPP_TAG_INTEGER);
+ /* job-cancel-after attribute */
+
for (i = 0; i < job->printer->num_reasons; i ++)
if (!strcmp(job->printer->reasons[i], "connecting-to-device"))
break;
if (i >= job->printer->num_reasons)
- job->cancel_time = time(NULL) + MaxJobTime;
+ {
+ if (cancel_after)
+ job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
+ else
+ job->cancel_time = time(NULL) + MaxJobTime;
+ }
}
}
}
#endif /* kIOPMAssertionTypeDenySystemSleep */
+ /*
+ * Make sure jobs that were queued prior to the system going to sleep don't
+ * get canceled right away...
+ */
+
+ if (MaxJobTime > 0)
+ {
+ cupsd_job_t *job; /* Current job */
+
+ for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
+ job;
+ job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
+ {
+ if (job->cancel_time)
+ {
+ ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
+ "job-cancel-after",
+ IPP_TAG_INTEGER);
+
+ if (cancel_after)
+ job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
+ else
+ job->cancel_time = time(NULL) + MaxJobTime;
+ }
+ }
+ }
+
cupsdCheckJobs();
}