From b3533f112d997c499b757f30ba58e526f48fa042 Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 6 Nov 2013 21:36:35 +0000 Subject: [PATCH] Mirror changes from trunk + changelog. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11399 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES.txt | 8 ++++- scheduler/job.c | 86 ++++++++----------------------------------------- 2 files changed, 21 insertions(+), 73 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1dd691c17..c3f0a4235 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -CHANGES.txt - 1.7.1 - 2013-11-04 +CHANGES.txt - 1.7.1 - 2013-11-06 -------------------------------- CHANGES IN CUPS V1.7.1 @@ -12,6 +12,12 @@ CHANGES IN CUPS V1.7.1 - The RPM spec file did not list the build requirements; this was on purpose, but now we are listing the Red Hat package names () + - Printing to a raw queue could result in corrupt output due to + opportunistic compression () + - The GNU TLS support code triggered many compiler warnings due to the + use of old GNU TLS compatibility type names. + - The "make check" test suite did not work on Linux without the + cups-filters package installed () CHANGES IN CUPS V1.7.0 diff --git a/scheduler/job.c b/scheduler/job.c index db68096a9..da5bb29e9 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -1,71 +1,16 @@ /* * "$Id$" * - * Job management routines for the CUPS scheduler. + * Job management routines for the CUPS scheduler. * - * Copyright 2007-2012 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * Copyright 2007-2013 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products, all rights reserved. * - * These coded instructions, statements, and computer programs are the - * property of Apple Inc. and are protected by Federal copyright - * law. Distribution and use rights are outlined in the file "LICENSE.txt" - * which should have been included with this file. If this file is - * file is missing or damaged, see the license at "http://www.cups.org/". - * - * Contents: - * - * cupsdAddJob() - Add a new job to the job queue. - * cupsdCancelJobs() - Cancel all jobs for the given - * destination/user. - * cupsdCheckJobs() - Check the pending jobs and start any if the - * destination is available. - * cupsdCleanJobs() - Clean out old jobs. - * cupsdContinueJob() - Continue printing with the next file in a - * job. - * cupsdDeleteJob() - Free all memory used by a job. - * cupsdFreeAllJobs() - Free all jobs from memory. - * cupsdFindJob() - Find the specified job. - * cupsdGetPrinterJobCount() - Get the number of pending, processing, or - * held jobs in a printer or class. - * cupsdGetUserJobCount() - Get the number of pending, processing, or - * held jobs for a user. - * cupsdLoadAllJobs() - Load all jobs from disk. - * cupsdLoadJob() - Load a single job. - * cupsdMoveJob() - Move the specified job to a different - * destination. - * cupsdReleaseJob() - Release the specified job. - * cupsdRestartJob() - Restart the specified job. - * cupsdSaveAllJobs() - Save a summary of all jobs to disk. - * cupsdSaveJob() - Save a job to disk. - * cupsdSetJobHoldUntil() - Set the hold time for a job. - * cupsdSetJobPriority() - Set the priority of a job, moving it up/down - * in the list as needed. - * cupsdSetJobState() - Set the state of the specified print job. - * cupsdStopAllJobs() - Stop all print jobs. - * cupsdUnloadCompletedJobs() - Flush completed job history from memory. - * cupsdUpdateJobs() - Update the history/file files for all jobs. - * compare_active_jobs() - Compare the job IDs and priorities of two - * jobs. - * compare_jobs() - Compare the job IDs of two jobs. - * dump_job_history() - Dump any debug messages for a job. - * free_job_history() - Free any log history. - * finalize_job() - Cleanup after job filter processes and - * support data. - * get_options() - Get a string containing the job options. - * ipp_length() - Compute the size of the buffer needed to hold - * the textual IPP attributes. - * load_job_cache() - Load jobs from the job.cache file. - * load_next_job_id() - Load the NextJobId value from the job.cache - * file. - * load_request_root() - Load jobs from the RequestRoot directory. - * remove_job_files() - Remove the document files for a job. - * remove_job_history() - Remove the control file for a job. - * set_time() - Set one of the "time-at-xyz" attributes. - * start_job() - Start a print job. - * stop_job() - Stop a print job. - * unload_job() - Unload a job from memory. - * update_job() - Read a status update from a job's filters. - * update_job_attrs() - Update the job-printer-* attributes. + * These coded instructions, statements, and computer programs are the + * property of Apple Inc. and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "LICENSE.txt" + * which should have been included with this file. If this file is + * file is missing or damaged, see the license at "http://www.cups.org/". */ /* @@ -758,9 +703,8 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */ * Add decompression/raw filter as needed... */ - if ((!job->printer->raw && job->compressions[job->current_file]) || - (!filters && !job->printer->remote && - (job->num_files > 1 || !strncmp(job->printer->device_uri, "file:", 5)))) + if (job->compressions[job->current_file] && + (!job->printer->remote || job->num_files == 1)) { /* * Add gziptoany filter to the front of the list... @@ -928,7 +872,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */ { snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot, job->id, job->current_file + 1); - argv[6] = filename; + argv[6] = strdup(filename); } for (i = 0; argv[i]; i ++) @@ -1313,13 +1257,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */ cupsdClosePipe(filterfds[slot]); - if (job->printer->remote && job->num_files > 1) - { - for (i = 0; i < job->num_files; i ++) - free(argv[i + 6]); - } + for (i = 0; i < job->num_files; i ++) + free(argv[i + 6]); free(argv); + if (printer_state_reasons) free(printer_state_reasons); -- 2.39.2