From: Michael R Sweet Date: Thu, 24 Mar 2016 21:19:51 +0000 (-0400) Subject: Mirror fix from master. X-Git-Tag: release-2.1.4~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc64a80fd01016eb5c3b62b754fc684d87bfb89;p=thirdparty%2Fcups.git Mirror fix from master. --- diff --git a/CHANGES.txt b/CHANGES.txt index 7183048ea2..d3f926564d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,28 +1,31 @@ -CHANGES.txt - 2.1.4 - 2016-02-12 +CHANGES.txt - 2.1.4 - 2016-03-24 -------------------------------- CHANGES IN CUPS V2.1.4 - - Documentation update (STR #4772) + - The cups-lpd mini-daemon incorrectly included the document-name + attribute when creating a job. It should only be included when + sending a job (Issue #4790) + - Documentation update (Issue #4772) CHANGES IN CUPS V2.1.3 - The default password function did not work on some platforms - (STR #4750) + (Issue #4750) - The scheduler should not exit under memory pressure () - The EPL2 and ZPL sample drivers did not properly support the CutMedia option. - Pending subscriptions would prevent the scheduler from idle exiting - (STR #4754) + (Issue #4754) - Fixed some issues in ipptool for skipped tests () - The "lp -H resume" command did not reset the "job-state-reasons" - attribute value (STR #4752) + attribute value (Issue #4752) - The scheduler did not allow access to resource files (icons, etc.) - when the web interface was disabled (STR #4755) - - Localization fix (STR #4756) + when the web interface was disabled (Issue #4755) + - Localization fix (Issue #4756) CHANGES IN CUPS V2.1.2 @@ -44,56 +47,56 @@ CHANGES IN CUPS V2.1.1 , , , , ) - - The cupsGetPPD* functions did not work with IPP printers (STR #4725) + - The cupsGetPPD* functions did not work with IPP printers (Issue #4725) - Some older HP LaserJet printers need a delayed close when printing - using the libusb-based USB backend (STR #4549) + using the libusb-based USB backend (Issue #4549) - The libusb-based USB backend did not unload the kernel usblp module if it was preventing the backend from accessing the printer - (STR #4707) + (Issue #4707) - Current Primera printers were incorrectly reported as Fargo printers - (STR #4708) + (Issue #4708) - The IPP backend did not always handle jobs getting canceled at the printer () - - Scheduler logging change (STR #4728) - - Added USB quirk for Canon MP530 (STR #4730) + - Scheduler logging change (Issue #4728) + - Added USB quirk for Canon MP530 (Issue #4730) - The scheduler did not deliver job notifications for jobs submitted to - classes (STR #4733) + classes (Issue #4733) - Changing the printer-is-shared value for a remote queue did not - produce an error (STR #4738) + produce an error (Issue #4738) - The IPP backend incorrectly included the job-password attribute in Validate-Job requests () - - Updated localizations (STR #4709) + - Updated localizations (Issue #4709) CHANGES IN CUPS V2.1.0 - - Fixed more scheduler crash bugs in the new logging code (STR #4687, - STR #4690) + - Fixed more scheduler crash bugs in the new logging code (Issue #4687, + Issue #4690) - The scheduler did not use the ConfigFilePerm setting when copying PPD - files or interface scripts attached to a request (STR #4703) + files or interface scripts attached to a request (Issue #4703) - Now support new Chinese locale IDs and their correct fallback locales (, ) - "make check" incorrectly reported an expectation of 18 warning - messages when 8 were expected (STR #4684) - - The new PDF file type rule did not work (STR #4692) + messages when 8 were expected (Issue #4684) + - The new PDF file type rule did not work (Issue #4692) - The scheduler did not update the jobs.cache file when job files were - expired (STR #4706) - - Fixed some configure script issues (STR #4694, STR #4695, STR #4698) - - Documentation updates (STR #4691, STR #4693) + expired (Issue #4706) + - Fixed some configure script issues (Issue #4694, Issue #4695, Issue #4698) + - Documentation updates (Issue #4691, Issue #4693) CHANGES IN CUPS V2.1rc1 - Added support for 3D printers (basic types only, no built-in filters) based on PWG white paper. - - Fixed bugs in the new journald support (STR #4655, STR #4658, - STR #4661) - - Fixed domain socket support on Linux (STR #4679) - - Fixed signal handlers in the dnssd and usb backends (STR #4671) + - Fixed bugs in the new journald support (Issue #4655, Issue #4658, + Issue #4661) + - Fixed domain socket support on Linux (Issue #4679) + - Fixed signal handlers in the dnssd and usb backends (Issue #4671) - in sections now applies to all operations when - used by itself (STR #4659) - - Configure script changes for systemd support (STR #4669) - - Updated autoconf sources to use newer form of AC_INIT (STR #4664) + used by itself (Issue #4659) + - Configure script changes for systemd support (Issue #4669) + - Updated autoconf sources to use newer form of AC_INIT (Issue #4664) CHANGES IN CUPS V2.1b1 @@ -108,30 +111,30 @@ CHANGES IN CUPS V2.1b1 - The IPP backend now updates the cupsMandatory values when the printer configuration changes () - No longer install banner files since third-party banner filters now - supply their own (STR #4518) + supply their own (Issue #4518) - Added support for EXPECT-ALL directive in ipptool test files - (STR #4469) + (Issue #4469) - Added support for WITH-VALUE-FROM predicate in ipptool test files - (STR #4470) + (Issue #4470) - The scheduler no longer listens on the loopback interface unless the web interface or printer sharing are enabled () - - Added a PPD generator for IPP Everywhere printers (STR #4258) + - Added a PPD generator for IPP Everywhere printers (Issue #4258) - Now install "default" versions of more configuration files () - The cupstestppd program did not handle "maxsize(nnn)" entries in cupsFilter/cupsFilter2 values () - The scheduler now checks the return value of rename() calls - (STR #4589) + (Issue #4589) - The scheduler now validates ErrorPolicy values in config files - (STR #4591) - - Long cookies caused the web interface to stop working (STR #4619) + (Issue #4591) + - Long cookies caused the web interface to stop working (Issue #4619) - Added SSLOptions values to allow Diffie-Hellman key exchange and disable TLS/1.0 support. - Updated the scheduler to support more IPP Everywhere attributes - (STR #4630) + (Issue #4630) - The scheduler now supports advanced ASL and journald logging when - "syslog" output is configured (STR #4474) + "syslog" output is configured (Issue #4474) - The scheduler now supports logging to stderr when running in the - foreground (STR #4505) + foreground (Issue #4505) diff --git a/scheduler/cups-lpd.c b/scheduler/cups-lpd.c index 4748ce07b0..3a67e1ce24 100644 --- a/scheduler/cups-lpd.c +++ b/scheduler/cups-lpd.c @@ -1,9 +1,7 @@ /* - * "$Id: cups-lpd.c 12611 2015-05-06 15:30:36Z msweet $" - * * Line Printer Daemon interface for CUPS. * - * Copyright 2007-2015 by Apple Inc. + * Copyright 2007-2016 by Apple Inc. * Copyright 1997-2006 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -17,6 +15,7 @@ * Include necessary headers... */ +#define _CUPS_NO_DEPRECATED #include #include #include @@ -346,7 +345,7 @@ create_job(http_t *http, /* I - HTTP connection */ * Setup the Create-Job request... */ - request = ippNewRequest(IPP_CREATE_JOB); + request = ippNewRequest(IPP_OP_CREATE_JOB); httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, "localhost", 0, "/printers/%s", dest); @@ -361,10 +360,6 @@ create_job(http_t *http, /* I - HTTP connection */ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title); - if (docname[0]) - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name", - NULL, docname); - cupsEncodeOptions(request, num_options, options); /* @@ -375,7 +370,7 @@ create_job(http_t *http, /* I - HTTP connection */ response = cupsDoRequest(http, request, uri); - if (!response || cupsLastError() > IPP_OK_CONFLICT) + if (!response || cupsLastError() > IPP_STATUS_OK_CONFLICTING) { syslog(LOG_ERR, "Unable to create job - %s", cupsLastErrorString()); @@ -451,7 +446,7 @@ get_printer(http_t *http, /* I - HTTP connection */ if (shared) *shared = 0; if (state) - *state = IPP_PRINTER_STOPPED; + *state = IPP_PSTATE_STOPPED; if (options) *options = NULL; @@ -467,7 +462,7 @@ get_printer(http_t *http, /* I - HTTP connection */ * Setup the Get-Printer-Attributes request... */ - request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES); + request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, "localhost", 0, "/printers/%s", dest); @@ -486,7 +481,7 @@ get_printer(http_t *http, /* I - HTTP connection */ response = cupsDoRequest(http, request, "/"); - if (!response || cupsLastError() > IPP_OK_CONFLICT) + if (!response || cupsLastError() > IPP_STATUS_OK_CONFLICTING) { /* * If we can't find the printer by name, look up the printer-name @@ -506,7 +501,7 @@ get_printer(http_t *http, /* I - HTTP connection */ * Setup the CUPS-Get-Printers request... */ - request = ippNewRequest(CUPS_GET_PRINTERS); + request = ippNewRequest(IPP_OP_CUPS_GET_PRINTERS); ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", @@ -519,7 +514,7 @@ get_printer(http_t *http, /* I - HTTP connection */ response = cupsDoRequest(http, request, "/"); - if (!response || cupsLastError() > IPP_OK_CONFLICT) + if (!response || cupsLastError() > IPP_STATUS_OK_CONFLICTING) { syslog(LOG_ERR, "Unable to get list of printers - %s", cupsLastErrorString()); @@ -734,7 +729,7 @@ print_file(http_t *http, /* I - HTTP connection */ * Setup the Send-Document request... */ - request = ippNewRequest(IPP_SEND_DOCUMENT); + request = ippNewRequest(IPP_OP_SEND_DOCUMENT); snprintf(uri, sizeof(uri), "ipp://localhost/jobs/%d", id); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri); @@ -760,7 +755,7 @@ print_file(http_t *http, /* I - HTTP connection */ ippDelete(cupsDoFileRequest(http, request, uri, filename)); - if (cupsLastError() > IPP_OK_CONFLICT) + if (cupsLastError() > IPP_STATUS_OK_CONFLICTING) { syslog(LOG_ERR, "Unable to send document - %s", cupsLastErrorString()); @@ -815,7 +810,7 @@ recv_print_job( * Connect to the server... */ - http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption()); + http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL); if (!http) { syslog(LOG_ERR, "Unable to connect to server: %s", strerror(errno)); @@ -1245,8 +1240,7 @@ remove_jobs(const char *dest, /* I - Destination */ * Try connecting to the local server... */ - if ((http = httpConnectEncrypt(cupsServer(), ippPort(), - cupsEncryption())) == NULL) + if ((http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL)) == NULL) { syslog(LOG_ERR, "Unable to connect to server %s: %s", cupsServer(), strerror(errno)); @@ -1269,7 +1263,7 @@ remove_jobs(const char *dest, /* I - Destination */ list ++; /* - * Build an IPP_CANCEL_JOB request, which requires the following + * Build an IPP_OP_CANCEL_JOB request, which requires the following * attributes: * * attributes-charset @@ -1278,7 +1272,7 @@ remove_jobs(const char *dest, /* I - Destination */ * requesting-user-name */ - request = ippNewRequest(IPP_CANCEL_JOB); + request = ippNewRequest(IPP_OP_CANCEL_JOB); sprintf(uri, "ipp://localhost/jobs/%d", id); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri); @@ -1292,7 +1286,7 @@ remove_jobs(const char *dest, /* I - Destination */ ippDelete(cupsDoRequest(http, request, "/jobs")); - if (cupsLastError() > IPP_OK_CONFLICT) + if (cupsLastError() > IPP_STATUS_OK_CONFLICTING) { syslog(LOG_WARNING, "Cancel of job ID %d failed: %s\n", id, cupsLastErrorString()); @@ -1366,8 +1360,7 @@ send_state(const char *queue, /* I - Destination */ * Try connecting to the local server... */ - if ((http = httpConnectEncrypt(cupsServer(), ippPort(), - cupsEncryption())) == NULL) + if ((http = httpConnect2(cupsServer(), ippPort(), NULL, AF_UNSPEC, cupsEncryption(), 1, 30000, NULL)) == NULL) { syslog(LOG_ERR, "Unable to connect to server %s: %s", cupsServer(), strerror(errno)); @@ -1393,19 +1386,19 @@ send_state(const char *queue, /* I - Destination */ switch (state) { - case IPP_PRINTER_IDLE : + case IPP_PSTATE_IDLE : printf("%s is ready\n", dest); break; - case IPP_PRINTER_PROCESSING : + case IPP_PSTATE_PROCESSING : printf("%s is ready and printing\n", dest); break; - case IPP_PRINTER_STOPPED : + case IPP_PSTATE_STOPPED : printf("%s is not ready\n", dest); break; } /* - * Build an IPP_GET_JOBS or IPP_GET_JOB_ATTRIBUTES request, which requires + * Build an IPP_OP_GET_JOBS or IPP_OP_GET_JOB_ATTRIBUTES request, which requires * the following attributes: * * attributes-charset @@ -1415,7 +1408,7 @@ send_state(const char *queue, /* I - Destination */ id = atoi(list); - request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS); + request = ippNewRequest(id ? IPP_OP_GET_JOB_ATTRIBUTES : IPP_OP_GET_JOBS); httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, "localhost", 0, "/printers/%s", dest); @@ -1444,7 +1437,7 @@ send_state(const char *queue, /* I - Destination */ jobcount = 0; response = cupsDoRequest(http, request, "/"); - if (cupsLastError() > IPP_OK_CONFLICT) + if (cupsLastError() > IPP_STATUS_OK_CONFLICTING) { printf("get-jobs failed: %s\n", cupsLastErrorString()); ippDelete(response); @@ -1473,7 +1466,7 @@ send_state(const char *queue, /* I - Destination */ jobid = 0; jobsize = 0; - jobstate = IPP_JOB_PENDING; + jobstate = IPP_JSTATE_PENDING; jobname = "untitled"; jobuser = NULL; jobdest = NULL; @@ -1534,7 +1527,7 @@ send_state(const char *queue, /* I - Destination */ * Display the job... */ - if (jobstate == IPP_JOB_PROCESSING) + if (jobstate == IPP_JSTATE_PROCESSING) strlcpy(rankstr, "active", sizeof(rankstr)); else { @@ -1626,8 +1619,3 @@ smart_gets(char *s, /* I - Pointer to line buffer */ else return (s); } - - -/* - * End of "$Id: cups-lpd.c 12611 2015-05-06 15:30:36Z msweet $". - */