50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
diff -up cups-1.4rc1/scheduler/job.c.str3292 cups-1.4rc1/scheduler/job.c
|
|
--- cups-1.4rc1/scheduler/job.c.str3292 2009-08-26 17:01:19.442314736 +0100
|
|
+++ cups-1.4rc1/scheduler/job.c 2009-08-26 17:03:51.993190253 +0100
|
|
@@ -2359,19 +2359,23 @@ cupsdSetJobState(
|
|
break;
|
|
|
|
case IPP_JOB_ABORTED :
|
|
- case IPP_JOB_CANCELED :
|
|
case IPP_JOB_COMPLETED :
|
|
+ case IPP_JOB_CANCELED :
|
|
/*
|
|
- * Expire job subscriptions since the job is now "completed"...
|
|
+ * Remove the job from the active list if there are no
|
|
+ * processes still running for it...
|
|
*/
|
|
|
|
- cupsdExpireSubscriptions(NULL, job);
|
|
+ for (i = 0; job->filters[i] < 0; i++);
|
|
+ if (newstate != IPP_JOB_CANCELED ||
|
|
+ (!job->filters[i] && job->backend <= 0))
|
|
+ cupsArrayRemove(ActiveJobs, job);
|
|
|
|
/*
|
|
- * Remove the job from the active list...
|
|
+ * Expire job subscriptions since the job is now "completed"...
|
|
*/
|
|
|
|
- cupsArrayRemove(ActiveJobs, job);
|
|
+ cupsdExpireSubscriptions(NULL, job);
|
|
|
|
#ifdef __APPLE__
|
|
/*
|
|
diff -up cups-1.4rc1/scheduler/main.c.str3292 cups-1.4rc1/scheduler/main.c
|
|
--- cups-1.4rc1/scheduler/main.c.str3292 2009-08-26 17:01:19.084319753 +0100
|
|
+++ cups-1.4rc1/scheduler/main.c 2009-08-26 17:03:52.005190304 +0100
|
|
@@ -1803,6 +1803,13 @@ process_children(void)
|
|
cupsdContinueJob(job);
|
|
}
|
|
}
|
|
+ else if (job->state_value == IPP_JOB_CANCELED)
|
|
+ {
|
|
+ for (i = 0; job->filters[i] < 0; i++);
|
|
+
|
|
+ if (!job->filters[i] && job->backend <= 0)
|
|
+ cupsArrayRemove(ActiveJobs, job);
|
|
+ }
|
|
}
|
|
}
|
|
|