]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r8722 (tentative 1.4.0 GM)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 18 Jun 2009 22:32:02 +0000 (22:32 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 18 Jun 2009 22:32:02 +0000 (22:32 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1567 a1ca3aef-8c08-0410-bb20-df032aa958be

31 files changed:
CHANGES-1.3.txt
CHANGES.txt
backend/ipp.c
backend/lpd.c
backend/socket.c
backend/usb-darwin.c
cgi-bin/admin.c
config-scripts/cups-common.m4
cups/api-filter.shtml
cups/http-support.c
doc/help/api-filter.html
locale/cups_es.po
scheduler/client.c
scheduler/env.c
scheduler/ipp.c
scheduler/job.c
standards/lcrc-ipp20-20090602.pdf [new file with mode: 0644]
standards/lcrc-ippstate10-20090603.pdf [new file with mode: 0644]
standards/wd-ippstate10-20061107.pdf [deleted file]
templates/add-printer.tmpl
templates/de/add-printer.tmpl
templates/de/modify-printer.tmpl
templates/es/add-printer.tmpl
templates/es/modify-printer.tmpl
templates/ja/add-printer.tmpl
templates/ja/modify-printer.tmpl
templates/modify-printer.tmpl
templates/pl/add-printer.tmpl
templates/pl/modify-printer.tmpl
templates/ru/add-printer.tmpl
templates/ru/modify-printer.tmpl

index d63ec681584e225a0e16d1a52237e83bc0c22e92..9af534f9bf29d7ea2591570f20d525fce2e5f812 100644 (file)
@@ -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
index f818ec313becafbe70ec9e08d3cc4be4da0a5443..19844bb0087625dbdfe5c9954ec3b04f6f9bd5aa 100644 (file)
@@ -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
index 176df77d26b12d3b6918e5bea5ecc42050f19ac2..dac35976673525466e142a2be0f143d325ce28bb 100644 (file)
@@ -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
index b15f21581a2295961415f7c29b276ae44f59af1f..d6597cf1cbee86150d392f8fe739c7f49bd528f3 100644 (file)
@@ -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,
index f3d20b9b448336eb3dd4597999434146fe8b026b..35d35e8bf716ba0b28f07f4c25e3f4e96904804d 100644 (file)
@@ -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);
index 10b45f6b137a801b538e6ebdf1326bbf88862208..7bc37f75cb18f2aefafe4cfd4f96f036ae2e5c7f 100644 (file)
 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 (<rdar://problem/6860126>)...
+       * Retry a write after an aborted write since we probably just got
+       * SIGTERM (<rdar://problem/6860126>)...
        */
 
        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)
        {
index f0812c81ae55f2e67138a172457dae77aecb3465..ddddd76edf7cc90c1a01f338becd443bff15cad1 100644 (file)
@@ -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...
     */
index 1eebf17b236d32202328ac0ca8cbffb895b4532a..11bffc60c9c81902bf1309642f828781fe95b5b0 100644 (file)
@@ -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'`"
index 49bf24be3657c7398f83f095cc2c2b9efa4f9dd1..cbf29657d5d4ee088860a0d30ce145f25aed7aae 100644 (file)
@@ -127,7 +127,7 @@ when running print filters and backends:</p>
 
 <dl class="code">
 
-       <dt>APPLE_LANGUAGES</dt>
+       <dt>APPLE_LANGUAGE</dt>
        <dd>The Apple language identifier associated with the job
        (Mac OS X only).</dd>
 
@@ -264,7 +264,16 @@ prefix strings:</p>
        current queue. Typically this is used to indicate persistent media,
        ink, toner, and configuration conditions or errors on a printer.
        <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
-       use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
+       use vendor-prefixed ("com.acme.foo") keywords for custom states.
+
+       <blockquote><b>Note:</b>
+
+       <p>"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.</p>
+
+       </blockquote></dd>
 
        <dt>WARNING: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -276,7 +285,6 @@ prefix strings:</p>
 <p>Messages without one of these prefixes are treated as if they began with
 the "DEBUG:" prefix string.</p>
 
-
 <div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
 <caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
 <thead>
index cd78c628b67277d5bbf996e4449a22823bbe66f9..bb9096425356a009a140f2b90877adf17141a62f 100644 (file)
@@ -50,6 +50,7 @@
 #include "debug.h"
 #include "globals.h"
 #include <stdlib.h>
+#include <errno.h>
 #ifdef HAVE_DNSSD
 #  include <dns_sd.h>
 #  include <poll.h>
@@ -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);
index da8a1373d10a09382d5038274b8af5cd19707c5f..c5e89b0123fa517b4bc2b109c4178b8cb384a8aa 100644 (file)
@@ -549,7 +549,7 @@ when running print filters and backends:</p>
 
 <dl class="code">
 
-       <dt>APPLE_LANGUAGES</dt>
+       <dt>APPLE_LANGUAGE</dt>
        <dd>The Apple language identifier associated with the job
        (Mac OS X only).</dd>
 
@@ -686,7 +686,16 @@ prefix strings:</p>
        current queue. Typically this is used to indicate persistent media,
        ink, toner, and configuration conditions or errors on a printer.
        <a href='#TABLE2'>Table 2</a> lists the standard state keywords -
-       use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
+       use vendor-prefixed ("com.acme.foo") keywords for custom states.
+
+       <blockquote><b>Note:</b>
+
+       <p>"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.</p>
+
+       </blockquote></dd>
 
        <dt>WARNING: message</dt>
        <dd>Sets the printer-state-message attribute and adds the specified
@@ -698,7 +707,6 @@ prefix strings:</p>
 <p>Messages without one of these prefixes are treated as if they began with
 the "DEBUG:" prefix string.</p>
 
-
 <div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
 <caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
 <thead>
index 2fd784e7bb01c119ba9bdc16057e07a12868ea49..193af705ae43727d330397aa5b72eae0f8ee9c78 100644 (file)
@@ -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 <riopedre13@yahoo.es>\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)."
index 247ec5e967c8178bb336cee547ac80ec76c8a508..2c29e3da42a3653236dcd41f76e484ddbea37999 100644 (file)
@@ -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))
index 3eb9213a56baf3d0d393c44f014f3e872060169d..94d7c355b97e8a8b62639ad7077e435306b85786 100644 (file)
@@ -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);
index c9bd660f048cc2d928377cea9bcabbe18fa9a5e7..7ca9537de987e8a49d18acb6a0a59b0b2c76e1d4 100644 (file)
@@ -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...
index 7f3fa355fe21bbe15b84edc5ffcdfa3ea106a6ca..90e458b9d9bfda492575bdf73ccc6df5183bbd72 100644 (file)
@@ -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 (file)
index 0000000..004b1ee
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 (file)
index 0000000..cb9be4c
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 (file)
index 22ddf13..0000000
Binary files a/standards/wd-ippstate10-20061107.pdf and /dev/null differ
index bf100f0c0c13cca73d3f7e29a757ec81bf80ef4b..6346a86a8d9e0aca7c466962e44b59937e91d67d 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Sharing:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Share This Printer</TD>
 </TR>
 <TR>
