[Pkg-cups-devel] r363 - in cupsys/branches/cups-1.2/debian: .
patches
Kenshi Muto
kmuto at costa.debian.org
Thu Sep 14 15:29:13 UTC 2006
Author: kmuto
Date: Thu Sep 14 15:29:11 2006
New Revision: 363
Added:
cupsys/branches/cups-1.2/debian/patches/00_r5958.dpatch (contents, props changed)
Modified:
cupsys/branches/cups-1.2/debian/changelog
cupsys/branches/cups-1.2/debian/patches/00list
Log:
r5958 patch
Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog (original)
+++ cupsys/branches/cups-1.2/debian/changelog Thu Sep 14 15:29:11 2006
@@ -7,6 +7,9 @@
* debian/patches/44_fixconfdirperms.dpatch: Fix file mode specification:
3755 -> 03755 (regression of svn commit 353).
+ [ Kenshi Muto ]
+ * Apply upstream svn r5958.
+
-- Kenshi Muto <kmuto at debian.org> Fri, 8 Sep 2006 11:28:12 +0200
cupsys (1.2.2-2) unstable; urgency=high
Added: cupsys/branches/cups-1.2/debian/patches/00_r5958.dpatch
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2/debian/patches/00_r5958.dpatch Thu Sep 14 15:29:11 2006
@@ -0,0 +1,1667 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 00_r5958.dpatch by Kenshi Muto <kmuto at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys-1.2.3~/CHANGES.txt cupsys-1.2.3/CHANGES.txt
+--- cupsys-1.2.3~/CHANGES.txt 2006-08-30 02:18:28.000000000 +0000
++++ cupsys-1.2.3/CHANGES.txt 2006-09-14 15:16:34.000000000 +0000
+@@ -1,6 +1,32 @@
+-CHANGES.txt - 2006-08-29
++CHANGES.txt - 2006-09-13
+ ------------------------
+
++CHANGES IN CUPS V1.2.4
++
++ - 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
+diff -urNad cupsys-1.2.3~/backend/ipp.c cupsys-1.2.3/backend/ipp.c
+--- cupsys-1.2.3~/backend/ipp.c 2006-08-24 21:44:35.000000000 +0000
++++ cupsys-1.2.3/backend/ipp.c 2006-09-14 15:16:31.000000000 +0000
+@@ -855,15 +855,15 @@
+ 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 @@
+ /*
+ * 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 @@
+ 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());
+diff -urNad cupsys-1.2.3~/backend/socket.c cupsys-1.2.3/backend/socket.c
+--- cupsys-1.2.3~/backend/socket.c 2006-05-26 19:51:59.000000000 +0000
++++ cupsys-1.2.3/backend/socket.c 2006-09-14 15:16:31.000000000 +0000
+@@ -340,11 +340,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...
+diff -urNad cupsys-1.2.3~/berkeley/lpc.c cupsys-1.2.3/berkeley/lpc.c
+--- cupsys-1.2.3~/berkeley/lpc.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/berkeley/lpc.c 2006-09-14 15:16:34.000000000 +0000
+@@ -65,7 +65,7 @@
+ *params; /* Pointer to parameters */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Connect to the scheduler...
+diff -urNad cupsys-1.2.3~/berkeley/lpq.c cupsys-1.2.3/berkeley/lpq.c
+--- cupsys-1.2.3~/berkeley/lpq.c 2006-08-17 14:41:42.000000000 +0000
++++ cupsys-1.2.3/berkeley/lpq.c 2006-09-14 15:16:34.000000000 +0000
+@@ -78,7 +78,7 @@
+ cups_dest_t *dests; /* Destinations */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Check for command-line options...
+diff -urNad cupsys-1.2.3~/berkeley/lpr.c cupsys-1.2.3/berkeley/lpr.c
+--- cupsys-1.2.3~/berkeley/lpr.c 2006-08-17 14:41:42.000000000 +0000
++++ cupsys-1.2.3/berkeley/lpr.c 2006-09-14 15:16:34.000000000 +0000
+@@ -93,7 +93,7 @@
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ deletefile = 0;
+ printer = NULL;
+diff -urNad cupsys-1.2.3~/berkeley/lprm.c cupsys-1.2.3/berkeley/lprm.c
+--- cupsys-1.2.3~/berkeley/lprm.c 2006-08-24 15:55:42.000000000 +0000
++++ cupsys-1.2.3/berkeley/lprm.c 2006-09-14 15:16:34.000000000 +0000
+@@ -61,7 +61,7 @@
+ http_encryption_t encryption; /* Encryption? */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Setup to cancel individual print jobs...
+diff -urNad cupsys-1.2.3~/config-scripts/cups-common.m4 cupsys-1.2.3/config-scripts/cups-common.m4
+--- cupsys-1.2.3~/config-scripts/cups-common.m4 2006-08-30 14:13:09.000000000 +0000
++++ cupsys-1.2.3/config-scripts/cups-common.m4 2006-09-14 15:17:08.000000000 +0000
+@@ -29,7 +29,7 @@
+ 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'`"
+diff -urNad cupsys-1.2.3~/cups/cups.h cupsys-1.2.3/cups/cups.h
+--- cupsys-1.2.3~/cups/cups.h 2006-08-04 16:52:31.000000000 +0000
++++ cupsys-1.2.3/cups/cups.h 2006-09-14 15:16:34.000000000 +0000
+@@ -61,10 +61,10 @@
+ * 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
+
+
+diff -urNad cupsys-1.2.3~/cups/dir.c cupsys-1.2.3/cups/dir.c
+--- cupsys-1.2.3~/cups/dir.c 2006-02-17 15:47:15.000000000 +0000
++++ cupsys-1.2.3/cups/dir.c 2006-09-14 15:16:34.000000000 +0000
+@@ -366,7 +366,7 @@
+ * Try reading an entry that is not "." or ".."...
+ */
+
+- do
++ for (;;)
+ {
+ if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
+ {
+@@ -381,28 +381,31 @@
+ }
+
+ 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));
++ }
+ }
+
+
+diff -urNad cupsys-1.2.3~/cups/emit.c cupsys-1.2.3/cups/emit.c
+--- cupsys-1.2.3~/cups/emit.c 2006-06-26 19:20:39.000000000 +0000
++++ cupsys-1.2.3/cups/emit.c 2006-09-14 15:16:34.000000000 +0000
+@@ -391,8 +391,8 @@
+ 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 @@
+ 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...
+diff -urNad cupsys-1.2.3~/cups/http.c cupsys-1.2.3/cups/http.c
+--- cupsys-1.2.3~/cups/http.c 2006-08-24 21:44:35.000000000 +0000
++++ cupsys-1.2.3/cups/http.c 2006-09-14 15:16:34.000000000 +0000
+@@ -1893,7 +1893,7 @@
+ httpFlushWrite(http);
+ }
+
+- if ((length + http->wused) < sizeof(http->wbuffer))
++ if ((length + http->wused) <= sizeof(http->wbuffer))
+ {
+ /*
+ * Write to buffer...
+diff -urNad cupsys-1.2.3~/cups/i18n.h cupsys-1.2.3/cups/i18n.h
+--- cupsys-1.2.3~/cups/i18n.h 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/cups/i18n.h 2006-09-14 15:16:34.000000000 +0000
+@@ -105,7 +105,7 @@
+ 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
+ }
+diff -urNad cupsys-1.2.3~/cups/langprintf.c cupsys-1.2.3/cups/langprintf.c
+--- cupsys-1.2.3~/cups/langprintf.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/cups/langprintf.c 2006-09-14 15:16:34.000000000 +0000
+@@ -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 @@
+
+
+ /*
+- * '_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,6 +184,42 @@
+
+ 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);
++ }
++ }
+ }
+
+
+diff -urNad cupsys-1.2.3~/filter/interpret.c cupsys-1.2.3/filter/interpret.c
+--- cupsys-1.2.3~/filter/interpret.c 2006-05-11 18:07:25.000000000 +0000
++++ cupsys-1.2.3/filter/interpret.c 2006-09-14 15:16:34.000000000 +0000
+@@ -200,6 +200,9 @@
+ top = size->top;
+
+ strlcpy(h->cupsPageSizeName, size->name, sizeof(h->cupsPageSizeName));
++
++ h->cupsPageSize[0] = size->width;
++ h->cupsPageSize[1] = size->length;
+ }
+ else
+ {
+diff -urNad cupsys-1.2.3~/packaging/cups.list.in cupsys-1.2.3/packaging/cups.list.in
+--- cupsys-1.2.3~/packaging/cups.list.in 2006-08-28 19:26:39.000000000 +0000
++++ cupsys-1.2.3/packaging/cups.list.in 2006-09-14 15:16:30.000000000 +0000
+@@ -29,7 +29,12 @@
+ %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/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
+diff -urNad cupsys-1.2.3~/scheduler/Makefile cupsys-1.2.3/scheduler/Makefile
+--- cupsys-1.2.3~/scheduler/Makefile 2006-08-23 19:39:39.000000000 +0000
++++ cupsys-1.2.3/scheduler/Makefile 2006-09-14 15:16:34.000000000 +0000
+@@ -62,6 +62,7 @@
+ testlpd.o \
+ testmime.o \
+ testspeed.o \
++ testsub.o \
+ util.o
+ TARGETS = \
+ cupsd \
+@@ -73,7 +74,8 @@
+ testdirsvc \
+ testlpd \
+ testmime \
+- testspeed
++ testspeed \
++ testsub
+
+
+ #
+@@ -283,6 +285,16 @@
+
+
+ #
++# 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...
+ #
+
+diff -urNad cupsys-1.2.3~/scheduler/auth.c cupsys-1.2.3/scheduler/auth.c
+--- cupsys-1.2.3~/scheduler/auth.c 2006-09-14 15:12:38.000000000 +0000
++++ cupsys-1.2.3/scheduler/auth.c 2006-09-14 15:16:34.000000000 +0000
+@@ -482,13 +482,13 @@
+ 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
+diff -urNad cupsys-1.2.3~/scheduler/banners.c cupsys-1.2.3/scheduler/banners.c
+--- cupsys-1.2.3~/scheduler/banners.c 2006-03-18 03:05:12.000000000 +0000
++++ cupsys-1.2.3/scheduler/banners.c 2006-09-14 15:16:34.000000000 +0000
+@@ -195,7 +195,7 @@
+ * 'free_banners()' - Free all banners.
+ */
+
+-void
++static void
+ free_banners(void)
+ {
+ cupsd_banner_t *temp; /* Current banner */
+diff -urNad cupsys-1.2.3~/scheduler/client.c cupsys-1.2.3/scheduler/client.c
+--- cupsys-1.2.3~/scheduler/client.c 2006-08-28 18:54:10.000000000 +0000
++++ cupsys-1.2.3/scheduler/client.c 2006-09-14 15:16:34.000000000 +0000
+@@ -678,12 +678,14 @@
+ * '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 @@
+ 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 @@
+ 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 @@
+ 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 @@
+
+ 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 @@
+ 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 @@
+ 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 @@
+ else if (httpPrintf(HTTP(con), "\r\n") < 0)
+ return (0);
+
+- cupsdFlushHeader(con);
++ if (cupsdFlushHeader(con) < 0)
++ return (0);
+
+ con->http.state = HTTP_WAITING;
+
+@@ -2133,11 +2146,10 @@
+
+ if (httpPrintf(HTTP(con), "\r\n") < 0)
+ return (0);
++ else if (cupsdFlushHeader(con) < 0)
++ return (0);
+ else
+- {
+- cupsdFlushHeader(con);
+ return (1);
+- }
+ }
+
+ if (httpPrintf(HTTP(con), "Date: %s\r\n", httpGetDateString(time(NULL))) < 0)
+@@ -2262,7 +2274,7 @@
+
+ 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)
+@@ -2342,7 +2354,11 @@
+ {
+ 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;
+@@ -4152,7 +4168,8 @@
+ 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;
+diff -urNad cupsys-1.2.3~/scheduler/client.h cupsys-1.2.3/scheduler/client.h
+--- cupsys-1.2.3~/scheduler/client.h 2006-08-24 21:44:35.000000000 +0000
++++ cupsys-1.2.3/scheduler/client.h 2006-09-14 15:16:34.000000000 +0000
+@@ -104,7 +104,7 @@
+ 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);
+diff -urNad cupsys-1.2.3~/scheduler/dirsvc.c cupsys-1.2.3/scheduler/dirsvc.c
+--- cupsys-1.2.3~/scheduler/dirsvc.c 2006-09-14 15:12:38.000000000 +0000
++++ cupsys-1.2.3/scheduler/dirsvc.c 2006-09-14 15:16:34.000000000 +0000
+@@ -1050,9 +1050,9 @@
+ 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 */
+diff -urNad cupsys-1.2.3~/scheduler/ipp.c cupsys-1.2.3/scheduler/ipp.c
+--- cupsys-1.2.3~/scheduler/ipp.c 2006-08-30 02:18:28.000000000 +0000
++++ cupsys-1.2.3/scheduler/ipp.c 2006-09-14 15:16:34.000000000 +0000
+@@ -638,8 +638,11 @@
+
+ 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 @@
+
+ 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;
+@@ -3077,9 +3083,6 @@
+ * Cancel the job and return...
+ */
+
+- cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
+- "Job canceled by \"%s\".", username);
+-
+ cupsdCancelJob(job, 0);
+ cupsdCheckJobs();
+
+@@ -7521,7 +7524,7 @@
+
+ cupsdLoadJob(job);
+
+- if (!job->attrs ||job->num_files == 0)
++ if (!job->attrs || job->num_files == 0)
+ {
+ /*
+ * Nope - return a "not possible" error...
+diff -urNad cupsys-1.2.3~/scheduler/job.c cupsys-1.2.3/scheduler/job.c
+--- cupsys-1.2.3~/scheduler/job.c 2006-08-24 21:44:35.000000000 +0000
++++ cupsys-1.2.3/scheduler/job.c 2006-09-14 15:16:34.000000000 +0000
+@@ -153,6 +153,7 @@
+ {
+ 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 +162,27 @@
+ * 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 = IPP_JOB_CANCELED;
+
+- job->state_value = IPP_JOB_CANCELLED;
++ job->state_value = IPP_JOB_CANCELED;
+
+ set_time(job, "time-at-completed");
+
++ /*
++ * Send any pending notifications and then expire them...
++ */
++
++ cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
++ purge ? "Job purged." : "Job canceled.");
++
+ cupsdExpireSubscriptions(NULL, job);
+
+ /*
+@@ -270,9 +280,6 @@
+ * Cancel all jobs matching this destination/user...
+ */
+
+- cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
+- purge ? "Job purged." : "Job canceled.");
+-
+ cupsdCancelJob(job, purge);
+ }
+
+@@ -415,7 +422,7 @@
+ for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
+ job && cupsArrayCount(Jobs) >= MaxJobs;
+ job = (cupsd_job_t *)cupsArrayNext(Jobs))
+- if (job->state_value >= IPP_JOB_CANCELLED)
++ if (job->state_value >= IPP_JOB_CANCELED)
+ cupsdCancelJob(job, 1);
+ }
+
+@@ -507,8 +514,7 @@
+
+ cupsdStopJob(job, 0);
+
+- if (!(printer->type & CUPS_PRINTER_REMOTE) ||
+- (printer->type & CUPS_PRINTER_IMPLICIT))
++ if (printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT))
+ {
+ /*
+ * Mark the job as pending again - we'll retry on another
+@@ -567,6 +573,8 @@
+ }
+ else if (!strcmp(printer->error_policy, "abort-job"))
+ cupsdCancelJob(job, 0);
++ else
++ cupsdSetPrinterState(printer, IPP_PRINTER_STOPPED, 1);
+ break;
+
+ case CUPS_BACKEND_CANCEL :
+@@ -583,7 +591,12 @@
+ */
+
+ cupsdStopJob(job, 0);
++
+ cupsdSetJobHoldUntil(job, "indefinite");
++
++ job->state->values[0].integer = IPP_JOB_HELD;
++ job->state_value = IPP_JOB_HELD;
++
+ cupsdSaveJob(job);
+ break;
+
+@@ -593,13 +606,22 @@
+ */
+
+ 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);
+ 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,
+@@ -1200,6 +1222,9 @@
+ job->state->values[0].integer = IPP_JOB_PENDING;
+ job->state_value = IPP_JOB_PENDING;
+ cupsdSaveJob(job);
++
++ cupsArrayAdd(ActiveJobs, job);
++
+ cupsdCheckJobs();
+ }
+ }
+@@ -1532,16 +1557,7 @@
+
+ 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)
+- cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
+-
+- cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStopJob: printer state is %d",
+- job->printer->state);
++ cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
+
+ job->state->values[0].integer = IPP_JOB_STOPPED;
+ job->state_value = IPP_JOB_STOPPED;
+@@ -2297,7 +2313,7 @@
+ cupsArrayAdd(Jobs, job);
+
+ if (job->state_value <= IPP_JOB_STOPPED)
+- cupsArrayAdd(ActiveJobs,job);
++ cupsArrayAdd(ActiveJobs, job);
+ else
+ unload_job(job);
+ }
+diff -urNad cupsys-1.2.3~/scheduler/printers.c cupsys-1.2.3/scheduler/printers.c
+--- cupsys-1.2.3~/scheduler/printers.c 2006-08-15 21:21:45.000000000 +0000
++++ cupsys-1.2.3/scheduler/printers.c 2006-09-14 15:16:34.000000000 +0000
+@@ -2877,9 +2877,8 @@
+ 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);
+ }
+diff -urNad cupsys-1.2.3~/scheduler/quotas.c cupsys-1.2.3/scheduler/quotas.c
+--- cupsys-1.2.3~/scheduler/quotas.c 2006-03-18 03:05:12.000000000 +0000
++++ cupsys-1.2.3/scheduler/quotas.c 2006-09-14 15:16:34.000000000 +0000
+@@ -166,7 +166,7 @@
+ * '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 @@
+ * '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 */
+ {
+diff -urNad cupsys-1.2.3~/scheduler/testsub.c cupsys-1.2.3/scheduler/testsub.c
+--- cupsys-1.2.3~/scheduler/testsub.c 1970-01-01 00:00:00.000000000 +0000
++++ cupsys-1.2.3/scheduler/testsub.c 2006-09-14 15:16:34.000000000 +0000
+@@ -0,0 +1,531 @@
++/*
++ * "$Id$"
++ *
++ * 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 at 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$".
++ */
+diff -urNad cupsys-1.2.3~/systemv/accept.c cupsys-1.2.3/systemv/accept.c
+--- cupsys-1.2.3~/systemv/accept.c 2006-09-14 15:12:38.000000000 +0000
++++ cupsys-1.2.3/systemv/accept.c 2006-09-14 15:16:34.000000000 +0000
+@@ -58,7 +58,7 @@
+ int cancel; /* Cancel jobs? */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * See what operation we're supposed to do...
+diff -urNad cupsys-1.2.3~/systemv/cancel.c cupsys-1.2.3/systemv/cancel.c
+--- cupsys-1.2.3~/systemv/cancel.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/cancel.c 2006-09-14 15:16:34.000000000 +0000
+@@ -60,7 +60,7 @@
+ ipp_op_t op; /* Operation */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Setup to cancel individual print jobs...
+diff -urNad cupsys-1.2.3~/systemv/cupsaddsmb.c cupsys-1.2.3/systemv/cupsaddsmb.c
+--- cupsys-1.2.3~/systemv/cupsaddsmb.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/cupsaddsmb.c 2006-09-14 15:16:34.000000000 +0000
+@@ -78,7 +78,7 @@
+ cups_dest_t *dests; /* Printers */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Parse command-line arguments...
+diff -urNad cupsys-1.2.3~/systemv/cupstestdsc.c cupsys-1.2.3/systemv/cupstestdsc.c
+--- cupsys-1.2.3~/systemv/cupstestdsc.c 2006-08-17 14:41:42.000000000 +0000
++++ cupsys-1.2.3/systemv/cupstestdsc.c 2006-09-14 15:16:34.000000000 +0000
+@@ -65,7 +65,7 @@
+ int num_files; /* Number of files tested */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Collect command-line arguments...
+diff -urNad cupsys-1.2.3~/systemv/cupstestppd.c cupsys-1.2.3/systemv/cupstestppd.c
+--- cupsys-1.2.3~/systemv/cupstestppd.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/cupstestppd.c 2006-09-14 15:16:34.000000000 +0000
+@@ -113,7 +113,7 @@
+ "JCL", "PAGE", "PROLOG" };
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Display PPD files for each file listed on the command-line...
+diff -urNad cupsys-1.2.3~/systemv/lp.c cupsys-1.2.3/systemv/lp.c
+--- cupsys-1.2.3~/systemv/lp.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lp.c 2006-09-14 15:16:34.000000000 +0000
+@@ -117,7 +117,7 @@
+ return (0);
+ #endif /* __sun */
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ silent = 0;
+ printer = NULL;
+diff -urNad cupsys-1.2.3~/systemv/lpadmin.c cupsys-1.2.3/systemv/lpadmin.c
+--- cupsys-1.2.3~/systemv/lpadmin.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lpadmin.c 2006-09-14 15:16:34.000000000 +0000
+@@ -92,7 +92,7 @@
+ cups_option_t *options; /* Options */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ http = NULL;
+ printer = NULL;
+diff -urNad cupsys-1.2.3~/systemv/lpinfo.c cupsys-1.2.3/systemv/lpinfo.c
+--- cupsys-1.2.3~/systemv/lpinfo.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lpinfo.c 2006-09-14 15:16:34.000000000 +0000
+@@ -62,7 +62,7 @@
+ int long_status; /* Long listing? */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ http = NULL;
+ long_status = 0;
+diff -urNad cupsys-1.2.3~/systemv/lpmove.c cupsys-1.2.3/systemv/lpmove.c
+--- cupsys-1.2.3~/systemv/lpmove.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lpmove.c 2006-09-14 15:16:34.000000000 +0000
+@@ -66,7 +66,7 @@
+ *dest; /* New destination */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ dest = NULL;
+ dests = NULL;
+diff -urNad cupsys-1.2.3~/systemv/lpoptions.c cupsys-1.2.3/systemv/lpoptions.c
+--- cupsys-1.2.3~/systemv/lpoptions.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lpoptions.c 2006-09-14 15:16:34.000000000 +0000
+@@ -69,7 +69,7 @@
+ *option; /* Current option */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Loop through the command-line arguments...
+diff -urNad cupsys-1.2.3~/systemv/lppasswd.c cupsys-1.2.3/systemv/lppasswd.c
+--- cupsys-1.2.3~/systemv/lppasswd.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lppasswd.c 2006-09-14 15:16:34.000000000 +0000
+@@ -102,7 +102,7 @@
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Check to see if stdin, stdout, and stderr are still open...
+diff -urNad cupsys-1.2.3~/systemv/lpstat.c cupsys-1.2.3/systemv/lpstat.c
+--- cupsys-1.2.3~/systemv/lpstat.c 2006-08-16 20:05:58.000000000 +0000
++++ cupsys-1.2.3/systemv/lpstat.c 2006-09-14 15:16:34.000000000 +0000
+@@ -84,7 +84,7 @@
+ char op; /* Last operation on command-line */
+
+
+- _cupsSetLocale();
++ _cupsSetLocale(argv);
+
+ /*
+ * Parse command-line options...
+diff -urNad cupsys-1.2.3~/templates/de/help-header.tmpl cupsys-1.2.3/templates/de/help-header.tmpl
+--- cupsys-1.2.3~/templates/de/help-header.tmpl 2006-07-18 13:45:56.000000000 +0000
++++ cupsys-1.2.3/templates/de/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -14,7 +14,7 @@
+ <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>
+diff -urNad cupsys-1.2.3~/templates/es/help-header.tmpl cupsys-1.2.3/templates/es/help-header.tmpl
+--- cupsys-1.2.3~/templates/es/help-header.tmpl 2006-03-13 13:34:24.000000000 +0000
++++ cupsys-1.2.3/templates/es/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -14,7 +14,7 @@
+ <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>
+diff -urNad cupsys-1.2.3~/templates/help-header.tmpl cupsys-1.2.3/templates/help-header.tmpl
+--- cupsys-1.2.3~/templates/help-header.tmpl 2006-03-04 02:00:43.000000000 +0000
++++ cupsys-1.2.3/templates/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -14,7 +14,7 @@
+ <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>
+diff -urNad cupsys-1.2.3~/templates/ja/help-header.tmpl cupsys-1.2.3/templates/ja/help-header.tmpl
+--- cupsys-1.2.3~/templates/ja/help-header.tmpl 2006-03-04 02:00:43.000000000 +0000
++++ cupsys-1.2.3/templates/ja/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -12,7 +12,7 @@
+ <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>
+diff -urNad cupsys-1.2.3~/templates/pl/help-header.tmpl cupsys-1.2.3/templates/pl/help-header.tmpl
+--- cupsys-1.2.3~/templates/pl/help-header.tmpl 2006-05-15 20:06:46.000000000 +0000
++++ cupsys-1.2.3/templates/pl/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -14,7 +14,7 @@
+ <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>
+diff -urNad cupsys-1.2.3~/templates/pl/jobs-header.tmpl cupsys-1.2.3/templates/pl/jobs-header.tmpl
+--- cupsys-1.2.3~/templates/pl/jobs-header.tmpl 2006-05-15 20:06:46.000000000 +0000
++++ cupsys-1.2.3/templates/pl/jobs-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -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>
+diff -urNad cupsys-1.2.3~/templates/sv/help-header.tmpl cupsys-1.2.3/templates/sv/help-header.tmpl
+--- cupsys-1.2.3~/templates/sv/help-header.tmpl 2006-04-17 14:50:45.000000000 +0000
++++ cupsys-1.2.3/templates/sv/help-header.tmpl 2006-09-14 15:16:34.000000000 +0000
+@@ -14,7 +14,7 @@
+ <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>
Modified: cupsys/branches/cups-1.2/debian/patches/00list
==============================================================================
--- cupsys/branches/cups-1.2/debian/patches/00list (original)
+++ cupsys/branches/cups-1.2/debian/patches/00list Thu Sep 14 15:29:11 2006
@@ -1,3 +1,4 @@
+00_r5958.dpatch
02_configure.dpatch
#03_manext.dpatch
03_clean.dpatch
More information about the Pkg-cups-devel
mailing list