From: msweet Date: Thu, 10 Mar 2016 17:01:08 +0000 (+0000) Subject: Fix cancel of jobs with multiple documents () X-Git-Tag: v2.2b1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4c3fcf03736a9f8b09416baa86ed38fa7feb1b;p=thirdparty%2Fcups.git Fix cancel of jobs with multiple documents () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13131 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index a51b57fedc..eee94d126e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,10 @@ -CHANGES.txt - 2.2b1 - 2016-03-09 +CHANGES.txt - 2.2b1 - 2016-03-10 -------------------------------- CHANGES IN CUPS V2.2b1 + - The scheduler did not cancel multi-document jobs immediately + () - The scheduler did not return non-shared printers to local clients unless they connected to the domain socket () - The scheduler now reads the spool directory if one or more job cache diff --git a/scheduler/main.c b/scheduler/main.c index 8bfb05fc52..f9b46bad6e 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -1,6 +1,4 @@ /* - * "$Id$" - * * Main loop for the CUPS scheduler. * * Copyright 2007-2016 by Apple Inc. @@ -1507,7 +1505,19 @@ process_children(void) * filters are done, and if so move to the next file. */ - if (job->current_file < job->num_files && job->printer) + if (job->state_value >= IPP_JOB_CANCELED) + { + /* + * Remove the job from the active list if there are no processes still + * running for it... + */ + + for (i = 0; job->filters[i] < 0; i++); + + if (!job->filters[i] && job->backend <= 0) + cupsArrayRemove(ActiveJobs, job); + } + else if (job->current_file < job->num_files && job->printer) { for (i = 0; job->filters[i] < 0; i ++); @@ -1522,18 +1532,6 @@ process_children(void) cupsdContinueJob(job); } } - else if (job->state_value >= IPP_JOB_CANCELED) - { - /* - * Remove the job from the active list if there are no processes still - * running for it... - */ - - for (i = 0; job->filters[i] < 0; i++); - - if (!job->filters[i] && job->backend <= 0) - cupsArrayRemove(ActiveJobs, job); - } } } @@ -2201,8 +2199,3 @@ usage(int status) /* O - Exit status */ exit(status); } - - -/* - * End of "$Id$". - */