index 8e31628e2ea8a9992d0230928e9cc6f2b88d01be..87dae9f04f8283edbc41c90eb7b75d3f88c24b6d 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Freigabe:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Diesen Drucker freigeben</TD>
 </TR>
 <TR>
index 61bebdeb6581b269b1818c1790afd9153e18f700..293d75001443647dffb331855f3a0cea68edbc16 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Freigabe:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Diesen Drucker freigeben</TD>
 </TR>
 <TR>
index 32fddd5040d40793ff387d2e2432bd45dbaedc54..bff616dc5624221855d7883298569457ddbbc6e8 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Compartici&oacute;n:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Compartir esta impresora</TD>
 </TR>
 <TR>
index 9936b5b3ce21afdc1708b5bebcef5cdf8e467eda..4c6ac3103f96f7abd1c1202edb17aae3dd7b5103 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Compartida:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Compartir esta impresora</TD>
 </TR>
 <TR>
index d86425fdca68743a5504a3e94717bcb510cdd673..baf93ea29b173a2a6dde897217cfb125b717d97e 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">共有:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 このプリンターを共有する</TD>
 </TR>
 <TR>
index 0f3b1b665690cf4d6e31b4897ae5acec55347399..ef3066f3d5b7dfb018421ca536795b433d069e41 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">共有:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 このプリンターを共有する</TD>
 </TR>
 <TR>
index 924d0ee57ae1f25cf62c6771b51bac6d8810ae33..c78dc20813166ecadc2ace2269ac3e859f873e74 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Sharing:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Share This Printer</TD>
 </TR>
 <TR>
index 2010a0b0aea24e5926ca1442df06a8fb6f9e9e19..a8f2f592593d0327c7f46eb5ff639cfde84ccbc7 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Współdzielenie:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Współdzielenie tej drukarki</TD>
 </TR>
 <TR>
index 08df3c694cf40b2660639742cb6ef1d516a06962..5851a0ec975ff9133b41efd030ef93a56b2f5226 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Współdzielenie:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Share This Printer</TD>
 </TR>
 <TR>
index 7fed29cd338e95715e14f6e5737b991883d133fa..ff333e9362e094d7ef1cc7764c3e4d2af62493a0 100644 (file)
@@ -29,7 +29,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Совместный доступ:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Разрешить совместный доступ к этому принтеру</TD>
 </TR>
 <TR>
index 0adc418378ae7d8b185c15dd09e8cf46f44725e2..b5f1e39c3e24e2648a44654610b04f49a3f1f201 100644 (file)
@@ -23,7 +23,7 @@
 </TR>
 <TR>
 <TH CLASS="label">Совместный доступ:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}">
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
 Разрешить совместный доступ к этому принтеру</TD>
 </TR>
 <TR>