From: msweet Date: Thu, 18 Jun 2009 22:32:02 +0000 (+0000) Subject: Merge changes from CUPS 1.4svn-r8722 (tentative 1.4.0 GM) X-Git-Tag: release-1.6.3~97 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=acb056cb175d1a003334c130e8e6bf3aa8edbff2;p=thirdparty%2Fcups.git Merge changes from CUPS 1.4svn-r8722 (tentative 1.4.0 GM) git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1567 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index d63ec68158..9af534f9bf 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -3,6 +3,12 @@ CHANGES-1.3.txt CHANGES IN CUPS V1.3.11 + - The scheduler did not prevent nested classes (STR #3211) + - The scheduler did not reprint processing jobs that were moved to + another destination (STR #3222) + - The scheduler did not reset the current job file when stopping a + printer (STR #3226) + - The scheduler did not handle POSTs to custom CGIs properly (STR #3221) - The pdftops filter did not print landscape PDF pages properly (STR #2881) - The scheduler did not handle partial header lines properly from CGI diff --git a/CHANGES.txt b/CHANGES.txt index f818ec313b..19844bb008 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,23 @@ -CHANGES.txt - 2009-06-08 +CHANGES.txt - 2009-06-18 ------------------------ +CHANGES IN CUPS V1.4.0 + + - Localization updates (STR #3223) + - Documentation updates (STR #3225) + - Fixed a HTML error in the add and modify printer web interface templates + (STR #3229) + - The scheduler did not minimize the number of printer state events that + were generated by filter STATE: messages, which could lead to poor + performance. + - The USB backend on Mac OS X did not cleanly cancel a job. + - The network backends now set the connecting-to-device printer-state- + reasons value when looking up the address and copying the print data + for consistency. + - The scheduler now supports the com.apple.print.recoverable-warning + reason on all platforms. + + CHANGES IN CUPS V1.4rc1 - The PPD compiler documentation was missing information on localization diff --git a/backend/ipp.c b/backend/ipp.c index 176df77d26..dac3597667 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -91,7 +91,7 @@ main(int argc, /* I - Number of command-line args */ int num_options; /* Number of printer options */ cups_option_t *options; /* Printer options */ const char *device_uri; /* Device URI */ - char method[255], /* Method in URI */ + char scheme[255], /* Scheme in URI */ hostname[1024], /* Hostname */ username[255], /* Username info */ resource[1024], /* Resource info (printer name) */ @@ -236,21 +236,14 @@ main(int argc, /* I - Number of command-line args */ if ((device_uri = cupsBackendDeviceURI(argv)) == NULL) return (CUPS_BACKEND_FAILED); - if (httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, - method, sizeof(method), username, sizeof(username), - hostname, sizeof(hostname), &port, - resource, sizeof(resource)) < HTTP_URI_OK) - { - _cupsLangPuts(stderr, - _("ERROR: Missing device URI on command-line and no " - "DEVICE_URI environment variable!\n")); - return (CUPS_BACKEND_STOP); - } + httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme), + username, sizeof(username), hostname, sizeof(hostname), &port, + resource, sizeof(resource)); if (!port) port = IPP_PORT; /* Default to port 631 */ - if (!strcmp(method, "https")) + if (!strcmp(scheme, "https")) cupsSetEncryption(HTTP_ENCRYPT_ALWAYS); else cupsSetEncryption(HTTP_ENCRYPT_IF_REQUESTED); @@ -421,6 +414,9 @@ main(int argc, /* I - Number of command-line args */ off_t tbytes; /* Total bytes copied */ + fputs("STATE: +connecting-to-device\n", stderr); + fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname); + if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL) { _cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), @@ -544,8 +540,7 @@ main(int argc, /* I - Number of command-line args */ do { - fprintf(stderr, "DEBUG: Connecting to %s:%d\n", - hostname, port); + fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port); _cupsLangPuts(stderr, _("INFO: Connecting to printer...\n")); if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL) @@ -661,7 +656,8 @@ main(int argc, /* I - Number of command-line args */ * might contain username:password information... */ - snprintf(uri, sizeof(uri), "%s://%s:%d%s", method, hostname, port, resource); + httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), scheme, NULL, hostname, + port, resource); /* * First validate the destination and see if the device supports multiple diff --git a/backend/lpd.c b/backend/lpd.c index b15f21581a..d6597cf1cb 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -113,7 +113,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ char *argv[]) /* I - Command-line arguments */ { const char *device_uri; /* Device URI */ - char method[255], /* Method in URI */ + char scheme[255], /* Scheme in URI */ hostname[1024], /* Hostname */ username[255], /* Username info */ resource[1024], /* Resource info (printer name) */ @@ -193,9 +193,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ if ((device_uri = cupsBackendDeviceURI(argv)) == NULL) return (CUPS_BACKEND_FAILED); - httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, - method, sizeof(method), username, sizeof(username), - hostname, sizeof(hostname), &port, + httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme), + username, sizeof(username), hostname, sizeof(hostname), &port, resource, sizeof(resource)); if (!port) @@ -430,6 +429,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ int bytes; /* Number of bytes read */ + fputs("STATE: +connecting-to-device\n", stderr); + fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname); + if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL) { _cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), @@ -695,6 +697,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ sprintf(portname, "%d", port); + fputs("STATE: +connecting-to-device\n", stderr); fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname); if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL) @@ -721,9 +724,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ * First try to reserve a port for this connection... */ - fputs("STATE: +connecting-to-device\n", stderr); - fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n", - hostname, port, printer); + fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n", hostname, + port, printer); _cupsLangPuts(stderr, _("INFO: Connecting to printer...\n")); for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist, diff --git a/backend/socket.c b/backend/socket.c index f3d20b9b44..35d35e8bf7 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -3,7 +3,7 @@ * * AppSocket backend for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -62,7 +62,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ char *argv[]) /* I - Command-line arguments */ { const char *device_uri; /* Device URI */ - char method[255], /* Method in URI */ + char scheme[255], /* Scheme in URI */ hostname[1024], /* Hostname */ username[255], /* Username info (not used) */ resource[1024], /* Resource info (not used) */ @@ -168,9 +168,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ if ((device_uri = cupsBackendDeviceURI(argv)) == NULL) return (CUPS_BACKEND_FAILED); - httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, - method, sizeof(method), username, sizeof(username), - hostname, sizeof(hostname), &port, + httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme), + username, sizeof(username), hostname, sizeof(hostname), &port, resource, sizeof(resource)); if (port == 0) @@ -261,6 +260,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ sprintf(portname, "%d", port); + fputs("STATE: +connecting-to-device\n", stderr); fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname); if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL) @@ -270,12 +270,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ return (CUPS_BACKEND_STOP); } - fprintf(stderr, "DEBUG: Connecting to %s:%d\n", - hostname, port); + fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port); _cupsLangPuts(stderr, _("INFO: Connecting to printer...\n")); - fputs("STATE: +connecting-to-device\n", stderr); - for (delay = 5;;) { if ((addr = httpAddrConnect(addrlist, &device_fd)) == NULL) @@ -345,9 +342,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ if (recoverable) { /* - * If we've shown a recoverable error make sure the printer proxies - * have a chance to see the recovered message. Not pretty but - * necessary for now... + * If we've shown a recoverable error make sure the printer proxies have a + * chance to see the recovered message. Not pretty but necessary for now... */ fputs("INFO: recovered: \n", stderr); diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index 10b45f6b13..7bc37f75cb 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -104,6 +104,14 @@ extern char **environ; +/* + * DEBUG_WRITES, if defined, causes the backend to write data to the printer in + * 512 byte increments, up to 8192 bytes, to make debugging with a USB bus + * analyzer easier. + */ + +#define DEBUG_WRITES 0 + /* * WAIT_EOF_DELAY is number of seconds we'll wait for responses from * the printer after we've finished sending all the data @@ -232,6 +240,9 @@ typedef struct globals_s int print_fd; /* File descriptor to print */ ssize_t print_bytes; /* Print bytes read */ +#if DEBUG_WRITES + ssize_t debug_bytes; /* Current bytes to read */ +#endif /* DEBUG_WRITES */ Boolean wait_eof; int drain_output; /* Drain all pending output */ @@ -318,8 +329,7 @@ print_device(const char *uri, /* I - Device URI */ { char serial[1024]; /* Serial number buffer */ OSStatus status; /* Function results */ - IOReturn iostatus, /* Current IO status */ - prev_iostatus = 0; /* Previous IO status */ + IOReturn iostatus; /* Current IO status */ pthread_t read_thread_id, /* Read thread */ sidechannel_thread_id;/* Side-channel thread */ int have_sidechannel = 0; /* Was the side-channel thread started? */ @@ -612,7 +622,16 @@ print_device(const char *uri, /* I - Device URI */ if (FD_ISSET(print_fd, &input_set)) { +#if DEBUG_WRITES + g.debug_bytes += 512; + if (g.debug_bytes > sizeof(print_buffer)) + g.debug_bytes = 512; + + g.print_bytes = read(print_fd, print_buffer, g.debug_bytes); + +#else g.print_bytes = read(print_fd, print_buffer, sizeof(print_buffer)); +#endif /* DEBUG_WRITES */ if (g.print_bytes < 0) { @@ -646,8 +665,7 @@ print_device(const char *uri, /* I - Device URI */ if (g.print_bytes) { - bytes = g.print_bytes; - + bytes = g.print_bytes; iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0); /* @@ -662,26 +680,20 @@ print_device(const char *uri, /* I - Device URI */ } /* - * Ignore the first stall error we get since we try to clear any stalls - * in the class driver... + * If we've stalled, retry the write... */ else if (iostatus == kIOUSBPipeStalled) { fputs("DEBUG: Got USB pipe stalled during write!\n", stderr); - bytes = 0; - - if (prev_iostatus != kIOUSBPipeStalled) - { - prev_iostatus = iostatus; - iostatus = 0; - } + bytes = g.print_bytes; + iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0); } /* - * Ignore the first "aborted" status we get, since we might have - * received a signal ()... + * Retry a write after an aborted write since we probably just got + * SIGTERM ()... */ else if (iostatus == kIOReturnAborted) @@ -691,16 +703,13 @@ print_device(const char *uri, /* I - Device URI */ IOReturn err = (*g.classdriver)->Abort(g.classdriver); fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n", err); - bytes = 0; +#if DEBUG_WRITES + sleep(5); +#endif /* DEBUG_WRITES */ - if (prev_iostatus != kIOReturnAborted) - { - prev_iostatus = iostatus; - iostatus = 0; - } + bytes = g.print_bytes; + iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0); } - else - prev_iostatus = iostatus; if (iostatus || bytes < 0) { diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index f0812c81ae..ddddd76edf 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -492,6 +492,12 @@ do_am_class(http_t *http, /* I - HTTP connection */ request = ippNewRequest(CUPS_GET_PRINTERS); + ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, "printer-type", + CUPS_PRINTER_LOCAL); + ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, "printer-type-mask", + CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE | + CUPS_PRINTER_IMPLICIT); + /* * Do the request and get back a response... */ diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index 1eebf17b23..11bffc60c9 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -20,7 +20,7 @@ dnl Set the name of the config header file... AC_CONFIG_HEADER(config.h) dnl Version number information... -CUPS_VERSION="1.4rc1" +CUPS_VERSION="1.4.0" CUPS_REVISION="" #if test -z "$CUPS_REVISION" -a -d .svn; then # CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml index 49bf24be36..cbf29657d5 100644 --- a/cups/api-filter.shtml +++ b/cups/api-filter.shtml @@ -127,7 +127,7 @@ when running print filters and backends:

-
APPLE_LANGUAGES
+
APPLE_LANGUAGE
The Apple language identifier associated with the job (Mac OS X only).
@@ -264,7 +264,16 @@ prefix strings:

current queue. Typically this is used to indicate persistent media, ink, toner, and configuration conditions or errors on a printer. Table 2 lists the standard state keywords - - use vendor-prefixed ("com.acme.foo") keywords for custom states. + use vendor-prefixed ("com.acme.foo") keywords for custom states. + +
Note: + +

"STATE:" messages often provide visible alerts to the user. For example, on + Mac OS X setting a printer-state-reason value with an "-error" or "-warning" + suffix will cause the printer's dock item to bounce if the corresponding reason + is localized with a cupsIPPReason keyword in the printer's PPD file.

+ +
WARNING: message
Sets the printer-state-message attribute and adds the specified @@ -276,7 +285,6 @@ prefix strings:

Messages without one of these prefixes are treated as if they began with the "DEBUG:" prefix string.

-
diff --git a/cups/http-support.c b/cups/http-support.c index cd78c628b6..bb90964253 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -50,6 +50,7 @@ #include "debug.h" #include "globals.h" #include +#include #ifdef HAVE_DNSSD # include # include @@ -1406,7 +1407,6 @@ _httpResolveURI( fputs("STATE: +connecting-to-device\n", stderr); fprintf(stderr, "DEBUG: Resolving \"%s\", regtype=\"%s\", " "domain=\"local.\"...\n", hostname, regtype); - _cupsLangPuts(stderr, _("INFO: Looking for printer...\n")); } uri = NULL; @@ -1418,36 +1418,65 @@ _httpResolveURI( hostname, regtype, "local.", resolve_callback, &uribuf) == kDNSServiceErr_NoError) { - if (strcasecmp(domain, "local.")) + int fds; /* Number of ready descriptors */ + time_t timeout, /* Poll timeout */ + start_time = time(NULL);/* Start time */ + + for (;;) { + if (logit) + _cupsLangPuts(stderr, _("INFO: Looking for printer...\n")); + /* - * Wait 2 seconds for a response to the local resolve; if nothing comes - * in, do an additional domain resolution... + * For the first minute, wakeup every 2 seconds to emit a + * "looking for printer" message... */ + timeout = (time(NULL) < (start_time + 60)) ? 2000 : -1; + polldata.fd = DNSServiceRefSockFD(ref); polldata.events = POLLIN; - if (poll(&polldata, 1, 2000) != 1) + fds = poll(&polldata, 1, timeout); + + if (fds < 0) + { + if (errno != EINTR && errno != EAGAIN) + { + DEBUG_printf(("5_httpResolveURI: poll error: %s", strerror(errno))); + break; + } + } + else if (fds == 0) { /* - * OK, send the domain name resolve... + * Wait 2 seconds for a response to the local resolve; if nothing + * comes in, do an additional domain resolution... */ - if (logit) - fprintf(stderr, "DEBUG: Resolving \"%s\", regtype=\"%s\", " - "domain=\"%s\"...\n", hostname, regtype, domain); - - domainref = ref; - if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0, - hostname, regtype, domain, resolve_callback, - &uribuf) == kDNSServiceErr_NoError) - domainsent = 1; + if (domainsent == 0 && strcasecmp(domain, "local.")) + { + if (logit) + fprintf(stderr, + "DEBUG: Resolving \"%s\", regtype=\"%s\", " + "domain=\"%s\"...\n", hostname, regtype, domain); + + domainref = ref; + if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0, + hostname, regtype, domain, resolve_callback, + &uribuf) == kDNSServiceErr_NoError) + domainsent = 1; + } } - } - - if (DNSServiceProcessResult(ref) == kDNSServiceErr_NoError) - uri = resolved_uri; + else + { + if (DNSServiceProcessResult(ref) == kDNSServiceErr_NoError) + { + uri = resolved_uri; + break; + } + } + } if (domainsent) DNSServiceRefDeallocate(domainref); diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html index da8a1373d1..c5e89b0123 100644 --- a/doc/help/api-filter.html +++ b/doc/help/api-filter.html @@ -549,7 +549,7 @@ when running print filters and backends:

-
APPLE_LANGUAGES
+
APPLE_LANGUAGE
The Apple language identifier associated with the job (Mac OS X only).
@@ -686,7 +686,16 @@ prefix strings:

current queue. Typically this is used to indicate persistent media, ink, toner, and configuration conditions or errors on a printer. Table 2 lists the standard state keywords - - use vendor-prefixed ("com.acme.foo") keywords for custom states. + use vendor-prefixed ("com.acme.foo") keywords for custom states. + +
Note: + +

"STATE:" messages often provide visible alerts to the user. For example, on + Mac OS X setting a printer-state-reason value with an "-error" or "-warning" + suffix will cause the printer's dock item to bounce if the corresponding reason + is localized with a cupsIPPReason keyword in the printer's PPD file.

+ +
WARNING: message
Sets the printer-state-message attribute and adds the specified @@ -698,7 +707,6 @@ prefix strings:

Messages without one of these prefixes are treated as if they began with the "DEBUG:" prefix string.

-
Table 1: Standard marker-types Values
diff --git a/locale/cups_es.po b/locale/cups_es.po index 2fd784e7bb..193af705ae 100644 --- a/locale/cups_es.po +++ b/locale/cups_es.po @@ -17,7 +17,7 @@ msgstr "" "Project-Id-Version: CUPS 1.4\n" "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n" "POT-Creation-Date: 2009-06-05 14:00-0700\n" -"PO-Revision-Date: 2009-05-23 13:15+0100\n" +"PO-Revision-Date: 2009-06-14 21:00+0100\n" "Last-Translator: Juan Pablo González Riopedre \n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" @@ -2574,7 +2574,7 @@ msgid "ERROR: Unable to copy PDF file" msgstr "ERROR: No se ha podido copiar el archivo PDF" msgid "ERROR: Unable to create pipe" -msgstr "" +msgstr "ERROR: No se ha podido crear el canal (pipe)" msgid "ERROR: Unable to create socket" msgstr "ERROR: No se ha podido crear socket" @@ -2599,7 +2599,7 @@ msgid "ERROR: Unable to execute pdftops program" msgstr "ERROR: No se ha podido ejecutar el programa pdftops" msgid "ERROR: Unable to execute pstops program" -msgstr "" +msgstr "ERROR: No se ha podido ejecutar el programa pstops" #, c-format msgid "ERROR: Unable to fork pictwpstops: %s\n" @@ -5523,11 +5523,12 @@ msgstr "ppdc: No se ha proporcionado catálogo de mensajes para el idioma %s.\n" #, c-format msgid "ppdc: Option %s defined in two different groups on line %d of %s!\n" msgstr "" +"ppdc: Opción %s definida en dos diferentes grupos en la línea %d de %s.\n" #, c-format msgid "ppdc: Option %s redefined with a different type on line %d of %s!\n" msgstr "" -"ppdc: La opción %s redefinida con un tipo diferente en la línea %d de %s.\n" +"ppdc: Opción %s redefinida con un tipo diferente en la línea %d de %s.\n" #, c-format msgid "ppdc: Option constraint must *name on line %d of %s!\n" @@ -5690,14 +5691,3 @@ msgstr "sin título" msgid "variable-bindings uses indefinite length" msgstr "variable-bindings usa una longitud indefinida" -#~ msgid "600 DPI Grayscale" -#~ msgstr "600 PPP escala de grises" - -#~ msgid "ERROR: pdftops filter crashed on signal %d!\n" -#~ msgstr "ERROR: filtro pdftops se ha colgado con la señal %d.\n" - -#~ msgid "ERROR: pdftops filter exited with status %d!\n" -#~ msgstr "ERROR: filtro pdftops se ha cerrado con el estado %d.\n" - -#~ msgid "Unknown printer error (%s)!" -#~ msgstr "Error de impresión desconocido (%s)." diff --git a/scheduler/client.c b/scheduler/client.c index 247ec5e967..2c29e3da42 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -3637,9 +3637,6 @@ get_file(cupsd_client_t *con, /* I - Client connection */ "%s", con, con->http.fd, filestats, filename, len, status ? "(null)" : filename); - if (!status) - con->http.data_remaining = (int)filestats->st_size; - if (status) return (NULL); else @@ -4013,7 +4010,6 @@ make_certificate(cupsd_client_t *con) /* I - Client connection */ char command[1024], /* Command */ *argv[12], /* Command-line arguments */ *envp[MAX_ENV + 1], /* Environment variables */ - home[1024], /* HOME environment variable */ infofile[1024], /* Type-in information for cert */ seedfile[1024]; /* Random number seed file */ int envc, /* Number of environment variables */ @@ -4054,8 +4050,6 @@ make_certificate(cupsd_client_t *con) /* I - Client connection */ cupsdLogMessage(CUPSD_LOG_INFO, "Seeding the random number generator..."); - snprintf(home, sizeof(home), "HOME=%s", TempDir); - /* * Write the seed file... */ @@ -4084,8 +4078,7 @@ make_certificate(cupsd_client_t *con) /* I - Client connection */ argv[5] = NULL; envc = cupsdLoadEnv(envp, MAX_ENV); - envp[envc++] = home; - envp[envc] = NULL; + envp[envc] = NULL; if (!cupsdStartProcess(command, argv, envp, -1, -1, -1, -1, -1, 1, NULL, NULL, &pid)) diff --git a/scheduler/env.c b/scheduler/env.c index 3eb9213a56..94d7c355b9 100644 --- a/scheduler/env.c +++ b/scheduler/env.c @@ -82,6 +82,7 @@ cupsdInitEnv(void) cupsdSetEnv("CUPS_SERVERROOT", ServerRoot); cupsdSetEnv("CUPS_STATEDIR", StateDir); cupsdSetEnv("DYLD_LIBRARY_PATH", NULL); + cupsdSetEnv("HOME", TempDir); cupsdSetEnv("LD_ASSUME_KERNEL", NULL); cupsdSetEnv("LD_LIBRARY_PATH", NULL); cupsdSetEnv("LD_PRELOAD", NULL); diff --git a/scheduler/ipp.c b/scheduler/ipp.c index c9bd660f04..7ca9537de9 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -1190,6 +1190,12 @@ add_class(cupsd_client_t *con, /* I - Client connection */ _("The printer or class was not found.")); return; } + else if (dtype & CUPS_PRINTER_CLASS) + { + send_ipp_status(con, IPP_BAD_REQUEST, + _("Nested classes are not allowed!")); + return; + } /* * Add it to the class... diff --git a/scheduler/job.c b/scheduler/job.c index 7f3fa355fe..90e458b9d9 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -2637,11 +2637,12 @@ finalize_job(cupsd_job_t *job) /* I - Job */ cupsdLogMessage(CUPSD_LOG_DEBUG2, "finalize_job(job=%p(%d))", job, job->id); /* - * Clear the "connecting-to-device" reason, which is only valid when a - * printer is processing... + * Clear the "connecting-to-device" and "com.apple.print.recoverable-warning" + * reasons, which are only valid when a printer is processing... */ cupsdSetPrinterReasons(job->printer, "-connecting-to-device"); + cupsdSetPrinterReasons(job->printer, "-com.apple.print.recoverable-warning"); /* * Similarly, clear the "offline-report" reason for non-USB devices since we @@ -4017,9 +4018,8 @@ update_job(cupsd_job_t *job) /* I - Job to check */ cupsdStopPrinter(job->printer, 1); return; } - else + else if (cupsdSetPrinterReasons(job->printer, message)) { - cupsdSetPrinterReasons(job->printer, message); cupsdAddPrinterHistory(job->printer); event |= CUPSD_EVENT_PRINTER_STATE; } @@ -4160,7 +4160,6 @@ update_job(cupsd_job_t *job) /* I - Job to check */ cupsFreeOptions(num_keywords, keywords); } -#ifdef __APPLE__ else if (!strncmp(message, "recoverable:", 12)) { ptr = message + 12; @@ -4169,27 +4168,32 @@ update_job(cupsd_job_t *job) /* I - Job to check */ if (*ptr) { - cupsdSetPrinterReasons(job->printer, - "+com.apple.print.recoverable-warning"); - cupsdSetString(&(job->printer->recoverable), ptr); - cupsdAddPrinterHistory(job->printer); - event |= CUPSD_EVENT_PRINTER_STATE; + if (cupsdSetPrinterReasons(job->printer, + "+com.apple.print.recoverable-warning") || + !job->printer->recoverable || + strcmp(job->printer->recoverable, ptr)) + { + cupsdSetString(&(job->printer->recoverable), ptr); + cupsdAddPrinterHistory(job->printer); + event |= CUPSD_EVENT_PRINTER_STATE; + } } } else if (!strncmp(message, "recovered:", 10)) { - cupsdSetPrinterReasons(job->printer, - "-com.apple.print.recoverable-warning"); - ptr = message + 10; while (isspace(*ptr & 255)) ptr ++; - cupsdSetString(&(job->printer->recoverable), ptr); - cupsdAddPrinterHistory(job->printer); - event |= CUPSD_EVENT_PRINTER_STATE; + if (cupsdSetPrinterReasons(job->printer, + "-com.apple.print.recoverable-warning") || + !job->printer->recoverable || strcmp(job->printer->recoverable, ptr)) + { + cupsdSetString(&(job->printer->recoverable), ptr); + cupsdAddPrinterHistory(job->printer); + event |= CUPSD_EVENT_PRINTER_STATE; + } } -#endif /* __APPLE__ */ else { cupsdLogJob(job, loglevel, "%s", message); diff --git a/standards/lcrc-ipp20-20090602.pdf b/standards/lcrc-ipp20-20090602.pdf new file mode 100644 index 0000000000..004b1eed41 Binary files /dev/null and b/standards/lcrc-ipp20-20090602.pdf differ diff --git a/standards/lcrc-ippstate10-20090603.pdf b/standards/lcrc-ippstate10-20090603.pdf new file mode 100644 index 0000000000..cb9be4ca39 Binary files /dev/null and b/standards/lcrc-ippstate10-20090603.pdf differ diff --git a/standards/wd-ippstate10-20061107.pdf b/standards/wd-ippstate10-20061107.pdf deleted file mode 100644 index 22ddf13340..0000000000 Binary files a/standards/wd-ippstate10-20061107.pdf and /dev/null differ diff --git a/templates/add-printer.tmpl b/templates/add-printer.tmpl index bf100f0c0c..6346a86a8d 100644 --- a/templates/add-printer.tmpl +++ b/templates/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/de/add-printer.tmpl b/templates/de/add-printer.tmpl index 8e31628e2e..87dae9f04f 100644 --- a/templates/de/add-printer.tmpl +++ b/templates/de/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/de/modify-printer.tmpl b/templates/de/modify-printer.tmpl index 61bebdeb65..293d750014 100644 --- a/templates/de/modify-printer.tmpl +++ b/templates/de/modify-printer.tmpl @@ -23,7 +23,7 @@ - diff --git a/templates/es/add-printer.tmpl b/templates/es/add-printer.tmpl index 32fddd5040..bff616dc56 100644 --- a/templates/es/add-printer.tmpl +++ b/templates/es/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/es/modify-printer.tmpl b/templates/es/modify-printer.tmpl index 9936b5b3ce..4c6ac3103f 100644 --- a/templates/es/modify-printer.tmpl +++ b/templates/es/modify-printer.tmpl @@ -23,7 +23,7 @@ - diff --git a/templates/ja/add-printer.tmpl b/templates/ja/add-printer.tmpl index d86425fdca..baf93ea29b 100644 --- a/templates/ja/add-printer.tmpl +++ b/templates/ja/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/ja/modify-printer.tmpl b/templates/ja/modify-printer.tmpl index 0f3b1b6656..ef3066f3d5 100644 --- a/templates/ja/modify-printer.tmpl +++ b/templates/ja/modify-printer.tmpl @@ -23,7 +23,7 @@ - diff --git a/templates/modify-printer.tmpl b/templates/modify-printer.tmpl index 924d0ee57a..c78dc20813 100644 --- a/templates/modify-printer.tmpl +++ b/templates/modify-printer.tmpl @@ -23,7 +23,7 @@ - diff --git a/templates/pl/add-printer.tmpl b/templates/pl/add-printer.tmpl index 2010a0b0ae..a8f2f59259 100644 --- a/templates/pl/add-printer.tmpl +++ b/templates/pl/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/pl/modify-printer.tmpl b/templates/pl/modify-printer.tmpl index 08df3c694c..5851a0ec97 100644 --- a/templates/pl/modify-printer.tmpl +++ b/templates/pl/modify-printer.tmpl @@ -23,7 +23,7 @@ - diff --git a/templates/ru/add-printer.tmpl b/templates/ru/add-printer.tmpl index 7fed29cd33..ff333e9362 100644 --- a/templates/ru/add-printer.tmpl +++ b/templates/ru/add-printer.tmpl @@ -29,7 +29,7 @@ - diff --git a/templates/ru/modify-printer.tmpl b/templates/ru/modify-printer.tmpl index 0adc418378..b5f1e39c3e 100644 --- a/templates/ru/modify-printer.tmpl +++ b/templates/ru/modify-printer.tmpl @@ -23,7 +23,7 @@ -
Table 1: Standard marker-types Values
Sharing: + Share This Printer
Freigabe: + Diesen Drucker freigeben
Freigabe: + Diesen Drucker freigeben
Compartición: + Compartir esta impresora
Compartida: + Compartir esta impresora
共有: + このプリンターを共有する
共有: + このプリンターを共有する
Sharing: + Share This Printer
Współdzielenie: + Współdzielenie tej drukarki
Współdzielenie: + Share This Printer
Совместный доступ: + Разрешить совместный доступ к этому принтеру
Совместный доступ: + Разрешить совместный доступ к этому принтеру