From 8ef06c795faa435f4af6560911ce8120687f2880 Mon Sep 17 00:00:00 2001 From: msweet Date: Tue, 7 Jul 2015 17:24:06 +0000 Subject: [PATCH] The scheduler incorrectly started jobs while canceling multiple jobs (STR #4648) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12777 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-2.0.txt | 2 ++ scheduler/ipp.c | 2 ++ scheduler/job.c | 16 +++++----------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index 86256ecab..ff74331c6 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -9,6 +9,8 @@ CHANGES IN CUPS V2.0.4 - The scheduler did not start all pending jobs at once (STR #4646) - The web search incorrectly searched time-at-xxx values (STR #4652) - Fixed an RPM spec file issue (STR #4657) + - The scheduler incorrectly started jobs while canceling multiple jobs + (STR #4648) - Documentation changes (STR #4651) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 57c882d05..0e9249d8d 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -3312,6 +3312,8 @@ cancel_all_jobs(cupsd_client_t *con, /* I - Client connection */ } con->response->request.status.status_code = IPP_OK; + + cupsdCheckJobs(); } diff --git a/scheduler/job.c b/scheduler/job.c index 82c5306d6..dd6d30caf 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -213,8 +213,6 @@ cupsdCancelJobs(const char *dest, /* I - Destination to cancel */ "Job canceled by user."); } } - - cupsdCheckJobs(); } @@ -3526,13 +3524,6 @@ finalize_job(cupsd_job_t *job, /* I - Job */ job->printer->job = NULL; job->printer = NULL; - - /* - * Try printing another job... - */ - - if (printer_state != IPP_PRINTER_STOPPED) - cupsdCheckJobs(); } @@ -4849,6 +4840,8 @@ update_job(cupsd_job_t *job) /* I - Job to check */ *ptr; /* Pointer update... */ int loglevel, /* Log level for message */ event = 0; /* Events? */ + cupsd_printer_t *printer = job->printer; + /* Printer */ static const char * const levels[] = /* Log levels */ { "NONE", @@ -5222,10 +5215,11 @@ update_job(cupsd_job_t *job) /* I - Job to check */ finalize_job(job, 1); /* - * Check for new jobs... + * Try printing another job... */ - cupsdCheckJobs(); + if (printer->state != IPP_PRINTER_STOPPED) + cupsdCheckJobs(); } } -- 2.39.5