]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Load cups into easysw/current.
authorjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 22 Sep 2006 05:53:50 +0000 (05:53 +0000)
committerjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 22 Sep 2006 05:53:50 +0000 (05:53 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@216 a1ca3aef-8c08-0410-bb20-df032aa958be

68 files changed:
CHANGES.txt
backend/ipp.c
backend/snmp.c
backend/socket.c
berkeley/Dependencies
berkeley/lpc.c
berkeley/lpq.c
berkeley/lpr.c
berkeley/lprm.c
cgi-bin/Dependencies
cgi-bin/search.c
config-scripts/cups-common.m4
config-scripts/cups-defaults.m4
cups/Dependencies
cups/adminutil.c
cups/auth.c
cups/cups.h
cups/dir.c
cups/emit.c
cups/http.c
cups/i18n.h
cups/langprintf.c
cups/language.c
doc/help/ref-classes-conf.html
doc/help/ref-printers-conf.html
filter/Dependencies
filter/interpret.c
man/classes.conf.man
man/lpadmin.man
man/printers.conf.man
notifier/Dependencies
packaging/cups.list.in
pdftops/Dependencies
scheduler/Dependencies
scheduler/Makefile
scheduler/auth.c
scheduler/banners.c
scheduler/client.c
scheduler/client.h
scheduler/dirsvc.c
scheduler/ipp.c
scheduler/job.c
scheduler/job.h
scheduler/listen.c
scheduler/printers.c
scheduler/quotas.c
scheduler/testsub.c [new file with mode: 0644]
systemv/accept.c
systemv/cancel.c
systemv/cupsaddsmb.c
systemv/cupstestdsc.c
systemv/cupstestppd.c
systemv/lp.c
systemv/lpadmin.c
systemv/lpinfo.c
systemv/lpmove.c
systemv/lpoptions.c
systemv/lppasswd.c
systemv/lpstat.c
templates/de/help-header.tmpl
templates/de/printers.tmpl
templates/es/help-header.tmpl
templates/help-header.tmpl
templates/ja/help-header.tmpl
templates/pl/help-header.tmpl
templates/pl/jobs-header.tmpl
templates/sv/help-header.tmpl
tools/testosx

index 5ac921349098cd4a12807060beec7017cd54f435..de49e923b12862fb98514dbe44fd867182b5af52 100644 (file)
@@ -1,6 +1,49 @@
-CHANGES.txt - 2006-08-29
+CHANGES.txt - 2006-09-21
 ------------------------
 
+CHANGES IN CUPS V1.2.4
+
+       - The --with-printcap configure option did not work (STR
+         #1984)
+       - The character set reported by cupsLangGet() did not
+         always reflect the default character set of a given
+         locale (STR #1983)
+       - Older Lexmark and Tektronix printers did not work with
+         IPP (STR #1980)
+       - Failsafe printing did not work (PR #6328)
+       - Some web interface redirects did not work (STR #1978)
+       - The web interface change settings button could
+         introduce a "Port 0" line in cupsd.conf if there was no
+         loopback connection available (STR #1979)
+       - The web interface change settings and edit
+         configuration file buttons would truncate the
+         cupsd.conf file (STR #1976)
+       - The German web interface used the wrong printer icon
+         images (STR #1973)
+       - The "All Documents" link in the on-line help was
+         missing a trailing slash (STR #1971)
+       - The Polish web interface translation used the wrong
+         URLs for the job history (STR #1963)
+       - The "reprint job" button did not work (STR #1956)
+       - The scheduler did not always report printer or job
+         events properly (STR #1955)
+       - The scheduler always stopped the queue on error,
+         regardless of the exit code, if the error policy was
+         set to "stop-printer" (STR #1959)
+       - ppdEmitJCL() included UTF-8 characters in the JCL job
+         name, which caused problems on some printers (STR
+         #1959)
+       - Fixed a buffering problem that cause high CPU usage
+         (STR #1968)
+       - The command-line applications did not convert
+         command-line strings to UTF-8 as needed (STR #1958)
+       - cupsDirRead() incorrectly aborted when reading a
+         symbolic link that pointed to a file/directory that did
+         not exist (STR #1953)
+       - The cupsInterpretRasterPPD() function did not handle
+         custom page sizes properly.
+
+
 CHANGES IN CUPS V1.2.3
 
        - The scheduler did not send job-state or
index 73ad5f6f4e1e230e7517dfe0e2337e4be53e4a2d..a5408059ba2330a5a9d1038194f589f4ada52795 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: ipp.c 5956 2006-09-13 18:22:34Z mike $"
  *
  *   IPP backend for the Common UNIX Printing System (CUPS).
  *
@@ -855,15 +855,15 @@ main(int  argc,                           /* I - Number of command-line args */
                                    num_options, &options);
     }
 
-    if (copies_sup)
+    if (copies_sup && version > 0)
     {
      /*
       * Only send options if the destination printer supports the copies
-      * attribute.  This is a hack for the HP JetDirect implementation of
-      * IPP, which does not accept extension attributes and incorrectly
-      * reports a client-error-bad-request error instead of the
-      * successful-ok-unsupported-attributes status.  In short, at least
-      * some HP implementations of IPP are non-compliant.
+      * attribute and IPP/1.1.  This is a hack for the HP and Lexmark
+      * implementations of IPP, which do not accept extension attributes
+      * and incorrectly report a client-error-bad-request error instead of
+      * the successful-ok-unsupported-attributes status.  In short, at least
+      * some HP and Lexmark implementations of IPP are non-compliant.
       */
 
       cupsEncodeOptions(request, num_options, options);
@@ -877,7 +877,7 @@ main(int  argc,                             /* I - Number of command-line args */
    /*
     * If copies aren't supported, then we are likely dealing with an HP
     * JetDirect.  The HP IPP implementation seems to close the connection
-    * after every request (that is, it does *not* implement HTTP Keep-
+    * after every request that is, it does *not* implement HTTP Keep-
     * Alive, which is REQUIRED by HTTP/1.1...
     */
 
@@ -908,6 +908,18 @@ main(int  argc,                            /* I - Number of command-line args */
        fputs("INFO: Printer is busy; retrying print job...\n", stderr);
        sleep(10);
       }
+      else if ((ipp_status == IPP_BAD_REQUEST ||
+               ipp_status == IPP_VERSION_NOT_SUPPORTED) && version == 1)
+      {
+       /*
+       * Switch to IPP/1.0...
+       */
+
+       fputs("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n",
+             stderr);
+       version = 0;
+       httpReconnect(http);
+      }
       else
         fprintf(stderr, "ERROR: Print file was not accepted (%s)!\n",
                cupsLastErrorString());
@@ -1641,5 +1653,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: ipp.c 5956 2006-09-13 18:22:34Z mike $".
  */
index 4a90f2ebc09db5d6457cbde811e9f99473a61068..c1af7cefcc4a5cdef700dc4d3c5a0e6580ca60f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: snmp.c 5898 2006-08-28 18:54:10Z mike $"
+ * "$Id: snmp.c 5976 2006-09-20 22:46:15Z mike $"
  *
  *   SNMP discovery backend for the Common UNIX Printing System (CUPS).
  *
@@ -1728,12 +1728,14 @@ probe_device(snmp_cache_t *device)      /* I - Device */
   debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
 
   if (device->make_and_model &&
-      (!strncasecmp(device->make_and_model, "Xerox", 5) ||
-       !strncasecmp(device->make_and_model, "Kyocera", 7)))
+      (!strncasecmp(device->make_and_model, "Kyocera", 7) ||
+       !strncasecmp(device->make_and_model, "Lexmark", 7) ||
+       !strncasecmp(device->make_and_model, "Tektronix", 9) ||
+       !strncasecmp(device->make_and_model, "Xerox", 5)))
   {
    /*
-    * Xerox and Kyocera printers often lock up on IPP probes, so exclude
-    * them from the IPP connection test...
+    * Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
+    * IPP probes, so exclude them from the IPP connection test...
     */
 
     http = NULL;
@@ -2452,5 +2454,5 @@ update_cache(snmp_cache_t *device,        /* I - Device */
 
 
 /*
- * End of "$Id: snmp.c 5898 2006-08-28 18:54:10Z mike $".
+ * End of "$Id: snmp.c 5976 2006-09-20 22:46:15Z mike $".
  */
index 266fe7781498dc842488e1c7dac5939ddad07c56..265e142e34044dfa139e5f6b86cf6d4020989d67 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: socket.c 5591 2006-05-26 19:51:59Z mike $"
+ * "$Id: socket.c 5948 2006-09-12 13:58:39Z mike $"
  *
  *   AppSocket backend for the Common UNIX Printing System (CUPS).
  *
@@ -340,11 +340,7 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
       FD_ZERO(&input);
       FD_SET(device_fd, &input);
 
-#ifdef __hpux
-      if (select(device_fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
-#else
       if (select(device_fd + 1, &input, NULL, NULL, &timeout) > 0)
-#endif /* __hpux */
       {
        /*
        * Grab the data coming back and spit it out to stderr...
@@ -387,5 +383,5 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: socket.c 5591 2006-05-26 19:51:59Z mike $".
+ * End of "$Id: socket.c 5948 2006-09-12 13:58:39Z mike $".
  */
index d8db9344af24c7627e0160c6dad1dd0e38a2f2e0..767d33e1c4b8af7ca7165ccbabd92463af23ed04 100644 (file)
@@ -2,13 +2,15 @@
 
 lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 lpc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lpc.o: ../cups/i18n.h ../cups/debug.h ../cups/string.h ../config.h
+lpc.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h ../cups/string.h
+lpc.o: ../config.h
 lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
 lpq.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
+lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lpq.o: ../cups/debug.h
 lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
 lpr.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
+lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
 lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 lprm.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lprm.o: ../cups/i18n.h ../cups/string.h ../config.h
+lprm.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
index c00a23a7a5501cde2f138bb071d768154029cd3d..96aca4b00fd51d0c2180fea74b48616477023f4c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpc.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpc.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpc" command for the Common UNIX Printing System (CUPS).
  *
@@ -65,7 +65,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
                *params;                /* Pointer to parameters */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Connect to the scheduler...
@@ -520,5 +520,5 @@ show_status(http_t     *http,               /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpc.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpc.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 78387fd5ddfdacd3f159d52d1dc7e267c654907f..1feacaaf4364c70c22b6ef7de4ff484f2c25166f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpq.c 5838 2006-08-17 14:41:42Z mike $"
+ * "$Id: lpq.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpq" command for the Common UNIX Printing System (CUPS).
  *
@@ -78,7 +78,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   cups_dest_t  *dests;                 /* Destinations */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Check for command-line options...
@@ -676,5 +676,5 @@ usage(void)
 
 
 /*
- * End of "$Id: lpq.c 5838 2006-08-17 14:41:42Z mike $".
+ * End of "$Id: lpq.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 90b73bf4dff6bee32cc9c462bca3b61c52d0f807..1597aef2fcc880ae30876726d2de06a0a8b7404a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpr.c 5838 2006-08-17 14:41:42Z mike $"
+ * "$Id: lpr.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpr" command for the Common UNIX Printing System (CUPS).
  *
@@ -93,7 +93,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
   deletefile  = 0;
   printer     = NULL;
@@ -529,5 +529,5 @@ sighandler(int s)                   /* I - Signal number */
 
 
 /*
- * End of "$Id: lpr.c 5838 2006-08-17 14:41:42Z mike $".
+ * End of "$Id: lpr.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 574f2650746f815559f87725ca342e1dfc0ac179..0551dbbd45a27c9acf05438214235eac2321140b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lprm.c 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: lprm.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lprm" command for the Common UNIX Printing System (CUPS).
  *
@@ -61,7 +61,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   http_encryption_t encryption;        /* Encryption? */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Setup to cancel individual print jobs...
@@ -294,5 +294,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: lprm.c 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: lprm.c 5926 2006-09-05 20:45:47Z mike $".
  */
index a1e09d3988f9496b09b017c8722955a3480b78ef..7e976859d166872c8eaf3ff9e0100f7a38c797df 100644 (file)
@@ -3,47 +3,49 @@
 help-index.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 help-index.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 help-index.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-help-index.o: ../cups/i18n.h ../cups/string.h ../config.h ../cups/dir.h
+help-index.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+help-index.o: ../cups/dir.h
 html.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 html.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 html.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-html.o: ../cups/i18n.h ../cups/string.h ../config.h
+html.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 ipp-var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 ipp-var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 ipp-var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-ipp-var.o: ../cups/i18n.h ../cups/string.h ../config.h
+ipp-var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 search.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 search.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 search.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-search.o: ../cups/i18n.h ../cups/string.h ../config.h
+search.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 template.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 template.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 template.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-template.o: ../cups/i18n.h ../cups/string.h ../config.h
+template.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-var.o: ../cups/i18n.h ../cups/string.h ../config.h
+var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 admin.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 admin.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 admin.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-admin.o: ../cups/i18n.h ../cups/string.h ../config.h ../cups/file.h
+admin.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+admin.o: ../cups/adminutil.h ../cups/cups.h ../cups/file.h
 classes.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 classes.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 classes.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-classes.o: ../cups/i18n.h ../cups/string.h ../config.h
+classes.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 help.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 help.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 help.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-help.o: ../cups/i18n.h ../cups/string.h ../config.h
+help.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 jobs.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 jobs.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 jobs.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-jobs.o: ../cups/i18n.h ../cups/string.h ../config.h
+jobs.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 printers.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 printers.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 printers.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-printers.o: ../cups/i18n.h ../cups/string.h ../config.h
+printers.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 testcgi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 testcgi.o: ../cups/array.h help-index.h
index 4f1ea072af139236f66d2eecb8d88e015358bc62..205a40cff9b9e2cea83de9959d900011f4ae77b6 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: search.c 4859 2005-11-30 23:45:24Z mike $"
+ * "$Id: search.c 5963 2006-09-17 19:01:47Z mike $"
  *
  *   Search routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -225,6 +225,8 @@ cgiCompileSearch(const char *query) /* I - Query string */
        *sptr++ = *qptr++;
       }
 
+      *sptr = '\0';
+
      /*
       * For "word1 AND word2", add reciprocal "word2 AND word1"...
       */
@@ -364,5 +366,5 @@ cgiFreeSearch(void *search)         /* I - Search context */
 
 
 /*
- * End of "$Id: search.c 4859 2005-11-30 23:45:24Z mike $".
+ * End of "$Id: search.c 5963 2006-09-17 19:01:47Z mike $".
  */
index d8c4d01f2a5da1617f0439722f79bc84d9ac56e0..5674a8d3aa03f30b18c8a2146bcf08d83def2912 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-common.m4 5843 2006-08-17 18:49:31Z mike $"
+dnl "$Id: cups-common.m4 5930 2006-09-07 19:49:34Z mike $"
 dnl
 dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -29,7 +29,7 @@ dnl Set the name of the config header file...
 AC_CONFIG_HEADER(config.h)
 
 dnl Versio number information...
-CUPS_VERSION="1.2.3"
+CUPS_VERSION="1.2.4"
 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'`"
@@ -265,5 +265,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 dnl
-dnl End of "$Id: cups-common.m4 5843 2006-08-17 18:49:31Z mike $".
+dnl End of "$Id: cups-common.m4 5930 2006-09-07 19:49:34Z mike $".
 dnl
index a46cf383543036c149d8e070f1dd7e9e7383bd89..15d75de1e03026c8523a23b7d712212cf066dd60 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-defaults.m4 5804 2006-08-04 16:51:58Z mike $"
+dnl "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $"
 dnl
 dnl   Default cupsd configuration settings for the Common UNIX Printing System
 dnl   (CUPS).
@@ -225,7 +225,7 @@ AC_ARG_WITH(printcap, [  --with-printcap         set default printcap file],
        default_printcap="$withval",
        default_printcap="default")
 
-if test x$enable_printcap != xno -a x$default_printcap != xno; then
+if test x$default_printcap != xno; then
        if test "x$default_printcap" = "xdefault"; then
                case $uname in
                        Darwin*)
@@ -242,6 +242,8 @@ if test x$enable_printcap != xno -a x$default_printcap != xno; then
                                CUPS_DEFAULT_PRINTCAP="/etc/printcap"
                                ;;
                esac
+       else
+               CUPS_DEFAULT_PRINTCAP="$default_printcap"
        fi
 else
        CUPS_DEFAULT_PRINTCAP=""
@@ -250,5 +252,5 @@ fi
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
 
 dnl
-dnl End of "$Id: cups-defaults.m4 5804 2006-08-04 16:51:58Z mike $".
+dnl End of "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $".
 dnl
index fda8a6ae8efc10fc82008310bb5e198da335c9c5..cedd9bdedba50274f3acd7bdf80885d60d4f3d1e 100644 (file)
@@ -82,7 +82,7 @@ transcode.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
 transcode.o: i18n.h transcode.h debug.h
 usersys.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 usersys.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
-usersys.o: transcode.h
+usersys.o: transcode.h debug.h
 util.o: globals.h string.h ../config.h http-private.h http.h md5.h
 util.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.o: transcode.h debug.h
@@ -180,7 +180,7 @@ transcode.32.o: transcode.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
 transcode.32.o: transcode.c  i18n.h transcode.h debug.h
 usersys.32.o: usersys.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 usersys.32.o: usersys.c  globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
-usersys.32.o: usersys.c  transcode.h
+usersys.32.o: usersys.c  transcode.h debug.h
 util.32.o: util.c  globals.h string.h ../config.h http-private.h http.h md5.h
 util.32.o: util.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.32.o: util.c  transcode.h debug.h
@@ -278,7 +278,7 @@ transcode.64.o: transcode.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
 transcode.64.o: transcode.c  i18n.h transcode.h debug.h
 usersys.64.o: usersys.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 usersys.64.o: usersys.c  globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
-usersys.64.o: usersys.c  transcode.h
+usersys.64.o: usersys.c  transcode.h debug.h
 util.64.o: util.c  globals.h string.h ../config.h http-private.h http.h md5.h
 util.64.o: util.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.64.o: util.c  transcode.h debug.h
index 710780029b99a7c9b5e404510f369a840dc0949b..edef4f909f09295f550ee303f089feddf8e069d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: adminutil.c 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: adminutil.c 5970 2006-09-19 20:11:08Z mike $"
  *
  *   Administration utility API definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -953,6 +953,8 @@ _cupsAdminSetServerSettings(
 {
   int          i;                      /* Looping var */
   http_status_t status;                        /* GET/PUT status */
+  const char   *server_port_env;       /* SERVER_PORT env var */
+  int          server_port;            /* IPP port for server */
   cups_file_t  *cupsd;                 /* cupsd.conf file */
   char         cupsdconf[1024];        /* cupsd.conf filename */
   int          remote;                 /* Remote cupsd.conf file? */
@@ -1086,6 +1088,17 @@ _cupsAdminSetServerSettings(
   wrote_root_location  = 0;
   indent               = 0;
 
+  if ((server_port_env = getenv("SERVER_PORT")) != NULL)
+  {
+    if ((server_port = atoi(server_port_env)) <= 0)
+      server_port = ippPort();
+  }
+  else
+    server_port = ippPort();
+
+  if (server_port <= 0)
+    server_port = IPP_PORT;
+
   while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
   {
     if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
@@ -1097,20 +1110,24 @@ _cupsAdminSetServerSettings(
        if (share_printers || remote_admin)
        {
          cupsFilePuts(temp, "# Allow remote access\n");
-         cupsFilePrintf(temp, "Port %d\n", ippPort());
+         cupsFilePrintf(temp, "Port %d\n", server_port);
        }
        else
        {
          cupsFilePuts(temp, "# Only listen for connections from the local "
                             "machine.\n");
-         cupsFilePrintf(temp, "Listen localhost:%d\n", ippPort());
+         cupsFilePrintf(temp, "Listen localhost:%d\n", server_port);
        }
 
 #ifdef CUPS_DEFAULT_DOMAINSOCKET
-        if (!access(CUPS_DEFAULT_DOMAINSOCKET, 0))
+        if ((!value || strcmp(CUPS_DEFAULT_DOMAINSOCKET, value)) &&
+           !access(CUPS_DEFAULT_DOMAINSOCKET, 0))
           cupsFilePuts(temp, "Listen " CUPS_DEFAULT_DOMAINSOCKET "\n");
 #endif /* CUPS_DEFAULT_DOMAINSOCKET */
       }
+      else if (value && value[0] == '/' &&
+               strcmp(CUPS_DEFAULT_DOMAINSOCKET, value))
+        cupsFilePrintf(temp, "Listen %s\n", value);
     }
     else if (!strcasecmp(line, "Browsing") ||
              !strcasecmp(line, "BrowseAddress") ||
@@ -1948,5 +1965,5 @@ write_option(cups_file_t     *dstfp,      /* I - PPD file */
 
 
 /*
- * End of "$Id: adminutil.c 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: adminutil.c 5970 2006-09-19 20:11:08Z mike $".
  */
index 8f515f8e0cd30cd9753a42565e4f147db52bfeef..4c7318ce7d500521e2d5236d856091cfc588e689 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.c 5559 2006-05-21 13:59:42Z mike $"
+ * "$Id: auth.c 5961 2006-09-16 19:08:36Z mike $"
  *
  *   Authentication functions for the Common UNIX Printing System (CUPS).
  *
@@ -81,6 +81,8 @@ cupsDoAuthentication(http_t     *http,        /* I - HTTP connection to server */
                 http, method, resource));
   DEBUG_printf(("cupsDoAuthentication: digest_tries=%d, userpass=\"%s\"\n",
                 http->digest_tries, http->userpass));
+  DEBUG_printf(("cupsDoAuthentication: WWW-Authenticate=\"%s\"\n",
+                httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)));
 
  /*
   * Clear the current authentication string...
@@ -249,5 +251,5 @@ cups_local_auth(http_t *http)               /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: auth.c 5559 2006-05-21 13:59:42Z mike $".
+ * End of "$Id: auth.c 5961 2006-09-16 19:08:36Z mike $".
  */
index c74e522092e6b45d351b10382f034910c1ef9c84..ec4f21b96c5d40f9f9c2fad146ea1c948362a8f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups.h 5805 2006-08-04 16:52:31Z mike $"
+ * "$Id: cups.h 5930 2006-09-07 19:49:34Z mike $"
  *
  *   API definitions for the Common UNIX Printing System (CUPS).
  *
@@ -61,10 +61,10 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION         1.0203
+#  define CUPS_VERSION         1.0204
 #  define CUPS_VERSION_MAJOR   1
 #  define CUPS_VERSION_MINOR   2
-#  define CUPS_VERSION_PATCH   3
+#  define CUPS_VERSION_PATCH   4
 #  define CUPS_DATE_ANY                -1
 
 
@@ -244,5 +244,5 @@ extern cups_file_t  *cupsTempFile2(char *filename, int len);
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 5805 2006-08-04 16:52:31Z mike $".
+ * End of "$Id: cups.h 5930 2006-09-07 19:49:34Z mike $".
  */
index e06edea91ccc34c20a6874c579b446fab0960ada..1b6bc4369fb70e349c76ea6710f3ad95f59ed71d 100644 (file)
@@ -366,7 +366,7 @@ cupsDirRead(cups_dir_t *dp)         /* I - Directory */
   * Try reading an entry that is not "." or ".."...
   */
 
-  do
+  for (;;)
   {
     if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
     {
@@ -381,28 +381,31 @@ cupsDirRead(cups_dir_t *dp)               /* I - Directory */
     }
 
     DEBUG_printf(("    readdir_r() returned \"%s\"...\n", entry->d_name));
-  }
-  while (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."));
 
- /*
-  * Copy the name over and get the file information...
-  */
+    if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
+      continue;
 
-  strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
+   /*
+    * Copy the name over and get the file information...
+    */
 
-  snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
-  if (stat(filename, &(dp->entry.fileinfo)))
-  {
-    DEBUG_printf(("    stat() failed for \"%s\" - %s...\n", filename,
-                  strerror(errno)));
-    return (NULL);
-  }
+    strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
 
- /*
-  * Return the entry...
-  */
+    snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
 
-  return (&(dp->entry));
+    if (stat(filename, &(dp->entry.fileinfo)))
+    {
+      DEBUG_printf(("    stat() failed for \"%s\" - %s...\n", filename,
+                    strerror(errno)));
+      continue;
+    }
+
+   /*
+    * Return the entry...
+    */
+
+    return (&(dp->entry));
+  }
 }
 
 
index dd650c61db2b1ff3590745eb60c35b8349b5d581..c62cbf6ab924fc1c50230e3a8364f5eed4ef56f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: emit.c 5700 2006-06-26 19:20:39Z mike $"
+ * "$Id: emit.c 5934 2006-09-11 14:54:40Z mike $"
  *
  *   PPD code emission routines for the Common UNIX Printing System (CUPS).
  *
@@ -391,8 +391,8 @@ ppdEmitJCL(ppd_file_t *ppd,         /* I - PPD file record */
       title = ptr + 1;
 
    /*
-    * Replace double quotes with single quotes so that the title
-    * does not cause a PJL syntax error.
+    * Replace double quotes with single quotes and 8-bit characters with
+    * question marks so that the title does not cause a PJL syntax error.
     */
 
     strlcpy(temp, title, sizeof(temp));
@@ -400,6 +400,8 @@ ppdEmitJCL(ppd_file_t *ppd,         /* I - PPD file record */
     for (ptr = temp; *ptr; ptr ++)
       if (*ptr == '\"')
         *ptr = '\'';
+      else if (*ptr & 128)
+        *ptr = '?';
 
    /*
     * Send PJL JOB and PJL RDYMSG commands before we enter PostScript mode...
@@ -940,5 +942,5 @@ ppd_sort(ppd_choice_t **c1, /* I - First choice */
 
 
 /*
- * End of "$Id: emit.c 5700 2006-06-26 19:20:39Z mike $".
+ * End of "$Id: emit.c 5934 2006-09-11 14:54:40Z mike $".
  */
index 504be39cfeff245e80d194413c48a7cd4bb50af9..169aece66da39d11ebe998eda610e74c38ee20e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: http.c 5961 2006-09-16 19:08:36Z mike $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
@@ -222,7 +222,10 @@ httpClearFields(http_t *http)              /* I - HTTP connection */
   if (http)
   {
     memset(http->fields, 0, sizeof(http->fields));
-    httpSetField(http, HTTP_FIELD_HOST, http->hostname);
+    if (http->hostname[0] == '/')
+      httpSetField(http, HTTP_FIELD_HOST, "localhost");
+    else
+      httpSetField(http, HTTP_FIELD_HOST, http->hostname);
 
     http->expect = (http_status_t)0;
   }
@@ -1893,7 +1896,7 @@ httpWrite2(http_t     *http,              /* I - HTTP connection */
       httpFlushWrite(http);
     }
 
-    if ((length + http->wused) < sizeof(http->wbuffer))
+    if ((length + http->wused) <= sizeof(http->wbuffer))
     {
      /*
       * Write to buffer...
@@ -2826,5 +2829,5 @@ http_write_ssl(http_t     *http,  /* I - HTTP connection */
 
 
 /*
- * End of "$Id: http.c 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: http.c 5961 2006-09-16 19:08:36Z mike $".
  */
index 14a5c1dd54097aac437e92391bb379d58b0b1efb..720ff0cd5d950aba460f40a462ca6e7a1a054766 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: i18n.h 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: i18n.h 5926 2006-09-05 20:45:47Z mike $"
  *
  *   (Private) localization support for the Common UNIX Printing System (CUPS).
  *
@@ -105,7 +105,7 @@ extern const char   *_cupsLangString(cups_lang_t *lang, const char *message);
 extern void            _cupsMessageFree(cups_array_t *a);
 extern cups_array_t    *_cupsMessageLoad(const char *filename);
 extern const char      *_cupsMessageLookup(cups_array_t *a, const char *m);
-extern void            _cupsSetLocale(void);
+extern void            _cupsSetLocale(char *argv[]);
 
 #  ifdef __cplusplus
 }
@@ -114,5 +114,5 @@ extern void         _cupsSetLocale(void);
 #endif /* !_CUPS_I18N_H_ */
 
 /*
- * End of "$Id: i18n.h 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: i18n.h 5926 2006-09-05 20:45:47Z mike $".
  */
index 909692347331db72c102b8e59befda71219f5a0a..da835dc284954b764602bb9b892e100089861290 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: langprintf.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: langprintf.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   Localized printf/puts functions for the Common UNIX Printing
  *   System (CUPS).
@@ -28,7 +28,7 @@
  *
  *   _cupsLangPrintf() - Print a formatted message string to a file.
  *   _cupsLangPuts()   - Print a static message string to a file.
- *   _cupsSetLocale()  - Set the current locale.
+ *   _cupsSetLocale()  - Set the current locale and transcode the command-line.
  */
 
 /*
@@ -140,15 +140,18 @@ _cupsLangPuts(FILE        *fp,            /* I - File to write to */
 
 
 /*
- * '_cupsSetLocale()' - Set the current locale.
+ * '_cupsSetLocale()' - Set the current locale and transcode the command-line.
  */
 
 void
-_cupsSetLocale(void)
+_cupsSetLocale(char *argv[])           /* IO - Command-line arguments */
 {
+  int          i;                      /* Looping var */
+  char         buffer[8192];           /* Command-line argument buffer */
+  _cups_globals_t *cg;                 /* Global data */
 #ifdef LC_TIME
-    const char *lc_time;               /* Current LC_TIME value */
-    char       new_lc_time[255],       /* New LC_TIME value */
+  const char   *lc_time;               /* Current LC_TIME value */
+  char         new_lc_time[255],       /* New LC_TIME value */
                *charset;               /* Pointer to character set */
 #endif /* LC_TIME */
 
@@ -181,9 +184,45 @@ _cupsSetLocale(void)
 
   setlocale(LC_TIME, new_lc_time);
 #endif /* LC_TIME */
+
+ /*
+  * Initialize the default language info...
+  */
+
+  cg = _cupsGlobals();
+
+  if (!cg->lang_default)
+    cg->lang_default = cupsLangDefault();
+
+ /*
+  * Transcode the command-line arguments from the locale charset to
+  * UTF-8...
+  */
+
+  if (cg->lang_default->encoding != CUPS_US_ASCII &&
+      cg->lang_default->encoding != CUPS_UTF8)
+  {
+    for (i = 1; argv[i]; i ++)
+    {
+     /*
+      * Try converting from the locale charset to UTF-8...
+      */
+
+      if (cupsCharsetToUTF8((cups_utf8_t *)buffer, argv[i], sizeof(buffer),
+                            cg->lang_default->encoding) < 0)
+        continue;
+
+     /*
+      * Save the new string if it differs from the original...
+      */
+
+      if (strcmp(buffer, argv[i]))
+        argv[i] = strdup(buffer);
+    }
+  }
 }
 
 
 /*
- * End of "$Id: langprintf.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: langprintf.c 5926 2006-09-05 20:45:47Z mike $".
  */
index d46c9fea9028925bddd8f0f8e6569d2d058cc874..35b1944b44bc9ae58b63649b9e61f93b46580869 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: language.c 5769 2006-07-20 17:17:14Z mike $"
+ * "$Id: language.c 5980 2006-09-21 19:01:55Z mike $"
  *
  *   I18N/language support for the Common UNIX Printing System (CUPS).
  *
@@ -406,14 +406,6 @@ cupsLangGet(const char *language)  /* I - Language or locale */
 
         *ptr = '\0';
       }
-      else
-      {
-       /*
-        * Default to UTF-8...
-       */
-
-        strcpy(charset, "UTF8");
-      }
 
      /*
       * Get the locale for messages from the LC_MESSAGES locale setting...
@@ -473,6 +465,13 @@ cupsLangGet(const char *language)  /* I - Language or locale */
   }
 #endif /* CODESET */
 
+ /*
+  * If we don't have a character set by now, default to UTF-8...
+  */
+
+  if (!charset[0])
+    strcpy(charset, "UTF8");
+
  /*
   * Parse the language string passed in to a locale string. "C" is the
   * standard POSIX locale and is copied unchanged.  Otherwise the
@@ -1314,5 +1313,5 @@ cups_unquote(char       *d,               /* O - Unquoted string */
 
 
 /*
- * End of "$Id: language.c 5769 2006-07-20 17:17:14Z mike $".
+ * End of "$Id: language.c 5980 2006-09-21 19:01:55Z mike $".
  */
index 082c8ba689d12e68d9484b326cacad09e9f19e4a..d638b4625c6331ea0f5027cc069158b8de073578 100644 (file)
@@ -162,7 +162,7 @@ HREF="#AllowUser"><CODE>AllowUser</CODE></A></P>
 <PRE CLASS="command">
 &lt;Class name&gt;
   ...
-  ErrorPolicy cancel-job
+  ErrorPolicy abort-job
 &lt;/Class&gt;
 </PRE>
 
@@ -181,7 +181,7 @@ error policy:</P>
 
 <UL>
 
-       <LI><CODE>cancel-job</CODE> - Cancel the job and proceed
+       <LI><CODE>abort-job</CODE> - Abort the job and proceed
        with the next job in the queue</LI>
 
        <LI><CODE>retry-job</CODE> - Retry the job after waiting
index 1cb72a2f0fbb2c36b7aa00492188be16287a261c..c8a459f8b4ae8ed171030ce0b9df98f8f9b8f77b 100644 (file)
@@ -169,7 +169,7 @@ section.</P>
 <PRE CLASS="command">
 &lt;Printer name&gt;
   ...
-  ErrorPolicy cancel-job
+  ErrorPolicy abort-job
 &lt;/Printer&gt;
 </PRE>
 
@@ -188,7 +188,7 @@ error policy:</P>
 
 <UL>
 
-       <LI><CODE>cancel-job</CODE> - Cancel the job and proceed
+       <LI><CODE>abort-job</CODE> - Abort the job and proceed
        with the next job in the queue</LI>
 
        <LI><CODE>retry-job</CODE> - Retry the job after waiting
index 5a2cd2313980ceb7e6bee6dba70ffaf7bbc1b62a..fa2b859a35e460984fab7b0ec7cf0d90c7d4a1a3 100644 (file)
@@ -90,7 +90,7 @@ interpret.o: ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h
 interpret.o: ../cups/array.h ../cups/file.h ../cups/language.h
 raster.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 raster.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.o: ../cups/string.h ../config.h
+raster.o: ../cups/debug.h ../cups/string.h ../config.h
 form-main.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 form-main.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 form-main.o: ../cups/language.h ../cups/language.h ../cups/string.h
@@ -118,9 +118,9 @@ pstops.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 pstops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 pstops.o: ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
 pstops.o: ../cups/array.h
-raster.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-raster.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.o: ../cups/string.h ../config.h
+rasterbench.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.o: ../cups/language.h
 rastertoepson.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 rastertoepson.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
 rastertoepson.o: ../cups/language.h ../cups/ppd.h ../cups/string.h
@@ -237,7 +237,7 @@ interpret.32.o: interpret.c  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/
 interpret.32.o: interpret.c  ../cups/array.h ../cups/file.h ../cups/language.h
 raster.32.o: raster.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 raster.32.o: raster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.32.o: raster.c  ../cups/string.h ../config.h
+raster.32.o: raster.c  ../cups/debug.h ../cups/string.h ../config.h
 form-main.32.o: form-main.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 form-main.32.o: form-main.c  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 form-main.32.o: form-main.c  ../cups/language.h ../cups/language.h ../cups/string.h
@@ -265,9 +265,9 @@ pstops.32.o: pstops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../c
 pstops.32.o: pstops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 pstops.32.o: pstops.c  ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
 pstops.32.o: pstops.c  ../cups/array.h
-raster.32.o: raster.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-raster.32.o: raster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.32.o: raster.c  ../cups/string.h ../config.h
+rasterbench.32.o: rasterbench.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.32.o: rasterbench.c  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.32.o: rasterbench.c  ../cups/language.h
 rastertoepson.32.o: rastertoepson.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 rastertoepson.32.o: rastertoepson.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
 rastertoepson.32.o: rastertoepson.c  ../cups/language.h ../cups/ppd.h ../cups/string.h
@@ -384,7 +384,7 @@ interpret.64.o: interpret.c  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/
 interpret.64.o: interpret.c  ../cups/array.h ../cups/file.h ../cups/language.h
 raster.64.o: raster.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 raster.64.o: raster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.64.o: raster.c  ../cups/string.h ../config.h
+raster.64.o: raster.c  ../cups/debug.h ../cups/string.h ../config.h
 form-main.64.o: form-main.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
 form-main.64.o: form-main.c  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 form-main.64.o: form-main.c  ../cups/language.h ../cups/language.h ../cups/string.h
@@ -412,9 +412,9 @@ pstops.64.o: pstops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../c
 pstops.64.o: pstops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 pstops.64.o: pstops.c  ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
 pstops.64.o: pstops.c  ../cups/array.h
-raster.64.o: raster.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-raster.64.o: raster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-raster.64.o: raster.c  ../cups/string.h ../config.h
+rasterbench.64.o: rasterbench.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.64.o: rasterbench.c  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.64.o: rasterbench.c  ../cups/language.h
 rastertoepson.64.o: rastertoepson.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 rastertoepson.64.o: rastertoepson.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
 rastertoepson.64.o: rastertoepson.c  ../cups/language.h ../cups/ppd.h ../cups/string.h
index 3e7b47be16a1cc3725db38afc97ff355dd3d1724..50190b4f1a5a0a27226fa035841ef08662f08ba5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: interpret.c 5513 2006-05-11 18:07:25Z mike $"
+ * "$Id: interpret.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   PPD command interpreter for the Common UNIX Printing System (CUPS).
  *
@@ -200,6 +200,9 @@ cupsRasterInterpretPPD(
     top    = size->top;
 
     strlcpy(h->cupsPageSizeName, size->name, sizeof(h->cupsPageSizeName));
+
+    h->cupsPageSize[0] = size->width;
+    h->cupsPageSize[1] = size->length;
   }
   else
   {
@@ -608,5 +611,5 @@ exec_code(
 
 
 /*
- * End of "$Id: interpret.c 5513 2006-05-11 18:07:25Z mike $".
+ * End of "$Id: interpret.c 5926 2006-09-05 20:45:47Z mike $".
  */
index eb38be57c014197d0c7ff207b14598cecda11980..4df347aded5dae5d15a023e9a33ea1497a317770 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $"
+.\" "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $"
 .\"
 .\"   classes.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -56,7 +56,7 @@ DenyUser [ user @group ... ]
 .br
 Prevents specific users and groups from printing to the printer.
 .TP 5
-ErrorPolicy cancel-job
+ErrorPolicy abort-job
 .TP 5
 ErrorPolicy retry-job
 .TP 5
@@ -123,5 +123,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $".
+.\" End of "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $".
 .\"
index 6bb24c3b3a76da9b8442446486cd0b2925a8d63b..82677fcb684a13e3d7422824ad0324157ac9c0e7 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpadmin.man 5736 2006-07-13 19:59:36Z mike $"
+.\" "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $"
 .\"
 .\"   lpadmin man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -127,7 +127,7 @@ Sets the binary communications program to use when printing,
 .br
 Sets the error policy to be used when the printer backend is 
 unable to send the job to the printer. The name must be one of 
-"cancel-job", "retry-job" or "stop-printer". The default error 
+"abort-job", "retry-job" or "stop-printer". The default error 
 policy is "stop-printer".
 .TP 5
 -o printer-is-shared=true/false
@@ -205,5 +205,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpadmin.man 5736 2006-07-13 19:59:36Z mike $".
+.\" End of "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $".
 .\"
index 45dedb85a7b9cd56f56bf6febaed8ac8d73752af..0a0469247385ac73739319a3b04683f088db0491 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $"
+.\" "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $"
 .\"
 .\"   printers.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -60,7 +60,7 @@ DeviceURI uri
 .br
 Specifies the device URI for a printer.
 .TP 5
-ErrorPolicy cancel-job
+ErrorPolicy abort-job
 .TP 5
 ErrorPolicy retry-job
 .TP 5
@@ -127,5 +127,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $".
+.\" End of "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $".
 .\"
index 6867d6207b8b92c32185c29effb2c4ddf3881cc7..4ee88b7767d96046e7b15bb4b853859d87205150 100644 (file)
@@ -2,7 +2,7 @@
 
 mailto.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 mailto.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-mailto.o: ../cups/i18n.h ../cups/string.h ../config.h
+mailto.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
 testnotify.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 testnotify.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 testnotify.o: ../cups/language.h ../cups/string.h ../config.h
index 6101446d1d531371edbfa61f3c9aa6b3a43acc11..b40ec0f22e99ed497e1753114cfea61533a6d058 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cups.list.in 5900 2006-08-28 19:26:39Z mike $"
+# "$Id: cups.list.in 5964 2006-09-19 16:27:29Z mike $"
 #
 #   ESP Package Manager (EPM) file list for the Common UNIX Printing
 #   System (CUPS).
 %vendor Easy Software Products
 %license LICENSE.txt
 %readme packaging/cups.readme
+%format rpm
+# Red Hat and their epochs...
+%version 1:@CUPS_VERSION@
+%format !rpm
 %version @CUPS_VERSION@
+%format all
 %description The Common UNIX Printing System provides a portable printing
 %description layer for UNIX(r) operating systems.  It has been developed by
 %description Easy Software Products to promote a standard printing solution
@@ -364,8 +369,10 @@ f 0644 root sys $DATADIR/banners/standard data/standard
 f 0644 root sys $DATADIR/banners/topsecret data/topsecret
 f 0644 root sys $DATADIR/banners/unclassified data/unclassified
 
+d 0755 root sys $DATADIR/charmaps -
+f 0644 root sys $DATADIR/charmaps data/*.txt
+
 d 0755 root sys $DATADIR/charsets -
-f 0644 root sys $DATADIR/charsets data/*.txt
 f 0644 root sys $DATADIR/charsets/windows-874 data/windows-874
 f 0644 root sys $DATADIR/charsets/windows-1250 data/windows-1250
 f 0644 root sys $DATADIR/charsets/windows-1251 data/windows-1251
@@ -443,7 +450,12 @@ c 0644 root sys $PAMDIR/cups conf/@PAMFILE@
 # Developer files
 f 0755 root sys $BINDIR/cups-config cups-config
 d 0755 root sys $INCLUDEDIR/cups -
+f 0644 root sys $INCLUDEDIR/cups/adminutil.h cups/adminutil.h
+f 0644 root sys $INCLUDEDIR/cups/array.h cups/array.h
+f 0644 root sys $INCLUDEDIR/cups/backend.h cups/backend.h
 f 0644 root sys $INCLUDEDIR/cups/cups.h cups/cups.h
+f 0644 root sys $INCLUDEDIR/cups/dir.h cups/dir.h
+f 0644 root sys $INCLUDEDIR/cups/file.h cups/file.h
 f 0644 root sys $INCLUDEDIR/cups/http.h cups/http.h
 f 0644 root sys $INCLUDEDIR/cups/image.h filter/image.h
 f 0644 root sys $INCLUDEDIR/cups/ipp.h cups/ipp.h
@@ -451,6 +463,7 @@ f 0644 root sys $INCLUDEDIR/cups/language.h cups/language.h
 f 0644 root sys $INCLUDEDIR/cups/md5.h cups/md5.h
 f 0644 root sys $INCLUDEDIR/cups/ppd.h cups/ppd.h
 f 0644 root sys $INCLUDEDIR/cups/raster.h filter/raster.h
+f 0644 root sys $INCLUDEDIR/cups/transcode.h cups/transcode.h
 
 %if INSTALLSTATIC
 f 0644 root sys $LIBDIR/libcups.a cups/libcups.a
@@ -589,5 +602,5 @@ f 0644 root sys $XINETD/cups-lpd init/cups-lpd
 %subpackage
 
 #
-# End of "$Id: cups.list.in 5900 2006-08-28 19:26:39Z mike $".
+# End of "$Id: cups.list.in 5964 2006-09-19 16:27:29Z mike $".
 #
index 350408b56aff26d0dff41f66c868963d7be985cd..a36824a85a95ab1f02c88f2a966d30e236cc81c6 100644 (file)
@@ -91,51 +91,6 @@ PSTokenizer.o: ../config.h PSTokenizer.h gtypes.h
 SecurityHandler.o: ../config.h GString.h PDFDoc.h XRef.h gtypes.h Object.h
 SecurityHandler.o: gmem.h Array.h Dict.h Stream.h Catalog.h Page.h Decrypt.h
 SecurityHandler.o: Error.h GlobalParams.h CharTypes.h SecurityHandler.h
-SplashBitmap.o: ../config.h gmem.h SplashErrorCodes.h SplashBitmap.h
-SplashBitmap.o: SplashTypes.h gtypes.h
-SplashClip.o: ../config.h gmem.h SplashErrorCodes.h SplashMath.h
-SplashClip.o: SplashTypes.h gtypes.h SplashPath.h SplashXPath.h
-SplashClip.o: SplashXPathScanner.h SplashClip.h
-Splash.o: ../config.h gmem.h SplashErrorCodes.h SplashMath.h SplashTypes.h
-Splash.o: gtypes.h SplashBitmap.h SplashState.h SplashPath.h SplashXPath.h
-Splash.o: SplashXPathScanner.h SplashPattern.h SplashScreen.h SplashFont.h
-Splash.o: SplashGlyphBitmap.h Splash.h SplashClip.h
-SplashFont.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
-SplashFont.o: SplashGlyphBitmap.h SplashFontFile.h SplashFont.h
-SplashFontEngine.o: ../config.h gmem.h GString.h SplashT1FontEngine.h
-SplashFontEngine.o: SplashFTFontEngine.h SplashFontFile.h gtypes.h
-SplashFontEngine.o: SplashTypes.h SplashFontFileID.h SplashFont.h
-SplashFontEngine.o: SplashFontEngine.h
-SplashFontFile.o: ../config.h GString.h SplashFontFile.h gtypes.h
-SplashFontFile.o: SplashTypes.h SplashFontFileID.h
-SplashFontFileID.o: ../config.h SplashFontFileID.h gtypes.h
-SplashFTFont.o: ../config.h
-SplashFTFontEngine.o: ../config.h
-SplashFTFontFile.o: ../config.h
-SplashOutputDev.o: ../config.h gfile.h gtypes.h GlobalParams.h CharTypes.h
-SplashOutputDev.o: Error.h Object.h gmem.h GString.h Array.h Dict.h Stream.h
-SplashOutputDev.o: GfxFont.h Link.h CharCodeToUnicode.h FontEncodingTables.h
-SplashOutputDev.o: FoFiTrueType.h FoFiBase.h SplashBitmap.h SplashTypes.h
-SplashOutputDev.o: SplashGlyphBitmap.h SplashPattern.h SplashScreen.h
-SplashOutputDev.o: SplashPath.h SplashState.h SplashErrorCodes.h
-SplashOutputDev.o: SplashFontEngine.h SplashFont.h SplashFontFile.h
-SplashOutputDev.o: SplashFontFileID.h Splash.h SplashClip.h SplashOutputDev.h
-SplashOutputDev.o: OutputDev.h GfxState.h Function.h
-SplashPath.o: ../config.h gmem.h SplashErrorCodes.h SplashPath.h
-SplashPath.o: SplashTypes.h gtypes.h
-SplashPattern.o: ../config.h SplashMath.h SplashTypes.h gtypes.h
-SplashPattern.o: SplashScreen.h SplashPattern.h
-SplashScreen.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
-SplashScreen.o: SplashScreen.h
-SplashState.o: ../config.h gmem.h SplashPattern.h SplashTypes.h gtypes.h
-SplashState.o: SplashScreen.h SplashClip.h SplashState.h
-SplashT1Font.o: ../config.h
-SplashT1FontEngine.o: ../config.h
-SplashT1FontFile.o: ../config.h
-SplashXPath.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
-SplashXPath.o: SplashPath.h SplashXPath.h
-SplashXPathScanner.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
-SplashXPathScanner.o: SplashXPath.h SplashXPathScanner.h
 Stream.o: ../config.h gmem.h gfile.h gtypes.h Error.h Object.h GString.h
 Stream.o: Array.h Dict.h Stream.h Lexer.h Decrypt.h GfxState.h Function.h
 Stream.o: JBIG2Stream.h JPXStream.h Stream-CCITT.h
index d54993e2a74c526daf4596fb63abd0b0bbcf48fa..e90107a76868db4e6d528dd8e8a904ae9a3efe94 100644 (file)
@@ -204,6 +204,9 @@ testmime.o: ../cups/file.h ../cups/dir.h
 testspeed.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 testspeed.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 testspeed.o: ../cups/language.h ../cups/debug.h
+testsub.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
+testsub.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testsub.o: ../cups/debug.h ../cups/string.h ../config.h
 util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 util.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 util.o: ../cups/file.h ../cups/string.h ../config.h
index 58d3621147ffbf7e4a4d8031fd24d7459bede7f3..2eb297051559daa3e825549cb3a049ef88e5226f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5868 2006-08-23 19:39:39Z mike $"
+# "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $"
 #
 #   Scheduler Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -62,6 +62,7 @@ OBJS  =       \
                testlpd.o \
                testmime.o \
                testspeed.o \
+               testsub.o \
                util.o
 TARGETS        =       \
                cupsd \
@@ -73,7 +74,8 @@ TARGETS       =       \
                testdirsvc \
                testlpd \
                testmime \
-               testspeed
+               testspeed \
+               testsub
 
 
 #
@@ -282,6 +284,16 @@ testspeed: testspeed.o ../cups/libcups.a
                $(COMMONLIBS) $(LIBZ) $(SSLLIBS)
 
 
+#
+# Make the test program, "testsub".
+#
+
+testsub:       testsub.o ../cups/libcups.a
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+
+
 #
 # Dependencies...
 #
@@ -290,5 +302,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5868 2006-08-23 19:39:39Z mike $".
+# End of "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $".
 #
index a1a10406b63691f57184ae1fb88a22722b099f37..41fd65f87215e94b30d842ef0e02d7ad883a29d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.c 5840 2006-08-17 14:55:30Z mike $"
+ * "$Id: auth.c 5948 2006-09-12 13:58:39Z mike $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
@@ -482,13 +482,13 @@ cupsdAuthorize(cupsd_client_t *con)       /* I - Client connection */
             strlcpy(data.username, username, sizeof(data.username));
            strlcpy(data.password, password, sizeof(data.password));
 
-#  ifdef __sun
+#  if defined(__sun) || defined(__hpux)
            pamdata.conv        = (int (*)(int, struct pam_message **,
                                           struct pam_response **,
                                           void *))pam_func;
 #  else
            pamdata.conv        = pam_func;
-#  endif /* __sun */
+#  endif /* __sun || __hpux */
            pamdata.appdata_ptr = &data;
 
 #  ifdef __hpux
@@ -2170,5 +2170,5 @@ to64(char          *s,                    /* O - Output string */
 
 
 /*
- * End of "$Id: auth.c 5840 2006-08-17 14:55:30Z mike $".
+ * End of "$Id: auth.c 5948 2006-09-12 13:58:39Z mike $".
  */
index d83540c873a76cd7e338a77d190d3b88fd660cb7..f78a1077dd1eaa5bddb4212d91875064fd6298f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: banners.c 5305 2006-03-18 03:05:12Z mike $"
+ * "$Id: banners.c 5948 2006-09-12 13:58:39Z mike $"
  *
  *   Banner routines for the Common UNIX Printing System (CUPS).
  *
@@ -195,7 +195,7 @@ compare_banners(
  * 'free_banners()' - Free all banners.
  */
 
-void
+static void
 free_banners(void)
 {
   cupsd_banner_t       *temp;          /* Current banner */
@@ -215,5 +215,5 @@ free_banners(void)
 
 
 /*
- * End of "$Id: banners.c 5305 2006-03-18 03:05:12Z mike $".
+ * End of "$Id: banners.c 5948 2006-09-12 13:58:39Z mike $".
  */
index d5d1851a34c17cead712e218453cc16b00114901..762421f2d0fa0566938fc2302addd29099ad77cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c 5898 2006-08-28 18:54:10Z mike $"
+ * "$Id: client.c 5972 2006-09-19 20:44:07Z mike $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -678,12 +678,14 @@ cupsdCloseClient(cupsd_client_t *con)     /* I - Client to close */
  * 'cupsdFlushHeader()' - Flush the header fields to the client.
  */
 
-void
+int                                    /* I - Bytes written or -1 on error */
 cupsdFlushHeader(cupsd_client_t *con)  /* I - Client to flush to */
 {
-  httpFlushWrite(HTTP(con));
+  int bytes = httpFlushWrite(HTTP(con));
 
   con->http.data_encoding = HTTP_ENCODE_LENGTH;
+
+  return (bytes);
 }
 
 
@@ -1038,7 +1040,9 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
        httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
        httpPrintf(HTTP(con), "Content-Length: 0\r\n");
        httpPrintf(HTTP(con), "\r\n");
-       cupsdFlushHeader(con);
+
+       if (cupsdFlushHeader(con) < 0)
+         return (cupsdCloseClient(con));
 
         encrypt_client(con);
 #else
@@ -1053,7 +1057,9 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
       httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST, PUT\r\n");
       httpPrintf(HTTP(con), "Content-Length: 0\r\n");
       httpPrintf(HTTP(con), "\r\n");
-      cupsdFlushHeader(con);
+
+      if (cupsdFlushHeader(con) < 0)
+       return (cupsdCloseClient(con));
     }
     else if (!is_path_absolute(con->uri))
     {
@@ -1081,7 +1087,9 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
        httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
        httpPrintf(HTTP(con), "Content-Length: 0\r\n");
        httpPrintf(HTTP(con), "\r\n");
-       cupsdFlushHeader(con);
+
+       if (cupsdFlushHeader(con) < 0)
+         return (cupsdCloseClient(con));
 
         encrypt_client(con);
 #else
@@ -1122,7 +1130,9 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
 
          httpPrintf(HTTP(con), "Content-Length: 0\r\n");
          httpPrintf(HTTP(con), "\r\n");
-         cupsdFlushHeader(con);
+
+         if (cupsdFlushHeader(con) < 0)
+           return (cupsdCloseClient(con));
        }
       }
 
@@ -1556,7 +1566,8 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
              if (httpPrintf(HTTP(con), "\r\n") < 0)
                return (cupsdCloseClient(con));
 
-             cupsdFlushHeader(con);
+             if (cupsdFlushHeader(con) < 0)
+               return (cupsdCloseClient(con));
 
               cupsdLogRequest(con, HTTP_OK);
            }
@@ -1621,7 +1632,8 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
             if (httpPrintf(HTTP(con), "\r\n") < 0)
              return (cupsdCloseClient(con));
 
-           cupsdFlushHeader(con);
+           if (cupsdFlushHeader(con) < 0)
+             return (cupsdCloseClient(con));
 
             con->http.state = HTTP_WAITING;
             break;
@@ -2096,7 +2108,8 @@ cupsdSendError(cupsd_client_t *con,       /* I - Connection */
   else if (httpPrintf(HTTP(con), "\r\n") < 0)
     return (0);
 
-  cupsdFlushHeader(con);
+  if (cupsdFlushHeader(con) < 0)
+    return (0);
 
   con->http.state = HTTP_WAITING;
 
@@ -2117,29 +2130,23 @@ cupsdSendHeader(cupsd_client_t *con,    /* I - Client to send to */
   * Send the HTTP status header...
   */
 
-  httpFlushWrite(HTTP(con));
-
-  con->http.data_encoding = HTTP_ENCODE_FIELDS;
-
-  if (httpPrintf(HTTP(con), "HTTP/%d.%d %d %s\r\n", con->http.version / 100,
-                 con->http.version % 100, code, httpStatus(code)) < 0)
-    return (0);
-
   if (code == HTTP_CONTINUE)
   {
    /*
     * 100-continue doesn't send any headers...
     */
 
-    if (httpPrintf(HTTP(con), "\r\n") < 0)
-      return (0);
-    else
-    {
-      cupsdFlushHeader(con);
-      return (1);
-    }
+    return (httpPrintf(HTTP(con), "HTTP/%d.%d 100 Continue\r\n\r\n",
+                      con->http.version / 100, con->http.version % 100) > 0);
   }
 
+  httpFlushWrite(HTTP(con));
+
+  con->http.data_encoding = HTTP_ENCODE_FIELDS;
+
+  if (httpPrintf(HTTP(con), "HTTP/%d.%d %d %s\r\n", con->http.version / 100,
+                 con->http.version % 100, code, httpStatus(code)) < 0)
+    return (0);
   if (httpPrintf(HTTP(con), "Date: %s\r\n", httpGetDateString(time(NULL))) < 0)
     return (0);
   if (ServerHeader)
@@ -2262,7 +2269,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
 
   if (con->response != NULL)
   {
-    ipp_state = ippWrite(&(con->http), con->response);
+    ipp_state = ippWrite(HTTP(con), con->response);
     bytes     = ipp_state != IPP_ERROR && ipp_state != IPP_DATA;
   }
   else if ((bytes = read(con->file, buf, sizeof(buf) - 1)) > 0)
@@ -2301,14 +2308,20 @@ cupsdWriteClient(cupsd_client_t *con)   /* I - Client connection */
             if (!strncasecmp(buf, "Location:", 9))
            {
              cupsdSendHeader(con, HTTP_SEE_OTHER, NULL);
+             con->sent_header = 2;
+
              if (httpPrintf(HTTP(con), "Content-Length: 0\r\n") < 0)
                return (0);
            }
            else if (!strncasecmp(buf, "Status:", 7))
+           {
              cupsdSendError(con, (http_status_t)atoi(buf + 7));
+             con->sent_header = 2;
+           }
            else
            {
              cupsdSendHeader(con, HTTP_OK, NULL);
+             con->sent_header = 1;
 
              if (con->http.version == HTTP_1_1)
              {
@@ -2316,8 +2329,6 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
                  return (0);
              }
             }
-
-           con->sent_header = 1;
          }
 
          if (strncasecmp(buf, "Status:", 7))
@@ -2342,7 +2353,11 @@ cupsdWriteClient(cupsd_client_t *con)    /* I - Client connection */
          {
            con->got_fields = 1;
 
-            cupsdFlushHeader(con);
+            if (cupsdFlushHeader(con) < 0)
+           {
+             cupsdCloseClient(con);
+             return (0);
+           }
 
            if (con->http.version == HTTP_1_1)
              con->http.data_encoding = HTTP_ENCODE_CHUNKED;
@@ -2400,9 +2415,9 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
 
     httpFlushWrite(HTTP(con));
 
-    if (con->http.data_encoding == HTTP_ENCODE_CHUNKED)
+    if (con->http.data_encoding == HTTP_ENCODE_CHUNKED && con->sent_header == 1)
     {
-      if (httpPrintf(HTTP(con), "0\r\n\r\n") < 0)
+      if (httpWrite2(HTTP(con), "", 0) < 0)
       {
         cupsdCloseClient(con);
        return (0);
@@ -4152,7 +4167,8 @@ write_file(cupsd_client_t *con,           /* I - Client connection */
   if (httpPrintf(HTTP(con), "\r\n") < 0)
     return (0);
 
-  cupsdFlushHeader(con);
+  if (cupsdFlushHeader(con) < 0)
+    return (0);
 
   con->http.data_encoding  = HTTP_ENCODE_LENGTH;
   con->http.data_remaining = filestats->st_size;
@@ -4172,5 +4188,5 @@ write_file(cupsd_client_t *con,           /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c 5898 2006-08-28 18:54:10Z mike $".
+ * End of "$Id: client.c 5972 2006-09-19 20:44:07Z mike $".
  */
index ef376cda8acdea643b282290993343c31880e7e0..9f98df2aedcedf50d354a46388e43e6a548e8e5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.h 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: client.h 5932 2006-09-11 14:21:23Z mike $"
  *
  *   Client definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -104,7 +104,7 @@ extern void cupsdAcceptClient(cupsd_listener_t *lis);
 extern void    cupsdCloseAllClients(void);
 extern int     cupsdCloseClient(cupsd_client_t *con);
 extern void    cupsdDeleteAllListeners(void);
-extern void    cupsdFlushHeader(cupsd_client_t *con);
+extern int     cupsdFlushHeader(cupsd_client_t *con);
 extern void    cupsdPauseListening(void);
 extern int     cupsdProcessIPPRequest(cupsd_client_t *con);
 extern int     cupsdReadClient(cupsd_client_t *con);
@@ -122,5 +122,5 @@ extern int  cupsdWriteClient(cupsd_client_t *con);
 
 
 /*
- * End of "$Id: client.h 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: client.h 5932 2006-09-11 14:21:23Z mike $".
  */
index cb751549bc698d57b668e4fb2efe7cbb09a13d00..eb4f790f5b7eb97180f52037f44cfe0803532f31 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: dirsvc.c 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: dirsvc.c 5940 2006-09-11 18:30:09Z mike $"
  *
  *   Directory services routines for the Common UNIX Printing System (CUPS).
  *
@@ -1050,9 +1050,9 @@ cupsdStartPolling(void)
   int                  i;              /* Looping var */
   cupsd_dirsvc_poll_t  *pollp;         /* Current polling server */
   char                 polld[1024];    /* Poll daemon path */
-  char                 sport[10];      /* Server port */
-  char                 bport[10];      /* Browser port */
-  char                 interval[10];   /* Poll interval */
+  char                 sport[255];     /* Server port */
+  char                 bport[255];     /* Browser port */
+  char                 interval[255];  /* Poll interval */
   int                  statusfds[2];   /* Status pipe */
   char                 *argv[6];       /* Arguments */
   char                 *envp[100];     /* Environment */
@@ -3181,5 +3181,5 @@ slp_url_callback(
 
 
 /*
- * End of "$Id: dirsvc.c 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: dirsvc.c 5940 2006-09-11 18:30:09Z mike $".
  */
index d32a715053b8e035940ded0815f21c155f9a5362..22a21f496a50d3489fe514fa2f31d8f318823b20 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 5907 2006-08-30 02:18:28Z mike $"
+ * "$Id: ipp.c 5970 2006-09-19 20:11:08Z mike $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -638,8 +638,11 @@ cupsdProcessIPPRequest(
 
       if (con->http.version == HTTP_1_1)
       {
-       httpPrintf(HTTP(con), "Transfer-Encoding: chunked\r\n\r\n");
-       cupsdFlushHeader(con);
+       if (httpPrintf(HTTP(con), "Transfer-Encoding: chunked\r\n\r\n") < 0)
+         return (0);
+
+       if (cupsdFlushHeader(con) < 0)
+         return (0);
 
        con->http.data_encoding = HTTP_ENCODE_CHUNKED;
       }
@@ -651,9 +654,12 @@ cupsdProcessIPPRequest(
 
        length = ippLength(con->response);
 
-       httpPrintf(HTTP(con), "Content-Length: " CUPS_LLFMT "\r\n\r\n",
-                  CUPS_LLCAST length);
-       cupsdFlushHeader(con);
+       if (httpPrintf(HTTP(con), "Content-Length: " CUPS_LLFMT "\r\n\r\n",
+                      CUPS_LLCAST length) < 0)
+         return (0);
+
+       if (cupsdFlushHeader(con) < 0)
+         return (0);
 
        con->http.data_encoding  = HTTP_ENCODE_LENGTH;
        con->http.data_remaining = length;
@@ -1121,7 +1127,7 @@ add_file(cupsd_client_t *con,             /* I - Connection to client */
 
   if (!compressions || !filetypes)
   {
-    cupsdCancelJob(job, 1);
+    cupsdCancelJob(job, 1, IPP_JOB_ABORTED);
 
     send_ipp_status(con, IPP_INTERNAL_ERROR,
                     _("Unable to allocate memory for file types!"));
@@ -3077,10 +3083,7 @@ cancel_job(cupsd_client_t  *con, /* I - Client connection */
   * Cancel the job and return...
   */
 
-  cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                "Job canceled by \"%s\".", username);
-
-  cupsdCancelJob(job, 0);
+  cupsdCancelJob(job, 0, IPP_JOB_CANCELED);
   cupsdCheckJobs();
 
   cupsdLogMessage(CUPSD_LOG_INFO, "Job %d was canceled by \"%s\".", jobid,
@@ -7521,7 +7524,7 @@ restart_job(cupsd_client_t  *con, /* I - Client connection */
 
   cupsdLoadJob(job);
 
-  if (!job->attrs ||job->num_files == 0)
+  if (!job->attrs || job->num_files == 0)
   {
    /*
     * Nope - return a "not possible" error...
@@ -8411,16 +8414,7 @@ set_job_attrs(cupsd_client_t  *con,      /* I - Client connection */
                return;
              }
               else if (con->response->request.status.status_code == IPP_OK)
-             {
-                cupsdCancelJob(job, 0);
-
-               if (JobHistory)
-               {
-                  job->state->values[0].integer = attr->values[0].integer;
-                  job->state_value              = (ipp_jstate_t)attr->values[0].integer;
-                 cupsdSaveJob(job);
-               }
-             }
+                cupsdCancelJob(job, 0, (ipp_jstate_t)attr->values[0].integer);
              break;
        }
       }
@@ -9231,5 +9225,5 @@ validate_user(cupsd_job_t    *job,        /* I - Job */
 
 
 /*
- * End of "$Id: ipp.c 5907 2006-08-30 02:18:28Z mike $".
+ * End of "$Id: ipp.c 5970 2006-09-19 20:11:08Z mike $".
  */
index 79370fbba9ed4545388dbbd9f714eac52a844b62..f8edfdf46d9fbb343f69db61be5c2ccd9308e9eb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.c 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: job.c 5974 2006-09-20 18:42:37Z mike $"
  *
  *   Job management routines for the Common UNIX Printing System (CUPS).
  *
@@ -148,11 +148,13 @@ cupsdAddJob(int        priority,  /* I - Job priority */
  */
 
 void
-cupsdCancelJob(cupsd_job_t *job,       /* I - Job to cancel */
-               int         purge)      /* I - Purge jobs? */
+cupsdCancelJob(cupsd_job_t  *job,      /* I - Job to cancel */
+               int          purge,     /* I - Purge jobs? */
+              ipp_jstate_t newstate)   /* I - New job state */
 {
   int          i;                      /* Looping var */
   char         filename[1024];         /* Job filename */
+  cupsd_printer_t *printer;            /* Printer used by job */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCancelJob: id = %d", job->id);
@@ -161,18 +163,55 @@ cupsdCancelJob(cupsd_job_t *job,  /* I - Job to cancel */
   * Stop any processes that are working on the current job...
   */
 
+  printer = job->printer;
+
   if (job->state_value == IPP_JOB_PROCESSING)
     cupsdStopJob(job, 0);
 
   cupsdLoadJob(job);
 
   if (job->attrs)
-    job->state->values[0].integer = IPP_JOB_CANCELLED;
+    job->state->values[0].integer = newstate;
 
-  job->state_value = IPP_JOB_CANCELLED;
+  job->state_value = newstate;
 
   set_time(job, "time-at-completed");
 
+ /*
+  * Send any pending notifications and then expire them...
+  */
+
+  switch (newstate)
+  {
+    default :
+        break;
+
+    case IPP_JOB_CANCELED :
+       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
+                      purge ? "Job purged." : "Job canceled.");
+        break;
+
+    case IPP_JOB_ABORTED :
+       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
+                      "Job aborted; please consult the error_log file "
+                     "for details.");
+        break;
+
+    case IPP_JOB_COMPLETED :
+       /*
+       * Clear the printer's state_message and state_reasons and move on...
+       */
+
+       printer->state_message[0] = '\0';
+
+       cupsdSetPrinterReasons(printer, "");
+       cupsdSetPrinterState(printer, IPP_PRINTER_IDLE, 0);
+
+       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
+                      "Job completed.");
+        break;
+  }
+
   cupsdExpireSubscriptions(NULL, job);
 
  /*
@@ -270,10 +309,7 @@ cupsdCancelJobs(const char *dest,  /* I - Destination to cancel */
       * Cancel all jobs matching this destination/user...
       */
 
-      cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                    purge ? "Job purged." : "Job canceled.");
-
-      cupsdCancelJob(job, purge);
+      cupsdCancelJob(job, purge, IPP_JOB_CANCELED);
     }
 
   cupsdCheckJobs();
@@ -361,7 +397,7 @@ cupsdCheckJobs(void)
                       "Job canceled because the destination printer/class has "
                      "gone away.");
 
-        cupsdCancelJob(job, 1);
+        cupsdCancelJob(job, 1, IPP_JOB_ABORTED);
       }
       else if (printer)
       {
@@ -415,8 +451,8 @@ cupsdCleanJobs(void)
   for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
        job && cupsArrayCount(Jobs) >= MaxJobs;
        job = (cupsd_job_t *)cupsArrayNext(Jobs))
-    if (job->state_value >= IPP_JOB_CANCELLED)
-      cupsdCancelJob(job, 1);
+    if (job->state_value >= IPP_JOB_CANCELED)
+      cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
 }
 
 
@@ -437,7 +473,8 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFinishJob: job->status is %d",
                   job->status);
 
-  if (job->status_buffer && job->current_file >= job->num_files)
+  if (job->status_buffer &&
+      (job->status < 0 || job->current_file >= job->num_files))
   {
    /*
     * Close the pipe and clear the input bit.
@@ -507,8 +544,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
 
          cupsdStopJob(job, 0);
 
-          if (!(printer->type & CUPS_PRINTER_REMOTE) ||
-             (printer->type & CUPS_PRINTER_IMPLICIT))
+          if (job->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
          {
           /*
            * Mark the job as pending again - we'll retry on another
@@ -549,12 +585,7 @@ cupsdFinishJob(cupsd_job_t *job)   /* I - Job */
                              "after %d tries.",
                              job->id, JobRetryLimit);
 
-             cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
-                           "Job canceled since it could not be sent after %d "
-                           "tries.",
-                           JobRetryLimit);
-
-             cupsdCancelJob(job, 0);
+             cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
            }
            else
            {
@@ -563,10 +594,23 @@ cupsdFinishJob(cupsd_job_t *job)  /* I - Job */
              */
 
              set_hold_until(job, time(NULL) + JobRetryInterval);
+
+             cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job,
+                           "Job held due to fax errors; please consult "
+                           "the error_log file for details.");
+             cupsdSetPrinterState(printer, IPP_PRINTER_IDLE, 0);
            }
          }
          else if (!strcmp(printer->error_policy, "abort-job"))
-           cupsdCancelJob(job, 0);
+           cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
+          else
+          {
+           cupsdSetPrinterState(printer, IPP_PRINTER_STOPPED, 1);
+
+           cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
+                         "Job stopped due to backend errors; please consult "
+                         "the error_log file for details.");
+         }
           break;
 
       case CUPS_BACKEND_CANCEL :
@@ -574,7 +618,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
          * Cancel the job...
          */
 
-         cupsdCancelJob(job, 0);
+         cupsdCancelJob(job, 0, IPP_JOB_CANCELED);
           break;
 
       case CUPS_BACKEND_HOLD :
@@ -583,8 +627,17 @@ cupsdFinishJob(cupsd_job_t *job)   /* I - Job */
          */
 
          cupsdStopJob(job, 0);
+
          cupsdSetJobHoldUntil(job, "indefinite");
+
+         job->state->values[0].integer = IPP_JOB_HELD;
+         job->state_value              = IPP_JOB_HELD;
+
          cupsdSaveJob(job);
+
+         cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
+                       "Job held due to backend errors; please consult "
+                       "the error_log file for details.");
           break;
 
       case CUPS_BACKEND_STOP :
@@ -593,13 +646,26 @@ cupsdFinishJob(cupsd_job_t *job)  /* I - Job */
          */
 
          cupsdStopJob(job, 0);
+
+         job->state->values[0].integer = IPP_JOB_PENDING;
+         job->state_value              = IPP_JOB_PENDING;
+
          cupsdSaveJob(job);
          cupsdSetPrinterState(printer, IPP_PRINTER_STOPPED, 1);
+
+         cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
+                       "Job stopped due to backend errors; please consult "
+                       "the error_log file for details.");
           break;
 
       case CUPS_BACKEND_AUTH_REQUIRED :
          cupsdStopJob(job, 0);
+
          cupsdSetJobHoldUntil(job, "authenticated");
+
+         job->state->values[0].integer = IPP_JOB_HELD;
+         job->state_value              = IPP_JOB_HELD;
+
          cupsdSaveJob(job);
 
          cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
@@ -647,28 +713,9 @@ cupsdFinishJob(cupsd_job_t *job)   /* I - Job */
       * Close out this job...
       */
 
-      cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
-                    "Job completed successfully.");
-
       job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE);
 
-      cupsdCancelJob(job, 0);
-
-      if (job_history)
-      {
-        job->state->values[0].integer = IPP_JOB_COMPLETED;
-        job->state_value              = IPP_JOB_COMPLETED;
-       cupsdSaveJob(job);
-      }
-
-     /*
-      * Clear the printer's state_message and state_reasons and move on...
-      */
-
-      printer->state_message[0] = '\0';
-
-      cupsdSetPrinterReasons(printer, "");
-
+      cupsdCancelJob(job, 0, IPP_JOB_COMPLETED);
       cupsdCheckJobs();
     }
   }
@@ -1194,12 +1241,22 @@ cupsdRestartJob(cupsd_job_t *job)       /* I - Job */
 
   if (job->state_value == IPP_JOB_STOPPED || job->num_files)
   {
+    ipp_jstate_t       old_state;      /* Old job state */
+
+
     cupsdLoadJob(job);
 
+    old_state = job->state_value;
+
     job->tries = 0;
     job->state->values[0].integer = IPP_JOB_PENDING;
     job->state_value              = IPP_JOB_PENDING;
+
     cupsdSaveJob(job);
+
+    if (old_state > IPP_JOB_STOPPED)
+      cupsArrayAdd(ActiveJobs, job);
+
     cupsdCheckJobs();
   }
 }
@@ -1532,17 +1589,9 @@ cupsdStopJob(cupsd_job_t *job,           /* I - Job */
 
   FilterLevel -= job->cost;
 
-  if (job->status < 0 &&
-      !(job->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) &&
-      !(job->printer->type & CUPS_PRINTER_FAX) &&
-      !strcmp(job->printer->error_policy, "stop-printer"))
-    cupsdSetPrinterState(job->printer, IPP_PRINTER_STOPPED, 1);
-  else if (job->printer->state != IPP_PRINTER_STOPPED)
+  if (job->printer->state == IPP_PRINTER_PROCESSING)
     cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStopJob: printer state is %d",
-                  job->printer->state);
-
   job->state->values[0].integer = IPP_JOB_STOPPED;
   job->state_value              = IPP_JOB_STOPPED;
   job->printer->job = NULL;
@@ -1632,7 +1681,8 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
   int          copies;                 /* Number of copies printed */
   char         message[1024],          /* Message text */
                *ptr;                   /* Pointer update... */
-  int          loglevel;               /* Log level for message */
+  int          loglevel,               /* Log level for message */
+               event = 0;              /* Events? */
 
 
   while ((ptr = cupsdStatBufUpdate(job->status_buffer, &loglevel,
@@ -1678,6 +1728,7 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
     {
       cupsdSetPrinterReasons(job->printer, message);
       cupsdAddPrinterHistory(job->printer);
+      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
     }
     else if (loglevel == CUPSD_LOG_ATTR)
     {
@@ -1699,6 +1750,7 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
 
       cupsdSetString(&job->printer->recoverable, ptr);
       cupsdAddPrinterHistory(job->printer);
+      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
     }
     else if (!strncmp(message, "recovered:", 10))
     {
@@ -1711,6 +1763,7 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
 
       cupsdSetString(&job->printer->recoverable, ptr);
       cupsdAddPrinterHistory(job->printer);
+      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
     }
 #endif /* __APPLE__ */
     else if (loglevel <= CUPSD_LOG_INFO)
@@ -1728,6 +1781,13 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
       break;
   }
 
+  if ((event & CUPSD_EVENT_PRINTER_STATE_CHANGED))
+    cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE_CHANGED, job->printer, NULL,
+                 (job->printer->type & CUPS_PRINTER_CLASS) ?
+                     "Class \"%s\" state changed." :
+                     "Printer \"%s\" state changed.",
+                 job->printer->name);
+
   if (ptr == NULL && !job->status_buffer->bufused)
   {
    /*
@@ -2297,7 +2357,7 @@ load_request_root(void)
       cupsArrayAdd(Jobs, job);
 
       if (job->state_value <= IPP_JOB_STOPPED)
-        cupsArrayAdd(ActiveJobs,job);
+        cupsArrayAdd(ActiveJobs, job);
       else
         unload_job(job);
     }
@@ -2437,10 +2497,7 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
     cupsdLogMessage(CUPSD_LOG_ERROR, "Job ID %d has no files!  Canceling it!",
                     job->id);
 
-    cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                  "Job canceled because it has no files.");
-
-    cupsdCancelJob(job, 0);
+    cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
     return;
   }
 
@@ -2503,13 +2560,7 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
       job->current_file ++;
 
       if (job->current_file == job->num_files)
-      {
-       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because it has no files that can be "
-                     "printed.");
-
-        cupsdCancelJob(job, 0);
-      }
+        cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
 
       return;
     }
@@ -2586,13 +2637,7 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
       job->current_file ++;
 
       if (job->current_file == job->num_files)
-      {
-       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because the print file could not be "
-                     "decompressed.");
-
-        cupsdCancelJob(job, 0);
-      }
+        cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
 
       return;
     }
@@ -2618,13 +2663,7 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
       job->current_file ++;
 
       if (job->current_file == job->num_files)
-      {
-       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because the port monitor could not be "
-                     "added.");
-
-        cupsdCancelJob(job, 0);
-      }
+        cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
 
       return;
     }
@@ -2728,10 +2767,7 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
 
       FilterLevel -= job->cost;
 
-      cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                    "Job canceled because the server ran out of memory.");
-
-      cupsdCancelJob(job, 0);
+      cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
       return;
     }
 
@@ -3426,5 +3462,5 @@ unload_job(cupsd_job_t *job)              /* I - Job */
 
 
 /*
- * End of "$Id: job.c 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: job.c 5974 2006-09-20 18:42:37Z mike $".
  */
index 48148c969d11333620284d36d3f14bd981a9a98d..5c1b540eb4f3166d0727db8f8d8d0420106b5f47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.h 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: job.h 5970 2006-09-19 20:11:08Z mike $"
  *
  *   Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -93,7 +93,8 @@ VAR int                       JobRetryLimit   VALUE(5),
  */
 
 extern cupsd_job_t     *cupsdAddJob(int priority, const char *dest);
-extern void            cupsdCancelJob(cupsd_job_t *job, int purge);
+extern void            cupsdCancelJob(cupsd_job_t *job, int purge,
+                                      ipp_jstate_t newstate);
 extern void            cupsdCancelJobs(const char *dest, const char *username,
                                        int purge);
 extern void            cupsdCheckJobs(void);
@@ -121,5 +122,5 @@ extern void         cupsdUpdateJob(cupsd_job_t *job);
 
 
 /*
- * End of "$Id: job.h 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: job.h 5970 2006-09-19 20:11:08Z mike $".
  */
index 0987058428c5d22b2771f6b38842532cbfe5c9fa..2c5ad2bd76b67c192e04c7907e815d65cc8f172b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: listen.c 5724 2006-07-12 19:42:35Z mike $"
+ * "$Id: listen.c 5970 2006-09-19 20:11:08Z mike $"
  *
  *   Server listening routines for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -352,7 +352,8 @@ cupsdStartListening(void)
   if (!LocalPort && !have_domain)
   {
     cupsdLogMessage(CUPSD_LOG_EMERG,
-                    "No Listen or Port lines were found to allow access via localhost!");
+                    "No Listen or Port lines were found to allow access via "
+                   "localhost!");
 
    /*
     * Commit suicide...
@@ -386,7 +387,9 @@ cupsdStartListening(void)
   }
 
   cupsdSetEnv("CUPS_ENCRYPTION", encryptions[LocalEncryption]);
-  cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
+
+  if (LocalPort)
+    cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
 
  /*
   * Resume listening for connections...
@@ -441,5 +444,5 @@ cupsdStopListening(void)
 
 
 /*
- * End of "$Id: listen.c 5724 2006-07-12 19:42:35Z mike $".
+ * End of "$Id: listen.c 5970 2006-09-19 20:11:08Z mike $".
  */
index 02e0a219aa15f61ec2dcb5c210bb4f26f245ce40..936c9d0be988ace9461c04fb0bef53b140c530b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c 5828 2006-08-15 21:21:45Z mike $"
+ * "$Id: printers.c 5970 2006-09-19 20:11:08Z mike $"
  *
  *   Printer routines for the Common UNIX Printing System (CUPS).
  *
@@ -2386,6 +2386,9 @@ cupsdStopPrinter(cupsd_printer_t *p,      /* I - Printer to stop */
     job->state_value              = IPP_JOB_PENDING;
 
     cupsdSaveJob(job);
+
+    cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
+                 "Job stopped due to printer being paused");
   }
 }
 
@@ -2411,6 +2414,10 @@ cupsdUpdatePrinters(void)
        p;
        p = (cupsd_printer_t *)cupsArrayNext(Printers))
   {
+   /*
+    * Remove remote printers if we are no longer browsing...
+    */
+
     if (!Browsing && (p->type & (CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE)))
     {
       if (p->type & CUPS_PRINTER_IMPLICIT)
@@ -2421,8 +2428,6 @@ cupsdUpdatePrinters(void)
       cupsArrayRestore(Printers);
       continue;
     }
-    else if (!(p->type & CUPS_PRINTER_REMOTE))
-      cupsdSetPrinterAttrs(p);
 
    /*
     * Update the operation policy pointer...
@@ -2430,6 +2435,13 @@ cupsdUpdatePrinters(void)
 
     if ((p->op_policy_ptr = cupsdFindPolicy(p->op_policy)) == NULL)
       p->op_policy_ptr = DefaultPolicyPtr;
+
+   /*
+    * Update printer attributes as needed...
+    */
+
+    if (!(p->type & CUPS_PRINTER_REMOTE))
+      cupsdSetPrinterAttrs(p);
   }
 }
 
@@ -2877,9 +2889,8 @@ add_printer_filter(
       snprintf(p->state_message, sizeof(p->state_message),
                "Filter \"%s\" for printer \"%s\" not available: %s",
               program, p->name, strerror(errno));
-      cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0);
       cupsdSetPrinterReasons(p, "+cups-missing-filter-error");
-      cupsdAddPrinterHistory(p);
+      cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0);
 
       cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
     }
@@ -3316,5 +3327,5 @@ write_irix_state(cupsd_printer_t *p)      /* I - Printer to update */
 
 
 /*
- * End of "$Id: printers.c 5828 2006-08-15 21:21:45Z mike $".
+ * End of "$Id: printers.c 5970 2006-09-19 20:11:08Z mike $".
  */
index db10d8677397f084ec9a3c087cb3e7b82b55d040..7d3e4e3eb5138111685ca7adc1a1fb234c2b354a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: quotas.c 5305 2006-03-18 03:05:12Z mike $"
+ * "$Id: quotas.c 5970 2006-09-19 20:11:08Z mike $"
  *
  *   Quota routines for the Common UNIX Printing System (CUPS).
  *
@@ -141,7 +141,7 @@ cupsdUpdateQuota(
     if (attr->values[0].integer < curtime)
     {
       if (JobAutoPurge)
-        cupsdCancelJob(job, 1);
+        cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
 
       continue;
     }
@@ -166,7 +166,7 @@ cupsdUpdateQuota(
  * 'add_quota()' - Add a quota record for this printer and user.
  */
 
-cupsd_quota_t *                                /* O - Quota data */
+static cupsd_quota_t *                 /* O - Quota data */
 add_quota(cupsd_printer_t *p,          /* I - Printer */
           const char      *username)   /* I - User */
 {
@@ -209,7 +209,7 @@ compare_quotas(const cupsd_quota_t *q1,     /* I - First quota record */
  * 'find_quota()' - Find a quota record.
  */
 
-cupsd_quota_t *                                /* O - Quota data */
+static cupsd_quota_t *                 /* O - Quota data */
 find_quota(cupsd_printer_t *p,         /* I - Printer */
            const char      *username)  /* I - User */
 {
@@ -230,5 +230,5 @@ find_quota(cupsd_printer_t *p,              /* I - Printer */
 
 
 /*
- * End of "$Id: quotas.c 5305 2006-03-18 03:05:12Z mike $".
+ * End of "$Id: quotas.c 5970 2006-09-19 20:11:08Z mike $".
  */
diff --git a/scheduler/testsub.c b/scheduler/testsub.c
new file mode 100644 (file)
index 0000000..62156bd
--- /dev/null
@@ -0,0 +1,531 @@
+/*
+ * "$Id: testsub.c 5940 2006-09-11 18:30:09Z mike $"
+ *
+ *   Scheduler notification tester for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2006 by Easy Software Products.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Easy Software Products 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 missing or damaged please contact Easy Software Products
+ *   at:
+ *
+ *       Attn: CUPS Licensing Information
+ *       Easy Software Products
+ *       44141 Airport View Drive, Suite 204
+ *       Hollywood, Maryland 20636 USA
+ *
+ *       Voice: (301) 373-9600
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ *
+ * Contents:
+ *
+ *   main()             - Subscribe to the .
+ *   print_attributes() - Print the attributes in a request...
+ *   sigterm_handler()  - Flag when the user hits CTRL-C...
+ *   usage()            - Show program usage...
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <cups/cups.h>
+#include <cups/debug.h>
+#include <cups/string.h>
+#include <signal.h>
+
+
+/*
+ * Local globals...
+ */
+
+static int     terminate = 0;
+
+
+/*
+ * Local functions...
+ */
+
+void           print_attributes(ipp_t *ipp, int indent);
+static void    sigterm_handler(int sig);
+static void    usage(void);
+
+
+/*
+ * 'main()' - Subscribe to the .
+ */
+
+int
+main(int  argc,                                /* I - Number of command-line arguments */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  int          i;                      /* Looping var */
+  const char   *uri;                   /* URI to use */
+  int          num_events;             /* Number of events */
+  const char   *events[100];           /* Events */
+  int          subscription_id,        /* notify-subscription-id */
+               sequence_number,        /* notify-sequence-number */
+               interval;               /* Interval between polls */
+  http_t       *http;                  /* HTTP connection */
+  ipp_t                *request,               /* IPP request */
+               *response;              /* IPP response */
+  ipp_attribute_t *attr;               /* Current attribute */
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+  struct sigaction action;             /* Actions for POSIX signals */
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+
+
+ /*
+  * Parse command-line...
+  */
+
+  num_events = 0;
+  uri        = NULL;
+
+  for (i = 1; i < argc; i ++)
+    if (!strcmp(argv[i], "-E"))
+      cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+    else if (!strcmp(argv[i], "-e"))
+    {
+      i ++;
+      if (i >= argc || num_events >= 100)
+        usage();
+
+      events[num_events] = argv[i];
+      num_events ++;
+    }
+    else if (!strcmp(argv[i], "-h"))
+    {
+      i ++;
+      if (i >= argc)
+        usage();
+
+      cupsSetServer(argv[i]);
+    }
+    else if (uri || strncmp(argv[i], "ipp://", 6))
+      usage();
+    else
+      uri = argv[i];
+
+  if (!uri)
+    usage();
+
+  if (num_events == 0)
+  {
+    events[0]  = "all";
+    num_events = 1;
+  }
+
+ /*
+  * Connect to the server...
+  */
+
+  if ((http = httpConnectEncrypt(cupsServer(), ippPort(),
+                                 cupsEncryption())) == NULL)
+  {
+    perror(cupsServer());
+    return (1);
+  }
+
+ /*
+  * Catch CTRL-C and SIGTERM...
+  */
+
+#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
+  sigset(SIGINT, sigterm_handler);
+  sigset(SIGTERM, sigterm_handler);
+#elif defined(HAVE_SIGACTION)
+  memset(&action, 0, sizeof(action));
+
+  sigemptyset(&action.sa_mask);
+  action.sa_handler = sigterm_handler;
+  sigaction(SIGINT, &action, NULL);
+  sigaction(SIGTERM, &action, NULL);
+#else
+  signal(SIGINT, sigterm_handler);
+  signal(SIGTERM, sigterm_handler);
+#endif /* HAVE_SIGSET */
+
+ /*
+  * Create the subscription...
+  */
+
+  if (strstr(uri, "/jobs/"))
+  {
+    request = ippNewRequest(IPP_CREATE_JOB_SUBSCRIPTION);
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
+  }
+  else
+  {
+    request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION);
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
+                 uri);
+  }
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
+
+  ippAddStrings(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events",
+                num_events, NULL, events);
+  ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD,
+               "notify-pull-method", NULL, "ippget");
+
+  response = cupsDoRequest(http, request, uri);
+  if (cupsLastError() >= IPP_BAD_REQUEST)
+  {
+    fprintf(stderr, "Create-%s-Subscription: %s\n",
+            strstr(uri, "/jobs") ? "Job" : "Printer", cupsLastErrorString());
+    ippDelete(response);
+    httpClose(http);
+    return (1);
+  }
+
+  if ((attr = ippFindAttribute(response, "notify-subscription-id",
+                               IPP_TAG_INTEGER)) == NULL)
+  {
+    fputs("ERROR: No notify-subscription-id in response!\n", stderr);
+    ippDelete(response);
+    httpClose(http);
+    return (1);
+  }
+
+  subscription_id = attr->values[0].integer;
+
+  printf("Create-%s-Subscription: notify-subscription-id=%d\n",
+         strstr(uri, "/jobs/") ? "Job" : "Printer", subscription_id);
+
+  ippDelete(response);
+
+ /*
+  * Monitor for events...
+  */
+
+  sequence_number = 0;
+
+  while (!terminate)
+  {
+   /*
+    * Get the current events...
+    */
+
+    printf("\nGet-Notifications(%d,%d):", subscription_id, sequence_number);
+    fflush(stdout);
+
+    request = ippNewRequest(IPP_GET_NOTIFICATIONS);
+
+    if (strstr(uri, "/jobs/"))
+      ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
+    else
+      ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
+                   uri);
+
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                 "requesting-user-name", NULL, cupsUser());
+
+    ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                  "notify-subscription-ids", subscription_id);
+    if (sequence_number)
+      ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                    "notify-sequence-numbers", sequence_number + 1);
+
+    response = cupsDoRequest(http, request, uri);
+
+    printf(" %s\n", ippErrorString(cupsLastError()));
+
+    if (cupsLastError() >= IPP_BAD_REQUEST)
+      fprintf(stderr, "Get-Notifications: %s\n", cupsLastErrorString());
+    else if (response)
+    {
+      print_attributes(response, 0);
+
+      for (attr = ippFindAttribute(response, "notify-sequence-number",
+                                   IPP_TAG_INTEGER);
+           attr;
+          attr = ippFindNextAttribute(response, "notify-sequence-number",
+                                      IPP_TAG_INTEGER))
+        if (attr->values[0].integer > sequence_number)
+         sequence_number = attr->values[0].integer;
+    }
+
+    if ((attr = ippFindAttribute(response, "notify-get-interval",
+                                 IPP_TAG_INTEGER)) != NULL &&
+        attr->values[0].integer > 0)
+      interval = attr->values[0].integer;
+    else
+      interval = 5;
+
+    ippDelete(response);
+    sleep(interval);
+  }
+
+ /*
+  * Cancel the subscription...
+  */
+
+  printf("\nCancel-Subscription:");
+  fflush(stdout);
+
+  request = ippNewRequest(IPP_CANCEL_SUBSCRIPTION);
+
+  if (strstr(uri, "/jobs/"))
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
+  else
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL,
+                 uri);
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, cupsUser());
+
+  ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                "notify-subscription-id", subscription_id);
+
+  ippDelete(cupsDoRequest(http, request, uri));
+
+  printf(" %s\n", ippErrorString(cupsLastError()));
+
+  if (cupsLastError() >= IPP_BAD_REQUEST)
+    fprintf(stderr, "Cancel-Subscription: %s\n", cupsLastErrorString());
+
+ /*
+  * Close the connection and return...
+  */
+
+  httpClose(http);
+
+  return (0);
+}
+
+
+/*
+ * 'print_attributes()' - Print the attributes in a request...
+ */
+
+void
+print_attributes(ipp_t *ipp,           /* I - IPP request */
+                 int   indent)         /* I - Indentation */
+{
+  int                  i;              /* Looping var */
+  ipp_tag_t            group;          /* Current group */
+  ipp_attribute_t      *attr;          /* Current attribute */
+  ipp_value_t          *val;           /* Current value */
+  static const char * const tags[] =   /* Value/group tag strings */
+                       {
+                         "reserved-00",
+                         "operation-attributes-tag",
+                         "job-attributes-tag",
+                         "end-of-attributes-tag",
+                         "printer-attributes-tag",
+                         "unsupported-attributes-tag",
+                         "subscription-attributes-tag",
+                         "event-attributes-tag",
+                         "reserved-08",
+                         "reserved-09",
+                         "reserved-0A",
+                         "reserved-0B",
+                         "reserved-0C",
+                         "reserved-0D",
+                         "reserved-0E",
+                         "reserved-0F",
+                         "unsupported",
+                         "default",
+                         "unknown",
+                         "no-value",
+                         "reserved-14",
+                         "not-settable",
+                         "delete-attr",
+                         "admin-define",
+                         "reserved-18",
+                         "reserved-19",
+                         "reserved-1A",
+                         "reserved-1B",
+                         "reserved-1C",
+                         "reserved-1D",
+                         "reserved-1E",
+                         "reserved-1F",
+                         "reserved-20",
+                         "integer",
+                         "boolean",
+                         "enum",
+                         "reserved-24",
+                         "reserved-25",
+                         "reserved-26",
+                         "reserved-27",
+                         "reserved-28",
+                         "reserved-29",
+                         "reserved-2a",
+                         "reserved-2b",
+                         "reserved-2c",
+                         "reserved-2d",
+                         "reserved-2e",
+                         "reserved-2f",
+                         "octetString",
+                         "dateTime",
+                         "resolution",
+                         "rangeOfInteger",
+                         "begCollection",
+                         "textWithLanguage",
+                         "nameWithLanguage",
+                         "endCollection",
+                         "reserved-38",
+                         "reserved-39",
+                         "reserved-3a",
+                         "reserved-3b",
+                         "reserved-3c",
+                         "reserved-3d",
+                         "reserved-3e",
+                         "reserved-3f",
+                         "reserved-40",
+                         "textWithoutLanguage",
+                         "nameWithoutLanguage",
+                         "reserved-43",
+                         "keyword",
+                         "uri",
+                         "uriScheme",
+                         "charset",
+                         "naturalLanguage",
+                         "mimeMediaType",
+                         "memberName"
+                       };
+
+
+  for (group = IPP_TAG_ZERO, attr = ipp->attrs; attr; attr = attr->next)
+  {
+    if ((attr->group_tag == IPP_TAG_ZERO && indent <= 8) || !attr->name)
+    {
+      group = IPP_TAG_ZERO;
+      putchar('\n');
+      continue;
+    }
+
+    if (group != attr->group_tag)
+    {
+      group = attr->group_tag;
+
+      putchar('\n');
+      for (i = 4; i < indent; i ++)
+        putchar(' ');
+
+      printf("%s:\n\n", tags[group]);
+    }
+
+    for (i = 0; i < indent; i ++)
+      putchar(' ');
+
+    printf("%s (", attr->name);
+    if (attr->num_values > 1)
+      printf("1setOf ");
+    printf("%s):", tags[attr->value_tag]);
+
+    switch (attr->value_tag)
+    {
+      case IPP_TAG_ENUM :
+      case IPP_TAG_INTEGER :
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           printf(" %d", val->integer);
+          putchar('\n');
+          break;
+
+      case IPP_TAG_BOOLEAN :
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           printf(" %s", val->boolean ? "true" : "false");
+          putchar('\n');
+          break;
+
+      case IPP_TAG_RANGE :
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           printf(" %d-%d", val->range.lower, val->range.upper);
+          putchar('\n');
+          break;
+
+      case IPP_TAG_DATE :
+          {
+           time_t      vtime;          /* Date/Time value */
+           struct tm   *vdate;         /* Date info */
+           char        vstring[256];   /* Formatted time */
+
+           for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           {
+             vtime = ippDateToTime(val->date);
+             vdate = localtime(&vtime);
+             strftime(vstring, sizeof(vstring), "%c", vdate);
+             printf(" (%s)", vstring);
+           }
+          }
+          putchar('\n');
+          break;
+
+      case IPP_TAG_RESOLUTION :
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           printf(" %dx%d%s", val->resolution.xres, val->resolution.yres,
+                  val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpc");
+          putchar('\n');
+          break;
+
+      case IPP_TAG_STRING :
+      case IPP_TAG_TEXTLANG :
+      case IPP_TAG_NAMELANG :
+      case IPP_TAG_TEXT :
+      case IPP_TAG_NAME :
+      case IPP_TAG_KEYWORD :
+      case IPP_TAG_URI :
+      case IPP_TAG_URISCHEME :
+      case IPP_TAG_CHARSET :
+      case IPP_TAG_LANGUAGE :
+      case IPP_TAG_MIMETYPE :
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+           printf(" \"%s\"", val->string.text);
+          putchar('\n');
+          break;
+
+      case IPP_TAG_BEGIN_COLLECTION :
+          putchar('\n');
+
+          for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
+         {
+           if (i)
+             putchar('\n');
+           print_attributes(val->collection, indent + 4);
+         }
+          break;
+
+      default :
+          printf("UNKNOWN (%d values)\n", attr->num_values);
+          break;
+    }
+  }
+}
+
+
+/*
+ * 'sigterm_handler()' - Flag when the user hits CTRL-C...
+ */
+
+static void
+sigterm_handler(int sig)               /* I - Signal number (unused) */
+{
+  (void)sig;
+
+  terminate = 1;
+}
+
+
+/*
+ * 'usage()' - Show program usage...
+ */
+
+static void
+usage(void)
+{
+  puts("Usage: testsub [-E] [-e event ... -e eventN] [-h hostname] URI");
+  exit(0);
+}
+
+
+
+/*
+ * End of "$Id: testsub.c 5940 2006-09-11 18:30:09Z mike $".
+ */
index 5757a39a8a3a79798d59d7083a52bd8ed7a53932..f13d4b409b6a510cd41674da9fccc9a2e1eef0c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: accept.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: accept.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "accept", "disable", "enable", and "reject" commands for the Common
  *   UNIX Printing System (CUPS).
@@ -58,7 +58,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   int          cancel;                 /* Cancel jobs? */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * See what operation we're supposed to do...
@@ -288,5 +288,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: accept.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: accept.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 2d1a18d1cd910eb828643b0f04c782acd4443769..c5be12dee47441f016db9e61cd0e78ea135382ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cancel.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: cancel.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "cancel" command for the Common UNIX Printing System (CUPS).
  *
@@ -60,7 +60,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   ipp_op_t     op;                     /* Operation */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Setup to cancel individual print jobs...
@@ -392,5 +392,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: cancel.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: cancel.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 69d80ae51bb4838ac887d3cc3bbb1d66444da861..9e246b770588a4ce23e856fed1522578e394657f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupsaddsmb.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: cupsaddsmb.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "cupsaddsmb" command for the Common UNIX Printing System (CUPS).
  *
@@ -78,7 +78,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   cups_dest_t  *dests;                 /* Printers */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Parse command-line arguments...
@@ -294,5 +294,5 @@ usage(void)
 
 
 /*
- * End of "$Id: cupsaddsmb.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: cupsaddsmb.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 8ed11f9b2aa0b43383d3846755912daf909a8010..1fb3b426e40fc1b09db965c4fbb2c6d15e2de253 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupstestdsc.c 5838 2006-08-17 14:41:42Z mike $"
+ * "$Id: cupstestdsc.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   DSC test program for the Common UNIX Printing System (CUPS).
  *
@@ -65,7 +65,7 @@ main(int  argc,                               /* I - Number of command-line args */
   int          num_files;              /* Number of files tested */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Collect command-line arguments...
@@ -452,5 +452,5 @@ usage(void)
 
 
 /*
- * End of "$Id: cupstestdsc.c 5838 2006-08-17 14:41:42Z mike $".
+ * End of "$Id: cupstestdsc.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 35235f3377855bafef4af0a5138df7b7ef140d15..fceef8b48473a22805ef5b3884c8c51f659c8271 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupstestppd.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: cupstestppd.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   PPD test program for the Common UNIX Printing System (CUPS).
  *
@@ -113,7 +113,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
                                 "JCL", "PAGE", "PROLOG" };
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Display PPD files for each file listed on the command-line...
@@ -1790,5 +1790,5 @@ usage(void)
 
 
 /*
- * End of "$Id: cupstestppd.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: cupstestppd.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 8a38c67bf285bac67c57f3426ce8fd99c6c9cd40..f4658ccf9c9ea86192477309ecebd74f44b67e5b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lp.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lp.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lp" command for the Common UNIX Printing System (CUPS).
  *
@@ -117,7 +117,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     return (0);
 #endif /* __sun */
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
   silent      = 0;
   printer     = NULL;
@@ -840,5 +840,5 @@ sighandler(int s)                   /* I - Signal number */
 
 
 /*
- * End of "$Id: lp.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lp.c 5926 2006-09-05 20:45:47Z mike $".
  */
index b8e1c69caf984d1695335e0c81a189b1091cbf07..92ecc866719b7c4ce7a15138bb8a84563b1b6aa6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpadmin.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpadmin.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpadmin" command for the Common UNIX Printing System (CUPS).
  *
@@ -92,7 +92,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   cups_option_t        *options;       /* Options */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
   http        = NULL;
   printer     = NULL;
@@ -1986,5 +1986,5 @@ validate_name(const char *name)           /* I - Name to check */
 
 
 /*
- * End of "$Id: lpadmin.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpadmin.c 5926 2006-09-05 20:45:47Z mike $".
  */
index aad4b252d863af3a9d6cf99b1a39bff2fb051d47..dbbe3f63cf63a8c886b1fcc15ebf47ef8d4ccdcb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpinfo.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpinfo.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpinfo" command for the Common UNIX Printing System (CUPS).
  *
@@ -62,7 +62,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   int          long_status;            /* Long listing? */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
   http        = NULL;
   long_status = 0;
@@ -436,5 +436,5 @@ show_models(http_t *http,           /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpinfo.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpinfo.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 13534386953eb6a70f3d84cbed30d35aa85751ab..5545ddf9aebc01382b4d2a530145a2729918bf13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpmove.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpmove.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpmove" command for the Common UNIX Printing System (CUPS).
  *
@@ -66,7 +66,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
                *dest;                  /* New destination */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
   dest      = NULL;
   dests     = NULL;
@@ -235,5 +235,5 @@ move_job(http_t     *http,          /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpmove.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpmove.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 155fcb242291820a76b0630b9b795cc83e759821..3eec93def0690ccbe1f7b9346859d52b34cab793 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpoptions.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpoptions.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   Printer option program for the Common UNIX Printing System (CUPS).
  *
@@ -69,7 +69,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
                *option;                /* Current option */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Loop through the command-line arguments...
@@ -484,5 +484,5 @@ usage(void)
 
 
 /*
- * End of "$Id: lpoptions.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpoptions.c 5926 2006-09-05 20:45:47Z mike $".
  */
index f825d1e7f0eefb2b0b6afaa407cc4b160efbb7d3..8ad801fd859cf1295eecce9d191eb5f09cb37e77 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lppasswd.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lppasswd.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   MD5 password program for the Common UNIX Printing System (CUPS).
  *
@@ -102,7 +102,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Check to see if stdin, stdout, and stderr are still open...
@@ -511,5 +511,5 @@ usage(FILE *fp)             /* I - File to send usage to */
 
 
 /*
- * End of "$Id: lppasswd.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lppasswd.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 4eafb58c475978e3bfec70074ba2ada5925abd7a..d1b02f7ee963017dedc015c94c4cdda334df2c25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpstat.c 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: lpstat.c 5926 2006-09-05 20:45:47Z mike $"
  *
  *   "lpstat" command for the Common UNIX Printing System (CUPS).
  *
@@ -84,7 +84,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
   char         op;                     /* Last operation on command-line */
 
 
-  _cupsSetLocale();
+  _cupsSetLocale(argv);
 
  /*
   * Parse command-line options...
@@ -2248,5 +2248,5 @@ show_scheduler(http_t *http)      /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpstat.c 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: lpstat.c 5926 2006-09-05 20:45:47Z mike $".
  */
index 80655cd897bc59543b72eaadb08b7e10de6e9b06..2f0c757d8c9e050763b959216848b68b459229d7 100644 (file)
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Leeren" CLASS="button"></A></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">On-Line Hilfe Dokumente</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Alle Dokumente</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Alle Dokumente</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index 7ddde77b7b585d31f7af85844f77a525c38e9b47..90ccfe418dc6e54889550cb1fba6234160acb8cf 100644 (file)
@@ -6,7 +6,7 @@
 <TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
 <TR>
 <TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
-<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?verarbeitend:gestoppt}}.gif" CLASS="button" ALT=""></A>
+<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
 </TD>
 <TD VALIGN="TOP"><B>Beschreibung:</B> {printer_info}<BR>
 <B>Ort:</B> {printer_location}<BR>
index 051d5d3bae277e738786f38a113ad5b986c6b1be..5f67002e3078ce2c8d31c602c4808e9f9dc55c23 100644 (file)
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Borrar" CLASS="button"></A></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">Documentos de ayuda en línea</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Todos los documentos</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Todos los documentos</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index b1dcc930667b8d25117deb600d8a2e3a6d5b4d96..5e0f9c992fe26e471e3a73cce540f955213d301c 100644 (file)
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Clear" CLASS="button"></A></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">On-Line Help Documents</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">All Documents</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">All Documents</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index da92e23206337e6ac08835d46b850e6b9164f23f..6538c11b23e992930c8e0d26734e97dc8e7553a8 100644 (file)
@@ -12,7 +12,7 @@ TYPE="IMAGE" SRC="/images/button-search.gif" ALT="検索"></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">オンラインヘルプドキュメント</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">すべてのドキュメント</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">すべてのドキュメント</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index 0b585f6ec433773de21fcb771c8f1485109bb6ec..0227a02db9667ee390b5ae2b6ff2dbb2a185a1af 100644 (file)
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Wyczyść" CLASS="button"></A></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">Dokumenty pomocy on-line</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Wszystkie dokumenty</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Wszystkie dokumenty</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index a5ac33d950a300d75c715144d5ed5fb49e03c951..5b6975b3b135da4dbc72681caa18691d4bcbb0c8 100644 (file)
@@ -1,15 +1,15 @@
 <P>{?which_jobs=?<A
-HREF="{?printer_name=?/zadania:{printer_uri_supported}}?which_jobs=completed"><IMG
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
 SRC="/images/button-show-completed.gif" CLASS="button" ALT="Wyświetl zakończone zadania"></A>
-<A HREF="{?printer_name=?/zadania:{printer_uri_supported}}?which_jobs=all"><IMG
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
 SRC="/images/button-show-all.gif" CLASS="button" ALT="Wyświetl wszystkie zadania">:{which_jobs=all?<A
-HREF="{?printer_name=?/zadania:{printer_uri_supported}}?which_jobs=completed"><IMG
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
 SRC="/images/button-show-completed.gif" CLASS="button" ALT="Wyświetl zakończone zadania"></A>
-<A HREF="{?printer_name=?/zadania:{printer_uri_supported}}"><IMG
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
 SRC="/images/button-show-active.gif" CLASS="button" ALT="Wyświetl aktywne zadania">:<A
-HREF="{?printer_name=?/zadania:{printer_uri_supported}}"><IMG
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
 SRC="/images/button-show-active.gif" CLASS="button" ALT="Wyświetl aktywne zadania"></A>
-<A HREF="{?printer_name=?/zadania:{printer_uri_supported}}?which_jobs=all"><IMG
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
 SRC="/images/button-show-all.gif" CLASS="button" ALT="Wyświetl wszystkie zadania">}}</A></P>
 
 <P ALIGN="CENTER">{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?active:{which_jobs=all?:zakończonych}} zadań{total=1?:}}.</P>
index 262f47c13d27b78f836b865b683a4bb2d93a90f9..79502c610be19382937e3138ba7abbc40d28932e 100644 (file)
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Töm" CLASS="button"></A></P>
 <DIV CLASS="sidebar">
 <H3 CLASS="title">Hjälpdokument</H3>
 
-<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Alla dokument</A></P>
+<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Alla dokument</A></P>
 <HR>
 
 {[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
index 2c0715e1fa1363c702596625ae15926e6bec444a..5d8ac84771862f143c518513be6998e39a1da303 100755 (executable)
@@ -53,7 +53,7 @@ rm -f /etc/xinetd.d/cups-lpd
 launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
 launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0
 launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
-launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist
+launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist || exit 0
 EOF
 else
        cat >$pkgdir/Resources/postflight <<EOF