From: mike Date: Fri, 28 Feb 2003 20:18:08 +0000 (+0000) Subject: UpdateJob fix for job history... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2a836ad71aa16ea89cf3b8b0b897a309bf9c46a;p=thirdparty%2Fcups.git UpdateJob fix for job history... git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3413 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/scheduler/job.c b/scheduler/job.c index 25cfe4d3bd..3624cec0c4 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -1,5 +1,5 @@ /* - * "$Id: job.c,v 1.186 2003/02/05 21:10:17 mike Exp $" + * "$Id: job.c,v 1.187 2003/02/28 20:18:08 mike Exp $" * * Job management routines for the Common UNIX Printing System (CUPS). * @@ -1934,6 +1934,7 @@ UpdateJob(job_t *job) /* I - Job to check */ char *lineptr, /* Pointer to end of line in buffer */ *message; /* Pointer to message text */ int loglevel; /* Log level for message */ + int job_history; /* Did CancelJob() keep the job? */ if ((bytes = read(job->pipe, job->buffer + job->bufused, @@ -2137,9 +2138,11 @@ UpdateJob(job_t *job) /* I - Job to check */ StartJob(job->id, job->printer); else { + job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE); + CancelJob(job->id, 0); - if (JobHistory) + if (job_history) { job->state->values[0].integer = IPP_JOB_ABORTED; SaveJob(job->id); @@ -2161,9 +2164,11 @@ UpdateJob(job_t *job) /* I - Job to check */ } else { + job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE); + CancelJob(job->id, 0); - if (JobHistory) + if (job_history) { job->state->values[0].integer = IPP_JOB_COMPLETED; SaveJob(job->id); @@ -3403,5 +3408,5 @@ start_process(const char *command, /* I - Full path to command */ /* - * End of "$Id: job.c,v 1.186 2003/02/05 21:10:17 mike Exp $". + * End of "$Id: job.c,v 1.187 2003/02/28 20:18:08 mike Exp $". */