47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
diff -up cups-1.4.7/scheduler/job.c.str3880 cups-1.4.7/scheduler/job.c
|
||
|
--- cups-1.4.7/scheduler/job.c.str3880 2011-07-20 13:19:38.280543190 +0100
|
||
|
+++ cups-1.4.7/scheduler/job.c 2011-07-20 13:20:01.691126073 +0100
|
||
|
@@ -291,7 +291,7 @@ cupsdCheckJobs(void)
|
||
|
|
||
|
if (job->kill_time && job->kill_time <= curtime)
|
||
|
{
|
||
|
- cupsdLogMessage(CUPSD_LOG_ERROR, "[Job %d] Stopping unresponsive job!",
|
||
|
+ cupsdLogMessage(CUPSD_LOG_ERROR, "[Job %d] Stopping unresponsive job!",
|
||
|
job->id);
|
||
|
|
||
|
stop_job(job, CUPSD_JOB_FORCE);
|
||
|
@@ -1338,14 +1338,19 @@ cupsdDeleteJob(cupsd_job_t *job, /
|
||
|
free(job->compressions);
|
||
|
free(job->filetypes);
|
||
|
|
||
|
- while (job->num_files > 0)
|
||
|
+ if (action == CUPSD_JOB_PURGE)
|
||
|
{
|
||
|
- snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
|
||
|
- job->id, job->num_files);
|
||
|
- unlink(filename);
|
||
|
+ while (job->num_files > 0)
|
||
|
+ {
|
||
|
+ snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
|
||
|
+ job->id, job->num_files);
|
||
|
+ unlink(filename);
|
||
|
|
||
|
- job->num_files --;
|
||
|
+ job->num_files --;
|
||
|
+ }
|
||
|
}
|
||
|
+ else
|
||
|
+ job->num_files = 0;
|
||
|
}
|
||
|
|
||
|
if (job->history)
|
||
|
@@ -3224,7 +3229,7 @@ get_options(cupsd_job_t *job, /* I - Jo
|
||
|
IPP_TAG_ZERO)) != NULL &&
|
||
|
(attr->value_tag == IPP_TAG_KEYWORD ||
|
||
|
attr->value_tag == IPP_TAG_NAME) &&
|
||
|
- (ppd = _pwgGetOutputBin(pwg, attr->values[0].string.text)) != NULL)
|
||
|
+ (ppd = _pwgGetOutputBin(pwg, attr->values[0].string.text)) != NULL)
|
||
|
{
|
||
|
/*
|
||
|
* Map output-bin to OutputBin option...
|