-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
/*
- * "$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).
*
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);
/*
* 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...
*/
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());
/*
- * 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 $".
*/
/*
- * "$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).
*
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;
/*
- * 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 $".
*/
/*
- * "$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).
*
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...
/*
- * 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 $".
*/
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
/*
- * "$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).
*
*params; /* Pointer to parameters */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Connect to the scheduler...
/*
- * 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 $".
*/
/*
- * "$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).
*
cups_dest_t *dests; /* Destinations */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Check for command-line options...
/*
- * 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 $".
*/
/*
- * "$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).
*
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
deletefile = 0;
printer = NULL;
/*
- * 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 $".
*/
/*
- * "$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).
*
http_encryption_t encryption; /* Encryption? */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Setup to cancel individual print jobs...
/*
- * 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 $".
*/
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
/*
- * "$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
*sptr++ = *qptr++;
}
+ *sptr = '\0';
+
/*
* For "word1 AND word2", add reciprocal "word2 AND word1"...
*/
/*
- * 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 $".
*/
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
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'`"
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
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).
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*)
CUPS_DEFAULT_PRINTCAP="/etc/printcap"
;;
esac
+ else
+ CUPS_DEFAULT_PRINTCAP="$default_printcap"
fi
else
CUPS_DEFAULT_PRINTCAP=""
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
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
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
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
/*
- * "$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).
{
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? */
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"))
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") ||
/*
- * 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 $".
*/
/*
- * "$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).
*
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...
/*
- * 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 $".
*/
/*
- * "$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).
*
* 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
#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 $".
*/
* Try reading an entry that is not "." or ".."...
*/
- do
+ for (;;)
{
if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
{
}
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));
+ }
}
/*
- * "$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).
*
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));
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...
/*
- * 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 $".
*/
/*
- * "$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).
*
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;
}
httpFlushWrite(http);
}
- if ((length + http->wused) < sizeof(http->wbuffer))
+ if ((length + http->wused) <= sizeof(http->wbuffer))
{
/*
* Write to buffer...
/*
- * 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 $".
*/
/*
- * "$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).
*
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
}
#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 $".
*/
/*
- * "$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).
*
* _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.
*/
/*
/*
- * '_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 */
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 $".
*/
/*
- * "$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).
*
*ptr = '\0';
}
- else
- {
- /*
- * Default to UTF-8...
- */
-
- strcpy(charset, "UTF8");
- }
/*
* Get the locale for messages from the LC_MESSAGES locale setting...
}
#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
/*
- * 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 $".
*/
<PRE CLASS="command">
<Class name>
...
- ErrorPolicy cancel-job
+ ErrorPolicy abort-job
</Class>
</PRE>
<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
<PRE CLASS="command">
<Printer name>
...
- ErrorPolicy cancel-job
+ ErrorPolicy abort-job
</Printer>
</PRE>
<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
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
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
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
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
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
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
/*
- * "$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).
*
top = size->top;
strlcpy(h->cupsPageSizeName, size->name, sizeof(h->cupsPageSizeName));
+
+ h->cupsPageSize[0] = size->width;
+ h->cupsPageSize[1] = size->length;
}
else
{
/*
- * 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 $".
*/
.\"
-.\" "$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).
.\"
.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
.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 $".
.\"
.\"
-.\" "$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).
.\"
.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
.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 $".
.\"
.\"
-.\" "$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).
.\"
.br
Specifies the device URI for a printer.
.TP 5
-ErrorPolicy cancel-job
+ErrorPolicy abort-job
.TP 5
ErrorPolicy retry-job
.TP 5
.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 $".
.\"
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
#
-# "$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
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
# 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
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
%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 $".
#
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
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
#
-# "$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).
#
testlpd.o \
testmime.o \
testspeed.o \
+ testsub.o \
util.o
TARGETS = \
cupsd \
testdirsvc \
testlpd \
testmime \
- testspeed
+ testspeed \
+ testsub
#
$(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...
#
#
-# End of "$Id: Makefile 5868 2006-08-23 19:39:39Z mike $".
+# End of "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $".
#
/*
- * "$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).
*
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
/*
- * 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 $".
*/
/*
- * "$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).
*
* 'free_banners()' - Free all banners.
*/
-void
+static void
free_banners(void)
{
cupsd_banner_t *temp; /* Current banner */
/*
- * 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 $".
*/
/*
- * "$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.
*
* '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);
}
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
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))
{
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
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
httpPrintf(HTTP(con), "\r\n");
- cupsdFlushHeader(con);
+
+ if (cupsdFlushHeader(con) < 0)
+ return (cupsdCloseClient(con));
}
}
if (httpPrintf(HTTP(con), "\r\n") < 0)
return (cupsdCloseClient(con));
- cupsdFlushHeader(con);
+ if (cupsdFlushHeader(con) < 0)
+ return (cupsdCloseClient(con));
cupsdLogRequest(con, HTTP_OK);
}
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;
else if (httpPrintf(HTTP(con), "\r\n") < 0)
return (0);
- cupsdFlushHeader(con);
+ if (cupsdFlushHeader(con) < 0)
+ return (0);
con->http.state = HTTP_WAITING;
* 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)
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)
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)
{
return (0);
}
}
-
- con->sent_header = 1;
}
if (strncasecmp(buf, "Status:", 7))
{
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;
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);
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;
/*
- * 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 $".
*/
/*
- * "$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.
*
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);
/*
- * 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 $".
*/
/*
- * "$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).
*
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 */
/*
- * 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 $".
*/
/*
- * "$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.
*
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;
}
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;
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!"));
* 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,
cupsdLoadJob(job);
- if (!job->attrs ||job->num_files == 0)
+ if (!job->attrs || job->num_files == 0)
{
/*
* Nope - return a "not possible" error...
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;
}
}
/*
- * 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 $".
*/
/*
- * "$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).
*
*/
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);
* 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);
/*
* 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();
"Job canceled because the destination printer/class has "
"gone away.");
- cupsdCancelJob(job, 1);
+ cupsdCancelJob(job, 1, IPP_JOB_ABORTED);
}
else if (printer)
{
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);
}
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.
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
"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
{
*/
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 :
* Cancel the job...
*/
- cupsdCancelJob(job, 0);
+ cupsdCancelJob(job, 0, IPP_JOB_CANCELED);
break;
case CUPS_BACKEND_HOLD :
*/
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 :
*/
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,
* 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();
}
}
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();
}
}
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;
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,
{
cupsdSetPrinterReasons(job->printer, message);
cupsdAddPrinterHistory(job->printer);
+ event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
}
else if (loglevel == CUPSD_LOG_ATTR)
{
cupsdSetString(&job->printer->recoverable, ptr);
cupsdAddPrinterHistory(job->printer);
+ event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
}
else if (!strncmp(message, "recovered:", 10))
{
cupsdSetString(&job->printer->recoverable, ptr);
cupsdAddPrinterHistory(job->printer);
+ event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
}
#endif /* __APPLE__ */
else if (loglevel <= CUPSD_LOG_INFO)
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)
{
/*
cupsArrayAdd(Jobs, job);
if (job->state_value <= IPP_JOB_STOPPED)
- cupsArrayAdd(ActiveJobs,job);
+ cupsArrayAdd(ActiveJobs, job);
else
unload_job(job);
}
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;
}
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;
}
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;
}
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;
}
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;
}
/*
- * 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 $".
*/
/*
- * "$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.
*
*/
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);
/*
- * 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 $".
*/
/*
- * "$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.
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...
}
cupsdSetEnv("CUPS_ENCRYPTION", encryptions[LocalEncryption]);
- cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
+
+ if (LocalPort)
+ cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
/*
* Resume listening for connections...
/*
- * 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 $".
*/
/*
- * "$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).
*
job->state_value = IPP_JOB_PENDING;
cupsdSaveJob(job);
+
+ cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
+ "Job stopped due to printer being paused");
}
}
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)
cupsArrayRestore(Printers);
continue;
}
- else if (!(p->type & CUPS_PRINTER_REMOTE))
- cupsdSetPrinterAttrs(p);
/*
* Update the operation policy pointer...
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);
}
}
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);
}
/*
- * 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 $".
*/
/*
- * "$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).
*
if (attr->values[0].integer < curtime)
{
if (JobAutoPurge)
- cupsdCancelJob(job, 1);
+ cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
continue;
}
* '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 */
{
* '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 */
{
/*
- * 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 $".
*/
--- /dev/null
+/*
+ * "$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 $".
+ */
/*
- * "$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).
int cancel; /* Cancel jobs? */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* See what operation we're supposed to do...
/*
- * 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 $".
*/
/*
- * "$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).
*
ipp_op_t op; /* Operation */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Setup to cancel individual print jobs...
/*
- * 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 $".
*/
/*
- * "$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).
*
cups_dest_t *dests; /* Printers */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Parse command-line arguments...
/*
- * 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 $".
*/
/*
- * "$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).
*
int num_files; /* Number of files tested */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Collect command-line arguments...
/*
- * 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 $".
*/
/*
- * "$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).
*
"JCL", "PAGE", "PROLOG" };
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Display PPD files for each file listed on the command-line...
/*
- * 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 $".
*/
/*
- * "$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).
*
return (0);
#endif /* __sun */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
silent = 0;
printer = NULL;
/*
- * 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 $".
*/
/*
- * "$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).
*
cups_option_t *options; /* Options */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
http = NULL;
printer = NULL;
/*
- * 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 $".
*/
/*
- * "$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).
*
int long_status; /* Long listing? */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
http = NULL;
long_status = 0;
/*
- * 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 $".
*/
/*
- * "$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).
*
*dest; /* New destination */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
dest = NULL;
dests = NULL;
/*
- * 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 $".
*/
/*
- * "$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).
*
*option; /* Current option */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Loop through the command-line arguments...
/*
- * 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 $".
*/
/*
- * "$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).
*
#endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Check to see if stdin, stdout, and stderr are still open...
/*
- * 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 $".
*/
/*
- * "$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).
*
char op; /* Last operation on command-line */
- _cupsSetLocale();
+ _cupsSetLocale(argv);
/*
* Parse command-line options...
/*
- * 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 $".
*/
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
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