Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 13fab1a074 |
+1
-44
@@ -1,49 +1,6 @@
|
||||
CHANGES.txt - 2006-09-21
|
||||
CHANGES.txt - 2006-08-29
|
||||
------------------------
|
||||
|
||||
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
|
||||
|
||||
+7
-19
@@ -855,15 +855,15 @@ main(int argc, /* I - Number of command-line args */
|
||||
num_options, &options);
|
||||
}
|
||||
|
||||
if (copies_sup && version > 0)
|
||||
if (copies_sup)
|
||||
{
|
||||
/*
|
||||
* Only send options if the destination printer supports the copies
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
cupsEncodeOptions(request, num_options, options);
|
||||
@@ -877,7 +877,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
/*
|
||||
* If copies aren't supported, then we are likely dealing with an HP
|
||||
* JetDirect. The HP IPP implementation seems to close the connection
|
||||
* after every request - that is, it does *not* implement HTTP Keep-
|
||||
* after every request (that is, it does *not* implement HTTP Keep-
|
||||
* Alive, which is REQUIRED by HTTP/1.1...
|
||||
*/
|
||||
|
||||
@@ -908,18 +908,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
fputs("INFO: Printer is busy; retrying print job...\n", stderr);
|
||||
sleep(10);
|
||||
}
|
||||
else if ((ipp_status == IPP_BAD_REQUEST ||
|
||||
ipp_status == IPP_VERSION_NOT_SUPPORTED) && version == 1)
|
||||
{
|
||||
/*
|
||||
* Switch to IPP/1.0...
|
||||
*/
|
||||
|
||||
fputs("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n",
|
||||
stderr);
|
||||
version = 0;
|
||||
httpReconnect(http);
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "ERROR: Print file was not accepted (%s)!\n",
|
||||
cupsLastErrorString());
|
||||
|
||||
+4
-6
@@ -1728,14 +1728,12 @@ probe_device(snmp_cache_t *device) /* I - Device */
|
||||
debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
|
||||
|
||||
if (device->make_and_model &&
|
||||
(!strncasecmp(device->make_and_model, "Kyocera", 7) ||
|
||||
!strncasecmp(device->make_and_model, "Lexmark", 7) ||
|
||||
!strncasecmp(device->make_and_model, "Tektronix", 9) ||
|
||||
!strncasecmp(device->make_and_model, "Xerox", 5)))
|
||||
(!strncasecmp(device->make_and_model, "Xerox", 5) ||
|
||||
!strncasecmp(device->make_and_model, "Kyocera", 7)))
|
||||
{
|
||||
/*
|
||||
* Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
|
||||
* IPP probes, so exclude them from the IPP connection test...
|
||||
* Xerox and Kyocera printers often lock up on IPP probes, so exclude
|
||||
* them from the IPP connection test...
|
||||
*/
|
||||
|
||||
http = NULL;
|
||||
|
||||
@@ -340,7 +340,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
FD_ZERO(&input);
|
||||
FD_SET(device_fd, &input);
|
||||
|
||||
#ifdef __hpux
|
||||
if (select(device_fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
|
||||
#else
|
||||
if (select(device_fd + 1, &input, NULL, NULL, &timeout) > 0)
|
||||
#endif /* __hpux */
|
||||
{
|
||||
/*
|
||||
* Grab the data coming back and spit it out to stderr...
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
|
||||
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/transcode.h ../cups/debug.h ../cups/string.h
|
||||
lpc.o: ../config.h
|
||||
lpc.o: ../cups/i18n.h ../cups/debug.h ../cups/string.h ../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/transcode.h
|
||||
lpq.o: ../cups/debug.h
|
||||
lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../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 ../cups/transcode.h
|
||||
lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
lprm.o: ../cups/i18n.h ../cups/string.h ../config.h
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*params; /* Pointer to parameters */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Connect to the scheduler...
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
cups_dest_t *dests; /* Destinations */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Check for command-line options...
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
deletefile = 0;
|
||||
printer = NULL;
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
http_encryption_t encryption; /* Encryption? */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Setup to cancel individual print jobs...
|
||||
|
||||
+11
-13
@@ -3,49 +3,47 @@
|
||||
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/transcode.h ../cups/string.h ../config.h
|
||||
help-index.o: ../cups/dir.h
|
||||
help-index.o: ../cups/i18n.h ../cups/string.h ../config.h ../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/transcode.h ../cups/string.h ../config.h
|
||||
html.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
ipp-var.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
search.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
template.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
var.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
admin.o: ../cups/adminutil.h ../cups/cups.h ../cups/file.h
|
||||
admin.o: ../cups/i18n.h ../cups/string.h ../config.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/transcode.h ../cups/string.h ../config.h
|
||||
classes.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
help.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
jobs.o: ../cups/i18n.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/transcode.h ../cups/string.h ../config.h
|
||||
printers.o: ../cups/i18n.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
|
||||
|
||||
+1
-3
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Search routines for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
* Copyright 1997-2005 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
* property of Easy Software Products and are protected by Federal
|
||||
@@ -225,8 +225,6 @@ cgiCompileSearch(const char *query) /* I - Query string */
|
||||
*sptr++ = *qptr++;
|
||||
}
|
||||
|
||||
*sptr = '\0';
|
||||
|
||||
/*
|
||||
* For "word1 AND word2", add reciprocal "word2 AND word1"...
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 5930 2006-09-07 19:49:34Z mike $"
|
||||
dnl "$Id: cups-common.m4 5843 2006-08-17 18:49:31Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -29,7 +29,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Versio number information...
|
||||
CUPS_VERSION="1.2.4"
|
||||
CUPS_VERSION="1.2.3"
|
||||
CUPS_REVISION=""
|
||||
if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -265,5 +265,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 5930 2006-09-07 19:49:34Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 5843 2006-08-17 18:49:31Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 5804 2006-08-04 16:51:58Z mike $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for the Common UNIX Printing System
|
||||
dnl (CUPS).
|
||||
@@ -225,7 +225,7 @@ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
|
||||
default_printcap="$withval",
|
||||
default_printcap="default")
|
||||
|
||||
if test x$default_printcap != xno; then
|
||||
if test x$enable_printcap != xno -a x$default_printcap != xno; then
|
||||
if test "x$default_printcap" = "xdefault"; then
|
||||
case $uname in
|
||||
Darwin*)
|
||||
@@ -242,8 +242,6 @@ if test x$default_printcap != xno; then
|
||||
CUPS_DEFAULT_PRINTCAP="/etc/printcap"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
CUPS_DEFAULT_PRINTCAP="$default_printcap"
|
||||
fi
|
||||
else
|
||||
CUPS_DEFAULT_PRINTCAP=""
|
||||
@@ -252,5 +250,5 @@ fi
|
||||
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 5980 2006-09-21 19:01:55Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 5804 2006-08-04 16:51:58Z mike $".
|
||||
dnl
|
||||
|
||||
+3
-3
@@ -82,7 +82,7 @@ transcode.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
|
||||
transcode.o: i18n.h transcode.h debug.h
|
||||
usersys.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
|
||||
usersys.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
|
||||
usersys.o: transcode.h debug.h
|
||||
usersys.o: transcode.h
|
||||
util.o: globals.h string.h ../config.h http-private.h http.h md5.h
|
||||
util.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
|
||||
util.o: transcode.h debug.h
|
||||
@@ -180,7 +180,7 @@ transcode.32.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
|
||||
transcode.32.o: transcode.c i18n.h transcode.h debug.h
|
||||
usersys.32.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
|
||||
usersys.32.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
|
||||
usersys.32.o: usersys.c transcode.h debug.h
|
||||
usersys.32.o: usersys.c transcode.h
|
||||
util.32.o: util.c globals.h string.h ../config.h http-private.h http.h md5.h
|
||||
util.32.o: util.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
|
||||
util.32.o: util.c transcode.h debug.h
|
||||
@@ -278,7 +278,7 @@ transcode.64.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
|
||||
transcode.64.o: transcode.c i18n.h transcode.h debug.h
|
||||
usersys.64.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
|
||||
usersys.64.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
|
||||
usersys.64.o: usersys.c transcode.h debug.h
|
||||
usersys.64.o: usersys.c transcode.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
|
||||
|
||||
+3
-20
@@ -953,8 +953,6 @@ _cupsAdminSetServerSettings(
|
||||
{
|
||||
int i; /* Looping var */
|
||||
http_status_t status; /* GET/PUT status */
|
||||
const char *server_port_env; /* SERVER_PORT env var */
|
||||
int server_port; /* IPP port for server */
|
||||
cups_file_t *cupsd; /* cupsd.conf file */
|
||||
char cupsdconf[1024]; /* cupsd.conf filename */
|
||||
int remote; /* Remote cupsd.conf file? */
|
||||
@@ -1088,17 +1086,6 @@ _cupsAdminSetServerSettings(
|
||||
wrote_root_location = 0;
|
||||
indent = 0;
|
||||
|
||||
if ((server_port_env = getenv("SERVER_PORT")) != NULL)
|
||||
{
|
||||
if ((server_port = atoi(server_port_env)) <= 0)
|
||||
server_port = ippPort();
|
||||
}
|
||||
else
|
||||
server_port = ippPort();
|
||||
|
||||
if (server_port <= 0)
|
||||
server_port = IPP_PORT;
|
||||
|
||||
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
|
||||
{
|
||||
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
|
||||
@@ -1110,24 +1097,20 @@ _cupsAdminSetServerSettings(
|
||||
if (share_printers || remote_admin)
|
||||
{
|
||||
cupsFilePuts(temp, "# Allow remote access\n");
|
||||
cupsFilePrintf(temp, "Port %d\n", server_port);
|
||||
cupsFilePrintf(temp, "Port %d\n", ippPort());
|
||||
}
|
||||
else
|
||||
{
|
||||
cupsFilePuts(temp, "# Only listen for connections from the local "
|
||||
"machine.\n");
|
||||
cupsFilePrintf(temp, "Listen localhost:%d\n", server_port);
|
||||
cupsFilePrintf(temp, "Listen localhost:%d\n", ippPort());
|
||||
}
|
||||
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
if ((!value || strcmp(CUPS_DEFAULT_DOMAINSOCKET, value)) &&
|
||||
!access(CUPS_DEFAULT_DOMAINSOCKET, 0))
|
||||
if (!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") ||
|
||||
|
||||
@@ -81,8 +81,6 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
|
||||
http, method, resource));
|
||||
DEBUG_printf(("cupsDoAuthentication: digest_tries=%d, userpass=\"%s\"\n",
|
||||
http->digest_tries, http->userpass));
|
||||
DEBUG_printf(("cupsDoAuthentication: WWW-Authenticate=\"%s\"\n",
|
||||
httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)));
|
||||
|
||||
/*
|
||||
* Clear the current authentication string...
|
||||
|
||||
+2
-2
@@ -61,10 +61,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0204
|
||||
# define CUPS_VERSION 1.0203
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 2
|
||||
# define CUPS_VERSION_PATCH 4
|
||||
# define CUPS_VERSION_PATCH 3
|
||||
# define CUPS_DATE_ANY -1
|
||||
|
||||
|
||||
|
||||
+22
-25
@@ -366,7 +366,7 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
|
||||
* Try reading an entry that is not "." or ".."...
|
||||
*/
|
||||
|
||||
for (;;)
|
||||
do
|
||||
{
|
||||
if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
|
||||
{
|
||||
@@ -381,31 +381,28 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
|
||||
}
|
||||
|
||||
DEBUG_printf((" readdir_r() returned \"%s\"...\n", entry->d_name));
|
||||
|
||||
if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Copy the name over and get the file information...
|
||||
*/
|
||||
|
||||
strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
|
||||
|
||||
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)));
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the entry...
|
||||
*/
|
||||
|
||||
return (&(dp->entry));
|
||||
}
|
||||
while (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."));
|
||||
|
||||
/*
|
||||
* Copy the name over and get the file information...
|
||||
*/
|
||||
|
||||
strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the entry...
|
||||
*/
|
||||
|
||||
return (&(dp->entry));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-4
@@ -391,8 +391,8 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
|
||||
title = ptr + 1;
|
||||
|
||||
/*
|
||||
* Replace double quotes with single quotes and 8-bit characters with
|
||||
* question marks so that the title does not cause a PJL syntax error.
|
||||
* Replace double quotes with single quotes so that the title
|
||||
* does not cause a PJL syntax error.
|
||||
*/
|
||||
|
||||
strlcpy(temp, title, sizeof(temp));
|
||||
@@ -400,8 +400,6 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
|
||||
for (ptr = temp; *ptr; ptr ++)
|
||||
if (*ptr == '\"')
|
||||
*ptr = '\'';
|
||||
else if (*ptr & 128)
|
||||
*ptr = '?';
|
||||
|
||||
/*
|
||||
* Send PJL JOB and PJL RDYMSG commands before we enter PostScript mode...
|
||||
|
||||
+2
-5
@@ -222,10 +222,7 @@ httpClearFields(http_t *http) /* I - HTTP connection */
|
||||
if (http)
|
||||
{
|
||||
memset(http->fields, 0, sizeof(http->fields));
|
||||
if (http->hostname[0] == '/')
|
||||
httpSetField(http, HTTP_FIELD_HOST, "localhost");
|
||||
else
|
||||
httpSetField(http, HTTP_FIELD_HOST, http->hostname);
|
||||
httpSetField(http, HTTP_FIELD_HOST, http->hostname);
|
||||
|
||||
http->expect = (http_status_t)0;
|
||||
}
|
||||
@@ -1896,7 +1893,7 @@ httpWrite2(http_t *http, /* I - HTTP connection */
|
||||
httpFlushWrite(http);
|
||||
}
|
||||
|
||||
if ((length + http->wused) <= sizeof(http->wbuffer))
|
||||
if ((length + http->wused) < sizeof(http->wbuffer))
|
||||
{
|
||||
/*
|
||||
* Write to buffer...
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ extern const char *_cupsLangString(cups_lang_t *lang, const char *message);
|
||||
extern void _cupsMessageFree(cups_array_t *a);
|
||||
extern cups_array_t *_cupsMessageLoad(const char *filename);
|
||||
extern const char *_cupsMessageLookup(cups_array_t *a, const char *m);
|
||||
extern void _cupsSetLocale(char *argv[]);
|
||||
extern void _cupsSetLocale(void);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
+5
-44
@@ -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 and transcode the command-line.
|
||||
* _cupsSetLocale() - Set the current locale.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -140,18 +140,15 @@ _cupsLangPuts(FILE *fp, /* I - File to write to */
|
||||
|
||||
|
||||
/*
|
||||
* '_cupsSetLocale()' - Set the current locale and transcode the command-line.
|
||||
* '_cupsSetLocale()' - Set the current locale.
|
||||
*/
|
||||
|
||||
void
|
||||
_cupsSetLocale(char *argv[]) /* IO - Command-line arguments */
|
||||
_cupsSetLocale(void)
|
||||
{
|
||||
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 */
|
||||
|
||||
@@ -184,42 +181,6 @@ _cupsSetLocale(char *argv[]) /* IO - Command-line arguments */
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-7
@@ -406,6 +406,14 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
|
||||
*ptr = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Default to UTF-8...
|
||||
*/
|
||||
|
||||
strcpy(charset, "UTF8");
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the locale for messages from the LC_MESSAGES locale setting...
|
||||
@@ -465,13 +473,6 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
}
|
||||
#endif /* CODESET */
|
||||
|
||||
/*
|
||||
* If we don't have a character set by now, default to UTF-8...
|
||||
*/
|
||||
|
||||
if (!charset[0])
|
||||
strcpy(charset, "UTF8");
|
||||
|
||||
/*
|
||||
* Parse the language string passed in to a locale string. "C" is the
|
||||
* standard POSIX locale and is copied unchanged. Otherwise the
|
||||
|
||||
@@ -162,7 +162,7 @@ HREF="#AllowUser"><CODE>AllowUser</CODE></A></P>
|
||||
<PRE CLASS="command">
|
||||
<Class name>
|
||||
...
|
||||
ErrorPolicy abort-job
|
||||
ErrorPolicy cancel-job
|
||||
</Class>
|
||||
</PRE>
|
||||
|
||||
@@ -181,7 +181,7 @@ error policy:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><CODE>abort-job</CODE> - Abort the job and proceed
|
||||
<LI><CODE>cancel-job</CODE> - Cancel the job and proceed
|
||||
with the next job in the queue</LI>
|
||||
|
||||
<LI><CODE>retry-job</CODE> - Retry the job after waiting
|
||||
|
||||
@@ -169,7 +169,7 @@ section.</P>
|
||||
<PRE CLASS="command">
|
||||
<Printer name>
|
||||
...
|
||||
ErrorPolicy abort-job
|
||||
ErrorPolicy cancel-job
|
||||
</Printer>
|
||||
</PRE>
|
||||
|
||||
@@ -188,7 +188,7 @@ error policy:</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><CODE>abort-job</CODE> - Abort the job and proceed
|
||||
<LI><CODE>cancel-job</CODE> - Cancel the job and proceed
|
||||
with the next job in the queue</LI>
|
||||
|
||||
<LI><CODE>retry-job</CODE> - Retry the job after waiting
|
||||
|
||||
+12
-12
@@ -90,7 +90,7 @@ interpret.o: ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h
|
||||
interpret.o: ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
raster.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.o: ../cups/debug.h ../cups/string.h ../config.h
|
||||
raster.o: ../cups/string.h ../config.h
|
||||
form-main.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
|
||||
form-main.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
|
||||
form-main.o: ../cups/language.h ../cups/language.h ../cups/string.h
|
||||
@@ -118,9 +118,9 @@ pstops.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
pstops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
pstops.o: ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
|
||||
pstops.o: ../cups/array.h
|
||||
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
|
||||
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
|
||||
rastertoepson.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
rastertoepson.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
|
||||
rastertoepson.o: ../cups/language.h ../cups/ppd.h ../cups/string.h
|
||||
@@ -237,7 +237,7 @@ interpret.32.o: interpret.c ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/
|
||||
interpret.32.o: interpret.c ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.32.o: raster.c raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
raster.32.o: raster.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.32.o: raster.c ../cups/debug.h ../cups/string.h ../config.h
|
||||
raster.32.o: raster.c ../cups/string.h ../config.h
|
||||
form-main.32.o: form-main.c form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
|
||||
form-main.32.o: form-main.c ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
|
||||
form-main.32.o: form-main.c ../cups/language.h ../cups/language.h ../cups/string.h
|
||||
@@ -265,9 +265,9 @@ pstops.32.o: pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../c
|
||||
pstops.32.o: pstops.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
pstops.32.o: pstops.c ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
|
||||
pstops.32.o: pstops.c ../cups/array.h
|
||||
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
|
||||
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
|
||||
rastertoepson.32.o: rastertoepson.c ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
rastertoepson.32.o: rastertoepson.c ../cups/ppd.h ../cups/array.h ../cups/file.h
|
||||
rastertoepson.32.o: rastertoepson.c ../cups/language.h ../cups/ppd.h ../cups/string.h
|
||||
@@ -384,7 +384,7 @@ interpret.64.o: interpret.c ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/
|
||||
interpret.64.o: interpret.c ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.64.o: raster.c raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
raster.64.o: raster.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
raster.64.o: raster.c ../cups/debug.h ../cups/string.h ../config.h
|
||||
raster.64.o: raster.c ../cups/string.h ../config.h
|
||||
form-main.64.o: form-main.c form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
|
||||
form-main.64.o: form-main.c ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
|
||||
form-main.64.o: form-main.c ../cups/language.h ../cups/language.h ../cups/string.h
|
||||
@@ -412,9 +412,9 @@ pstops.64.o: pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../c
|
||||
pstops.64.o: pstops.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
pstops.64.o: pstops.c ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
|
||||
pstops.64.o: pstops.c ../cups/array.h
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -200,9 +200,6 @@ cupsRasterInterpretPPD(
|
||||
top = size->top;
|
||||
|
||||
strlcpy(h->cupsPageSizeName, size->name, sizeof(h->cupsPageSizeName));
|
||||
|
||||
h->cupsPageSize[0] = size->width;
|
||||
h->cupsPageSize[1] = size->length;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $"
|
||||
.\" "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $"
|
||||
.\"
|
||||
.\" classes.conf man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -56,7 +56,7 @@ DenyUser [ user @group ... ]
|
||||
.br
|
||||
Prevents specific users and groups from printing to the printer.
|
||||
.TP 5
|
||||
ErrorPolicy abort-job
|
||||
ErrorPolicy cancel-job
|
||||
.TP 5
|
||||
ErrorPolicy retry-job
|
||||
.TP 5
|
||||
@@ -123,5 +123,5 @@ http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
|
||||
.\"
|
||||
.\" End of "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $".
|
||||
.\" End of "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $".
|
||||
.\"
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $"
|
||||
.\" "$Id: lpadmin.man 5736 2006-07-13 19:59:36Z mike $"
|
||||
.\"
|
||||
.\" lpadmin man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -127,7 +127,7 @@ Sets the binary communications program to use when printing,
|
||||
.br
|
||||
Sets the error policy to be used when the printer backend is
|
||||
unable to send the job to the printer. The name must be one of
|
||||
"abort-job", "retry-job" or "stop-printer". The default error
|
||||
"cancel-job", "retry-job" or "stop-printer". The default error
|
||||
policy is "stop-printer".
|
||||
.TP 5
|
||||
-o printer-is-shared=true/false
|
||||
@@ -205,5 +205,5 @@ http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
|
||||
.\"
|
||||
.\" End of "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $".
|
||||
.\" End of "$Id: lpadmin.man 5736 2006-07-13 19:59:36Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $"
|
||||
.\" "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $"
|
||||
.\"
|
||||
.\" printers.conf man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -60,7 +60,7 @@ DeviceURI uri
|
||||
.br
|
||||
Specifies the device URI for a printer.
|
||||
.TP 5
|
||||
ErrorPolicy abort-job
|
||||
ErrorPolicy cancel-job
|
||||
.TP 5
|
||||
ErrorPolicy retry-job
|
||||
.TP 5
|
||||
@@ -127,5 +127,5 @@ http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
|
||||
.\"
|
||||
.\" End of "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $".
|
||||
.\" End of "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
mailto.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
mailto.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
mailto.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
|
||||
mailto.o: ../cups/i18n.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
|
||||
|
||||
@@ -29,12 +29,7 @@
|
||||
%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
|
||||
@@ -369,10 +364,8 @@ f 0644 root sys $DATADIR/banners/standard data/standard
|
||||
f 0644 root sys $DATADIR/banners/topsecret data/topsecret
|
||||
f 0644 root sys $DATADIR/banners/unclassified data/unclassified
|
||||
|
||||
d 0755 root sys $DATADIR/charmaps -
|
||||
f 0644 root sys $DATADIR/charmaps data/*.txt
|
||||
|
||||
d 0755 root sys $DATADIR/charsets -
|
||||
f 0644 root sys $DATADIR/charsets data/*.txt
|
||||
f 0644 root sys $DATADIR/charsets/windows-874 data/windows-874
|
||||
f 0644 root sys $DATADIR/charsets/windows-1250 data/windows-1250
|
||||
f 0644 root sys $DATADIR/charsets/windows-1251 data/windows-1251
|
||||
@@ -450,12 +443,7 @@ c 0644 root sys $PAMDIR/cups conf/@PAMFILE@
|
||||
# Developer files
|
||||
f 0755 root sys $BINDIR/cups-config cups-config
|
||||
d 0755 root sys $INCLUDEDIR/cups -
|
||||
f 0644 root sys $INCLUDEDIR/cups/adminutil.h cups/adminutil.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/array.h cups/array.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/backend.h cups/backend.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/cups.h cups/cups.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/dir.h cups/dir.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/file.h cups/file.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/http.h cups/http.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/image.h filter/image.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/ipp.h cups/ipp.h
|
||||
@@ -463,7 +451,6 @@ f 0644 root sys $INCLUDEDIR/cups/language.h cups/language.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/md5.h cups/md5.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/ppd.h cups/ppd.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/raster.h filter/raster.h
|
||||
f 0644 root sys $INCLUDEDIR/cups/transcode.h cups/transcode.h
|
||||
|
||||
%if INSTALLSTATIC
|
||||
f 0644 root sys $LIBDIR/libcups.a cups/libcups.a
|
||||
|
||||
@@ -91,6 +91,51 @@ PSTokenizer.o: ../config.h PSTokenizer.h gtypes.h
|
||||
SecurityHandler.o: ../config.h GString.h PDFDoc.h XRef.h gtypes.h Object.h
|
||||
SecurityHandler.o: gmem.h Array.h Dict.h Stream.h Catalog.h Page.h Decrypt.h
|
||||
SecurityHandler.o: Error.h GlobalParams.h CharTypes.h SecurityHandler.h
|
||||
SplashBitmap.o: ../config.h gmem.h SplashErrorCodes.h SplashBitmap.h
|
||||
SplashBitmap.o: SplashTypes.h gtypes.h
|
||||
SplashClip.o: ../config.h gmem.h SplashErrorCodes.h SplashMath.h
|
||||
SplashClip.o: SplashTypes.h gtypes.h SplashPath.h SplashXPath.h
|
||||
SplashClip.o: SplashXPathScanner.h SplashClip.h
|
||||
Splash.o: ../config.h gmem.h SplashErrorCodes.h SplashMath.h SplashTypes.h
|
||||
Splash.o: gtypes.h SplashBitmap.h SplashState.h SplashPath.h SplashXPath.h
|
||||
Splash.o: SplashXPathScanner.h SplashPattern.h SplashScreen.h SplashFont.h
|
||||
Splash.o: SplashGlyphBitmap.h Splash.h SplashClip.h
|
||||
SplashFont.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
|
||||
SplashFont.o: SplashGlyphBitmap.h SplashFontFile.h SplashFont.h
|
||||
SplashFontEngine.o: ../config.h gmem.h GString.h SplashT1FontEngine.h
|
||||
SplashFontEngine.o: SplashFTFontEngine.h SplashFontFile.h gtypes.h
|
||||
SplashFontEngine.o: SplashTypes.h SplashFontFileID.h SplashFont.h
|
||||
SplashFontEngine.o: SplashFontEngine.h
|
||||
SplashFontFile.o: ../config.h GString.h SplashFontFile.h gtypes.h
|
||||
SplashFontFile.o: SplashTypes.h SplashFontFileID.h
|
||||
SplashFontFileID.o: ../config.h SplashFontFileID.h gtypes.h
|
||||
SplashFTFont.o: ../config.h
|
||||
SplashFTFontEngine.o: ../config.h
|
||||
SplashFTFontFile.o: ../config.h
|
||||
SplashOutputDev.o: ../config.h gfile.h gtypes.h GlobalParams.h CharTypes.h
|
||||
SplashOutputDev.o: Error.h Object.h gmem.h GString.h Array.h Dict.h Stream.h
|
||||
SplashOutputDev.o: GfxFont.h Link.h CharCodeToUnicode.h FontEncodingTables.h
|
||||
SplashOutputDev.o: FoFiTrueType.h FoFiBase.h SplashBitmap.h SplashTypes.h
|
||||
SplashOutputDev.o: SplashGlyphBitmap.h SplashPattern.h SplashScreen.h
|
||||
SplashOutputDev.o: SplashPath.h SplashState.h SplashErrorCodes.h
|
||||
SplashOutputDev.o: SplashFontEngine.h SplashFont.h SplashFontFile.h
|
||||
SplashOutputDev.o: SplashFontFileID.h Splash.h SplashClip.h SplashOutputDev.h
|
||||
SplashOutputDev.o: OutputDev.h GfxState.h Function.h
|
||||
SplashPath.o: ../config.h gmem.h SplashErrorCodes.h SplashPath.h
|
||||
SplashPath.o: SplashTypes.h gtypes.h
|
||||
SplashPattern.o: ../config.h SplashMath.h SplashTypes.h gtypes.h
|
||||
SplashPattern.o: SplashScreen.h SplashPattern.h
|
||||
SplashScreen.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
|
||||
SplashScreen.o: SplashScreen.h
|
||||
SplashState.o: ../config.h gmem.h SplashPattern.h SplashTypes.h gtypes.h
|
||||
SplashState.o: SplashScreen.h SplashClip.h SplashState.h
|
||||
SplashT1Font.o: ../config.h
|
||||
SplashT1FontEngine.o: ../config.h
|
||||
SplashT1FontFile.o: ../config.h
|
||||
SplashXPath.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
|
||||
SplashXPath.o: SplashPath.h SplashXPath.h
|
||||
SplashXPathScanner.o: ../config.h gmem.h SplashMath.h SplashTypes.h gtypes.h
|
||||
SplashXPathScanner.o: SplashXPath.h SplashXPathScanner.h
|
||||
Stream.o: ../config.h gmem.h gfile.h gtypes.h Error.h Object.h GString.h
|
||||
Stream.o: Array.h Dict.h Stream.h Lexer.h Decrypt.h GfxState.h Function.h
|
||||
Stream.o: JBIG2Stream.h JPXStream.h Stream-CCITT.h
|
||||
|
||||
@@ -204,9 +204,6 @@ testmime.o: ../cups/file.h ../cups/dir.h
|
||||
testspeed.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
testspeed.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
testspeed.o: ../cups/language.h ../cups/debug.h
|
||||
testsub.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
testsub.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
testsub.o: ../cups/debug.h ../cups/string.h ../config.h
|
||||
util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
|
||||
util.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
|
||||
util.o: ../cups/file.h ../cups/string.h ../config.h
|
||||
|
||||
+1
-13
@@ -62,7 +62,6 @@ OBJS = \
|
||||
testlpd.o \
|
||||
testmime.o \
|
||||
testspeed.o \
|
||||
testsub.o \
|
||||
util.o
|
||||
TARGETS = \
|
||||
cupsd \
|
||||
@@ -74,8 +73,7 @@ TARGETS = \
|
||||
testdirsvc \
|
||||
testlpd \
|
||||
testmime \
|
||||
testspeed \
|
||||
testsub
|
||||
testspeed
|
||||
|
||||
|
||||
#
|
||||
@@ -284,16 +282,6 @@ testspeed: testspeed.o ../cups/libcups.a
|
||||
$(COMMONLIBS) $(LIBZ) $(SSLLIBS)
|
||||
|
||||
|
||||
#
|
||||
# Make the test program, "testsub".
|
||||
#
|
||||
|
||||
testsub: testsub.o ../cups/libcups.a
|
||||
echo Linking $@...
|
||||
$(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
|
||||
$(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
|
||||
|
||||
|
||||
#
|
||||
# Dependencies...
|
||||
#
|
||||
|
||||
+2
-2
@@ -482,13 +482,13 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
|
||||
strlcpy(data.username, username, sizeof(data.username));
|
||||
strlcpy(data.password, password, sizeof(data.password));
|
||||
|
||||
# if defined(__sun) || defined(__hpux)
|
||||
# ifdef __sun
|
||||
pamdata.conv = (int (*)(int, struct pam_message **,
|
||||
struct pam_response **,
|
||||
void *))pam_func;
|
||||
# else
|
||||
pamdata.conv = pam_func;
|
||||
# endif /* __sun || __hpux */
|
||||
# endif /* __sun */
|
||||
pamdata.appdata_ptr = &data;
|
||||
|
||||
# ifdef __hpux
|
||||
|
||||
@@ -195,7 +195,7 @@ compare_banners(
|
||||
* 'free_banners()' - Free all banners.
|
||||
*/
|
||||
|
||||
static void
|
||||
void
|
||||
free_banners(void)
|
||||
{
|
||||
cupsd_banner_t *temp; /* Current banner */
|
||||
|
||||
+32
-48
@@ -678,14 +678,12 @@ cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */
|
||||
* 'cupsdFlushHeader()' - Flush the header fields to the client.
|
||||
*/
|
||||
|
||||
int /* I - Bytes written or -1 on error */
|
||||
void
|
||||
cupsdFlushHeader(cupsd_client_t *con) /* I - Client to flush to */
|
||||
{
|
||||
int bytes = httpFlushWrite(HTTP(con));
|
||||
httpFlushWrite(HTTP(con));
|
||||
|
||||
con->http.data_encoding = HTTP_ENCODE_LENGTH;
|
||||
|
||||
return (bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,9 +1038,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
|
||||
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
|
||||
httpPrintf(HTTP(con), "\r\n");
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
encrypt_client(con);
|
||||
#else
|
||||
@@ -1057,9 +1053,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST, PUT\r\n");
|
||||
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
|
||||
httpPrintf(HTTP(con), "\r\n");
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
}
|
||||
else if (!is_path_absolute(con->uri))
|
||||
{
|
||||
@@ -1087,9 +1081,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
|
||||
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
|
||||
httpPrintf(HTTP(con), "\r\n");
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
encrypt_client(con);
|
||||
#else
|
||||
@@ -1130,9 +1122,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
|
||||
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
|
||||
httpPrintf(HTTP(con), "\r\n");
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1566,8 +1556,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
if (httpPrintf(HTTP(con), "\r\n") < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
cupsdLogRequest(con, HTTP_OK);
|
||||
}
|
||||
@@ -1632,8 +1621,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
|
||||
if (httpPrintf(HTTP(con), "\r\n") < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (cupsdCloseClient(con));
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
con->http.state = HTTP_WAITING;
|
||||
break;
|
||||
@@ -2108,8 +2096,7 @@ cupsdSendError(cupsd_client_t *con, /* I - Connection */
|
||||
else if (httpPrintf(HTTP(con), "\r\n") < 0)
|
||||
return (0);
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (0);
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
con->http.state = HTTP_WAITING;
|
||||
|
||||
@@ -2130,16 +2117,6 @@ cupsdSendHeader(cupsd_client_t *con, /* I - Client to send to */
|
||||
* Send the HTTP status header...
|
||||
*/
|
||||
|
||||
if (code == HTTP_CONTINUE)
|
||||
{
|
||||
/*
|
||||
* 100-continue doesn't send any headers...
|
||||
*/
|
||||
|
||||
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;
|
||||
@@ -2147,6 +2124,22 @@ cupsdSendHeader(cupsd_client_t *con, /* I - Client to send to */
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if (httpPrintf(HTTP(con), "Date: %s\r\n", httpGetDateString(time(NULL))) < 0)
|
||||
return (0);
|
||||
if (ServerHeader)
|
||||
@@ -2269,7 +2262,7 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
|
||||
|
||||
if (con->response != NULL)
|
||||
{
|
||||
ipp_state = ippWrite(HTTP(con), con->response);
|
||||
ipp_state = ippWrite(&(con->http), con->response);
|
||||
bytes = ipp_state != IPP_ERROR && ipp_state != IPP_DATA;
|
||||
}
|
||||
else if ((bytes = read(con->file, buf, sizeof(buf) - 1)) > 0)
|
||||
@@ -2308,20 +2301,14 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
|
||||
if (!strncasecmp(buf, "Location:", 9))
|
||||
{
|
||||
cupsdSendHeader(con, HTTP_SEE_OTHER, NULL);
|
||||
con->sent_header = 2;
|
||||
|
||||
if (httpPrintf(HTTP(con), "Content-Length: 0\r\n") < 0)
|
||||
return (0);
|
||||
}
|
||||
else if (!strncasecmp(buf, "Status:", 7))
|
||||
{
|
||||
cupsdSendError(con, (http_status_t)atoi(buf + 7));
|
||||
con->sent_header = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
cupsdSendHeader(con, HTTP_OK, NULL);
|
||||
con->sent_header = 1;
|
||||
|
||||
if (con->http.version == HTTP_1_1)
|
||||
{
|
||||
@@ -2329,6 +2316,8 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
con->sent_header = 1;
|
||||
}
|
||||
|
||||
if (strncasecmp(buf, "Status:", 7))
|
||||
@@ -2353,11 +2342,7 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
|
||||
{
|
||||
con->got_fields = 1;
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
{
|
||||
cupsdCloseClient(con);
|
||||
return (0);
|
||||
}
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
if (con->http.version == HTTP_1_1)
|
||||
con->http.data_encoding = HTTP_ENCODE_CHUNKED;
|
||||
@@ -2415,9 +2400,9 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
|
||||
|
||||
httpFlushWrite(HTTP(con));
|
||||
|
||||
if (con->http.data_encoding == HTTP_ENCODE_CHUNKED && con->sent_header == 1)
|
||||
if (con->http.data_encoding == HTTP_ENCODE_CHUNKED)
|
||||
{
|
||||
if (httpWrite2(HTTP(con), "", 0) < 0)
|
||||
if (httpPrintf(HTTP(con), "0\r\n\r\n") < 0)
|
||||
{
|
||||
cupsdCloseClient(con);
|
||||
return (0);
|
||||
@@ -4167,8 +4152,7 @@ write_file(cupsd_client_t *con, /* I - Client connection */
|
||||
if (httpPrintf(HTTP(con), "\r\n") < 0)
|
||||
return (0);
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (0);
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
con->http.data_encoding = HTTP_ENCODE_LENGTH;
|
||||
con->http.data_remaining = filestats->st_size;
|
||||
|
||||
@@ -104,7 +104,7 @@ extern void cupsdAcceptClient(cupsd_listener_t *lis);
|
||||
extern void cupsdCloseAllClients(void);
|
||||
extern int cupsdCloseClient(cupsd_client_t *con);
|
||||
extern void cupsdDeleteAllListeners(void);
|
||||
extern int cupsdFlushHeader(cupsd_client_t *con);
|
||||
extern void cupsdFlushHeader(cupsd_client_t *con);
|
||||
extern void cupsdPauseListening(void);
|
||||
extern int cupsdProcessIPPRequest(cupsd_client_t *con);
|
||||
extern int cupsdReadClient(cupsd_client_t *con);
|
||||
|
||||
@@ -1050,9 +1050,9 @@ cupsdStartPolling(void)
|
||||
int i; /* Looping var */
|
||||
cupsd_dirsvc_poll_t *pollp; /* Current polling server */
|
||||
char polld[1024]; /* Poll daemon path */
|
||||
char sport[255]; /* Server port */
|
||||
char bport[255]; /* Browser port */
|
||||
char interval[255]; /* Poll interval */
|
||||
char sport[10]; /* Server port */
|
||||
char bport[10]; /* Browser port */
|
||||
char interval[10]; /* Poll interval */
|
||||
int statusfds[2]; /* Status pipe */
|
||||
char *argv[6]; /* Arguments */
|
||||
char *envp[100]; /* Environment */
|
||||
|
||||
+21
-15
@@ -638,11 +638,8 @@ cupsdProcessIPPRequest(
|
||||
|
||||
if (con->http.version == HTTP_1_1)
|
||||
{
|
||||
if (httpPrintf(HTTP(con), "Transfer-Encoding: chunked\r\n\r\n") < 0)
|
||||
return (0);
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (0);
|
||||
httpPrintf(HTTP(con), "Transfer-Encoding: chunked\r\n\r\n");
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
con->http.data_encoding = HTTP_ENCODE_CHUNKED;
|
||||
}
|
||||
@@ -654,12 +651,9 @@ cupsdProcessIPPRequest(
|
||||
|
||||
length = ippLength(con->response);
|
||||
|
||||
if (httpPrintf(HTTP(con), "Content-Length: " CUPS_LLFMT "\r\n\r\n",
|
||||
CUPS_LLCAST length) < 0)
|
||||
return (0);
|
||||
|
||||
if (cupsdFlushHeader(con) < 0)
|
||||
return (0);
|
||||
httpPrintf(HTTP(con), "Content-Length: " CUPS_LLFMT "\r\n\r\n",
|
||||
CUPS_LLCAST length);
|
||||
cupsdFlushHeader(con);
|
||||
|
||||
con->http.data_encoding = HTTP_ENCODE_LENGTH;
|
||||
con->http.data_remaining = length;
|
||||
@@ -1127,7 +1121,7 @@ add_file(cupsd_client_t *con, /* I - Connection to client */
|
||||
|
||||
if (!compressions || !filetypes)
|
||||
{
|
||||
cupsdCancelJob(job, 1, IPP_JOB_ABORTED);
|
||||
cupsdCancelJob(job, 1);
|
||||
|
||||
send_ipp_status(con, IPP_INTERNAL_ERROR,
|
||||
_("Unable to allocate memory for file types!"));
|
||||
@@ -3083,7 +3077,10 @@ cancel_job(cupsd_client_t *con, /* I - Client connection */
|
||||
* Cancel the job and return...
|
||||
*/
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_CANCELED);
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled by \"%s\".", username);
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
cupsdCheckJobs();
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_INFO, "Job %d was canceled by \"%s\".", jobid,
|
||||
@@ -7524,7 +7521,7 @@ restart_job(cupsd_client_t *con, /* I - Client connection */
|
||||
|
||||
cupsdLoadJob(job);
|
||||
|
||||
if (!job->attrs || job->num_files == 0)
|
||||
if (!job->attrs ||job->num_files == 0)
|
||||
{
|
||||
/*
|
||||
* Nope - return a "not possible" error...
|
||||
@@ -8414,7 +8411,16 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */
|
||||
return;
|
||||
}
|
||||
else if (con->response->request.status.status_code == IPP_OK)
|
||||
cupsdCancelJob(job, 0, (ipp_jstate_t)attr->values[0].integer);
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+82
-118
@@ -148,13 +148,11 @@ cupsdAddJob(int priority, /* I - Job priority */
|
||||
*/
|
||||
|
||||
void
|
||||
cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */
|
||||
int purge, /* I - Purge jobs? */
|
||||
ipp_jstate_t newstate) /* I - New job state */
|
||||
cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */
|
||||
int purge) /* I - Purge jobs? */
|
||||
{
|
||||
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);
|
||||
@@ -163,55 +161,18 @@ cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */
|
||||
* Stop any processes that are working on the current job...
|
||||
*/
|
||||
|
||||
printer = job->printer;
|
||||
|
||||
if (job->state_value == IPP_JOB_PROCESSING)
|
||||
cupsdStopJob(job, 0);
|
||||
|
||||
cupsdLoadJob(job);
|
||||
|
||||
if (job->attrs)
|
||||
job->state->values[0].integer = newstate;
|
||||
job->state->values[0].integer = IPP_JOB_CANCELLED;
|
||||
|
||||
job->state_value = newstate;
|
||||
job->state_value = IPP_JOB_CANCELLED;
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
@@ -309,7 +270,10 @@ cupsdCancelJobs(const char *dest, /* I - Destination to cancel */
|
||||
* Cancel all jobs matching this destination/user...
|
||||
*/
|
||||
|
||||
cupsdCancelJob(job, purge, IPP_JOB_CANCELED);
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
purge ? "Job purged." : "Job canceled.");
|
||||
|
||||
cupsdCancelJob(job, purge);
|
||||
}
|
||||
|
||||
cupsdCheckJobs();
|
||||
@@ -397,7 +361,7 @@ cupsdCheckJobs(void)
|
||||
"Job canceled because the destination printer/class has "
|
||||
"gone away.");
|
||||
|
||||
cupsdCancelJob(job, 1, IPP_JOB_ABORTED);
|
||||
cupsdCancelJob(job, 1);
|
||||
}
|
||||
else if (printer)
|
||||
{
|
||||
@@ -451,8 +415,8 @@ cupsdCleanJobs(void)
|
||||
for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
|
||||
job && cupsArrayCount(Jobs) >= MaxJobs;
|
||||
job = (cupsd_job_t *)cupsArrayNext(Jobs))
|
||||
if (job->state_value >= IPP_JOB_CANCELED)
|
||||
cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
|
||||
if (job->state_value >= IPP_JOB_CANCELLED)
|
||||
cupsdCancelJob(job, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -473,8 +437,7 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFinishJob: job->status is %d",
|
||||
job->status);
|
||||
|
||||
if (job->status_buffer &&
|
||||
(job->status < 0 || job->current_file >= job->num_files))
|
||||
if (job->status_buffer && job->current_file >= job->num_files)
|
||||
{
|
||||
/*
|
||||
* Close the pipe and clear the input bit.
|
||||
@@ -544,7 +507,8 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
|
||||
cupsdStopJob(job, 0);
|
||||
|
||||
if (job->dtype & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
|
||||
if (!(printer->type & CUPS_PRINTER_REMOTE) ||
|
||||
(printer->type & CUPS_PRINTER_IMPLICIT))
|
||||
{
|
||||
/*
|
||||
* Mark the job as pending again - we'll retry on another
|
||||
@@ -585,7 +549,12 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
"after %d tries.",
|
||||
job->id, JobRetryLimit);
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
|
||||
"Job canceled since it could not be sent after %d "
|
||||
"tries.",
|
||||
JobRetryLimit);
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -594,23 +563,10 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
*/
|
||||
|
||||
set_hold_until(job, time(NULL) + JobRetryInterval);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job,
|
||||
"Job held due to fax errors; please consult "
|
||||
"the error_log file for details.");
|
||||
cupsdSetPrinterState(printer, IPP_PRINTER_IDLE, 0);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(printer->error_policy, "abort-job"))
|
||||
cupsdCancelJob(job, 0, 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.");
|
||||
}
|
||||
cupsdCancelJob(job, 0);
|
||||
break;
|
||||
|
||||
case CUPS_BACKEND_CANCEL :
|
||||
@@ -618,7 +574,7 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
* Cancel the job...
|
||||
*/
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_CANCELED);
|
||||
cupsdCancelJob(job, 0);
|
||||
break;
|
||||
|
||||
case CUPS_BACKEND_HOLD :
|
||||
@@ -627,17 +583,8 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
*/
|
||||
|
||||
cupsdStopJob(job, 0);
|
||||
|
||||
cupsdSetJobHoldUntil(job, "indefinite");
|
||||
|
||||
job->state->values[0].integer = IPP_JOB_HELD;
|
||||
job->state_value = IPP_JOB_HELD;
|
||||
|
||||
cupsdSaveJob(job);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
|
||||
"Job held due to backend errors; please consult "
|
||||
"the error_log file for details.");
|
||||
break;
|
||||
|
||||
case CUPS_BACKEND_STOP :
|
||||
@@ -646,26 +593,13 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
*/
|
||||
|
||||
cupsdStopJob(job, 0);
|
||||
|
||||
job->state->values[0].integer = IPP_JOB_PENDING;
|
||||
job->state_value = IPP_JOB_PENDING;
|
||||
|
||||
cupsdSaveJob(job);
|
||||
cupsdSetPrinterState(printer, IPP_PRINTER_STOPPED, 1);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
|
||||
"Job stopped due to backend errors; please consult "
|
||||
"the error_log file for details.");
|
||||
break;
|
||||
|
||||
case CUPS_BACKEND_AUTH_REQUIRED :
|
||||
cupsdStopJob(job, 0);
|
||||
|
||||
cupsdSetJobHoldUntil(job, "authenticated");
|
||||
|
||||
job->state->values[0].integer = IPP_JOB_HELD;
|
||||
job->state_value = IPP_JOB_HELD;
|
||||
|
||||
cupsdSaveJob(job);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
|
||||
@@ -713,9 +647,28 @@ cupsdFinishJob(cupsd_job_t *job) /* I - Job */
|
||||
* Close out this job...
|
||||
*/
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
|
||||
"Job completed successfully.");
|
||||
|
||||
job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE);
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_COMPLETED);
|
||||
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, "");
|
||||
|
||||
cupsdCheckJobs();
|
||||
}
|
||||
}
|
||||
@@ -1241,22 +1194,12 @@ cupsdRestartJob(cupsd_job_t *job) /* I - Job */
|
||||
|
||||
if (job->state_value == IPP_JOB_STOPPED || job->num_files)
|
||||
{
|
||||
ipp_jstate_t old_state; /* Old job state */
|
||||
|
||||
|
||||
cupsdLoadJob(job);
|
||||
|
||||
old_state = job->state_value;
|
||||
|
||||
job->tries = 0;
|
||||
job->state->values[0].integer = IPP_JOB_PENDING;
|
||||
job->state_value = IPP_JOB_PENDING;
|
||||
|
||||
cupsdSaveJob(job);
|
||||
|
||||
if (old_state > IPP_JOB_STOPPED)
|
||||
cupsArrayAdd(ActiveJobs, job);
|
||||
|
||||
cupsdCheckJobs();
|
||||
}
|
||||
}
|
||||
@@ -1589,9 +1532,17 @@ cupsdStopJob(cupsd_job_t *job, /* I - Job */
|
||||
|
||||
FilterLevel -= job->cost;
|
||||
|
||||
if (job->printer->state == IPP_PRINTER_PROCESSING)
|
||||
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);
|
||||
|
||||
job->state->values[0].integer = IPP_JOB_STOPPED;
|
||||
job->state_value = IPP_JOB_STOPPED;
|
||||
job->printer->job = NULL;
|
||||
@@ -1681,8 +1632,7 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
int copies; /* Number of copies printed */
|
||||
char message[1024], /* Message text */
|
||||
*ptr; /* Pointer update... */
|
||||
int loglevel, /* Log level for message */
|
||||
event = 0; /* Events? */
|
||||
int loglevel; /* Log level for message */
|
||||
|
||||
|
||||
while ((ptr = cupsdStatBufUpdate(job->status_buffer, &loglevel,
|
||||
@@ -1728,7 +1678,6 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
{
|
||||
cupsdSetPrinterReasons(job->printer, message);
|
||||
cupsdAddPrinterHistory(job->printer);
|
||||
event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
|
||||
}
|
||||
else if (loglevel == CUPSD_LOG_ATTR)
|
||||
{
|
||||
@@ -1750,7 +1699,6 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
|
||||
cupsdSetString(&job->printer->recoverable, ptr);
|
||||
cupsdAddPrinterHistory(job->printer);
|
||||
event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
|
||||
}
|
||||
else if (!strncmp(message, "recovered:", 10))
|
||||
{
|
||||
@@ -1763,7 +1711,6 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
|
||||
cupsdSetString(&job->printer->recoverable, ptr);
|
||||
cupsdAddPrinterHistory(job->printer);
|
||||
event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
else if (loglevel <= CUPSD_LOG_INFO)
|
||||
@@ -1781,13 +1728,6 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
|
||||
break;
|
||||
}
|
||||
|
||||
if ((event & CUPSD_EVENT_PRINTER_STATE_CHANGED))
|
||||
cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE_CHANGED, job->printer, NULL,
|
||||
(job->printer->type & CUPS_PRINTER_CLASS) ?
|
||||
"Class \"%s\" state changed." :
|
||||
"Printer \"%s\" state changed.",
|
||||
job->printer->name);
|
||||
|
||||
if (ptr == NULL && !job->status_buffer->bufused)
|
||||
{
|
||||
/*
|
||||
@@ -2357,7 +2297,7 @@ load_request_root(void)
|
||||
cupsArrayAdd(Jobs, job);
|
||||
|
||||
if (job->state_value <= IPP_JOB_STOPPED)
|
||||
cupsArrayAdd(ActiveJobs, job);
|
||||
cupsArrayAdd(ActiveJobs,job);
|
||||
else
|
||||
unload_job(job);
|
||||
}
|
||||
@@ -2497,7 +2437,10 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "Job ID %d has no files! Canceling it!",
|
||||
job->id);
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled because it has no files.");
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2560,7 +2503,13 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
job->current_file ++;
|
||||
|
||||
if (job->current_file == job->num_files)
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
{
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled because it has no files that can be "
|
||||
"printed.");
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2637,7 +2586,13 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
job->current_file ++;
|
||||
|
||||
if (job->current_file == job->num_files)
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
{
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled because the print file could not be "
|
||||
"decompressed.");
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2663,7 +2618,13 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
job->current_file ++;
|
||||
|
||||
if (job->current_file == job->num_files)
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
{
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled because the port monitor could not be "
|
||||
"added.");
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2767,7 +2728,10 @@ start_job(cupsd_job_t *job, /* I - Job ID */
|
||||
|
||||
FilterLevel -= job->cost;
|
||||
|
||||
cupsdCancelJob(job, 0, IPP_JOB_ABORTED);
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
|
||||
"Job canceled because the server ran out of memory.");
|
||||
|
||||
cupsdCancelJob(job, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -93,8 +93,7 @@ VAR int JobRetryLimit VALUE(5),
|
||||
*/
|
||||
|
||||
extern cupsd_job_t *cupsdAddJob(int priority, const char *dest);
|
||||
extern void cupsdCancelJob(cupsd_job_t *job, int purge,
|
||||
ipp_jstate_t newstate);
|
||||
extern void cupsdCancelJob(cupsd_job_t *job, int purge);
|
||||
extern void cupsdCancelJobs(const char *dest, const char *username,
|
||||
int purge);
|
||||
extern void cupsdCheckJobs(void);
|
||||
|
||||
@@ -352,8 +352,7 @@ cupsdStartListening(void)
|
||||
if (!LocalPort && !have_domain)
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_EMERG,
|
||||
"No Listen or Port lines were found to allow access via "
|
||||
"localhost!");
|
||||
"No Listen or Port lines were found to allow access via localhost!");
|
||||
|
||||
/*
|
||||
* Commit suicide...
|
||||
@@ -387,9 +386,7 @@ cupsdStartListening(void)
|
||||
}
|
||||
|
||||
cupsdSetEnv("CUPS_ENCRYPTION", encryptions[LocalEncryption]);
|
||||
|
||||
if (LocalPort)
|
||||
cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
|
||||
cupsdSetEnvf("IPP_PORT", "%d", LocalPort);
|
||||
|
||||
/*
|
||||
* Resume listening for connections...
|
||||
|
||||
+4
-15
@@ -2386,9 +2386,6 @@ cupsdStopPrinter(cupsd_printer_t *p, /* I - Printer to stop */
|
||||
job->state_value = IPP_JOB_PENDING;
|
||||
|
||||
cupsdSaveJob(job);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
|
||||
"Job stopped due to printer being paused");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2414,10 +2411,6 @@ cupsdUpdatePrinters(void)
|
||||
p;
|
||||
p = (cupsd_printer_t *)cupsArrayNext(Printers))
|
||||
{
|
||||
/*
|
||||
* Remove remote printers if we are no longer browsing...
|
||||
*/
|
||||
|
||||
if (!Browsing && (p->type & (CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE)))
|
||||
{
|
||||
if (p->type & CUPS_PRINTER_IMPLICIT)
|
||||
@@ -2428,6 +2421,8 @@ cupsdUpdatePrinters(void)
|
||||
cupsArrayRestore(Printers);
|
||||
continue;
|
||||
}
|
||||
else if (!(p->type & CUPS_PRINTER_REMOTE))
|
||||
cupsdSetPrinterAttrs(p);
|
||||
|
||||
/*
|
||||
* Update the operation policy pointer...
|
||||
@@ -2435,13 +2430,6 @@ cupsdUpdatePrinters(void)
|
||||
|
||||
if ((p->op_policy_ptr = cupsdFindPolicy(p->op_policy)) == NULL)
|
||||
p->op_policy_ptr = DefaultPolicyPtr;
|
||||
|
||||
/*
|
||||
* Update printer attributes as needed...
|
||||
*/
|
||||
|
||||
if (!(p->type & CUPS_PRINTER_REMOTE))
|
||||
cupsdSetPrinterAttrs(p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2889,8 +2877,9 @@ add_printer_filter(
|
||||
snprintf(p->state_message, sizeof(p->state_message),
|
||||
"Filter \"%s\" for printer \"%s\" not available: %s",
|
||||
program, p->name, strerror(errno));
|
||||
cupsdSetPrinterReasons(p, "+cups-missing-filter-error");
|
||||
cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0);
|
||||
cupsdSetPrinterReasons(p, "+cups-missing-filter-error");
|
||||
cupsdAddPrinterHistory(p);
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ cupsdUpdateQuota(
|
||||
if (attr->values[0].integer < curtime)
|
||||
{
|
||||
if (JobAutoPurge)
|
||||
cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
|
||||
cupsdCancelJob(job, 1);
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ cupsdUpdateQuota(
|
||||
* 'add_quota()' - Add a quota record for this printer and user.
|
||||
*/
|
||||
|
||||
static cupsd_quota_t * /* O - Quota data */
|
||||
cupsd_quota_t * /* O - Quota data */
|
||||
add_quota(cupsd_printer_t *p, /* I - Printer */
|
||||
const char *username) /* I - User */
|
||||
{
|
||||
@@ -209,7 +209,7 @@ compare_quotas(const cupsd_quota_t *q1, /* I - First quota record */
|
||||
* 'find_quota()' - Find a quota record.
|
||||
*/
|
||||
|
||||
static cupsd_quota_t * /* O - Quota data */
|
||||
cupsd_quota_t * /* O - Quota data */
|
||||
find_quota(cupsd_printer_t *p, /* I - Printer */
|
||||
const char *username) /* I - User */
|
||||
{
|
||||
|
||||
@@ -1,531 +0,0 @@
|
||||
/*
|
||||
* "$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@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$".
|
||||
*/
|
||||
+1
-1
@@ -58,7 +58,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
int cancel; /* Cancel jobs? */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* See what operation we're supposed to do...
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
ipp_op_t op; /* Operation */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Setup to cancel individual print jobs...
|
||||
|
||||
@@ -78,7 +78,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
cups_dest_t *dests; /* Printers */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Parse command-line arguments...
|
||||
|
||||
@@ -65,7 +65,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
int num_files; /* Number of files tested */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Collect command-line arguments...
|
||||
|
||||
@@ -113,7 +113,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
"JCL", "PAGE", "PROLOG" };
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Display PPD files for each file listed on the command-line...
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
return (0);
|
||||
#endif /* __sun */
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
silent = 0;
|
||||
printer = NULL;
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
cups_option_t *options; /* Options */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
http = NULL;
|
||||
printer = NULL;
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
int long_status; /* Long listing? */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
http = NULL;
|
||||
long_status = 0;
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*dest; /* New destination */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
dest = NULL;
|
||||
dests = NULL;
|
||||
|
||||
@@ -69,7 +69,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*option; /* Current option */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Loop through the command-line arguments...
|
||||
|
||||
@@ -102,7 +102,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
#endif /* HAVE_SIGACTION && !HAVE_SIGSET*/
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Check to see if stdin, stdout, and stderr are still open...
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
char op; /* Last operation on command-line */
|
||||
|
||||
|
||||
_cupsSetLocale(argv);
|
||||
_cupsSetLocale();
|
||||
|
||||
/*
|
||||
* Parse command-line options...
|
||||
|
||||
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Leeren" CLASS="button"></A></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">On-Line Hilfe Dokumente</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Alle Dokumente</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Alle Dokumente</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
|
||||
<TR>
|
||||
<TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
|
||||
<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
|
||||
<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?verarbeitend:gestoppt}}.gif" CLASS="button" ALT=""></A>
|
||||
</TD>
|
||||
<TD VALIGN="TOP"><B>Beschreibung:</B> {printer_info}<BR>
|
||||
<B>Ort:</B> {printer_location}<BR>
|
||||
|
||||
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Borrar" CLASS="button"></A></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">Documentos de ayuda en línea</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Todos los documentos</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Todos los documentos</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Clear" CLASS="button"></A></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">On-Line Help Documents</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">All Documents</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">All Documents</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
@@ -12,7 +12,7 @@ TYPE="IMAGE" SRC="/images/button-search.gif" ALT="検索"></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">オンラインヘルプドキュメント</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">すべてのドキュメント</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">すべてのドキュメント</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Wyczyść" CLASS="button"></A></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">Dokumenty pomocy on-line</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Wszystkie dokumenty</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Wszystkie dokumenty</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<P>{?which_jobs=?<A
|
||||
HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
|
||||
HREF="{?printer_name=?/zadania:{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=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
|
||||
<A HREF="{?printer_name=?/zadania:{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=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
|
||||
HREF="{?printer_name=?/zadania:{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=?/jobs:{printer_uri_supported}}"><IMG
|
||||
<A HREF="{?printer_name=?/zadania:{printer_uri_supported}}"><IMG
|
||||
SRC="/images/button-show-active.gif" CLASS="button" ALT="Wyświetl aktywne zadania">:<A
|
||||
HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
|
||||
HREF="{?printer_name=?/zadania:{printer_uri_supported}}"><IMG
|
||||
SRC="/images/button-show-active.gif" CLASS="button" ALT="Wyświetl aktywne zadania"></A>
|
||||
<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
|
||||
<A HREF="{?printer_name=?/zadania:{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>
|
||||
|
||||
@@ -14,7 +14,7 @@ SRC="/images/button-clear.gif" ALT="Töm" CLASS="button"></A></P>
|
||||
<DIV CLASS="sidebar">
|
||||
<H3 CLASS="title">Hjälpdokument</H3>
|
||||
|
||||
<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Alla dokument</A></P>
|
||||
<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">Alla dokument</A></P>
|
||||
<HR>
|
||||
|
||||
{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ rm -f /etc/xinetd.d/cups-lpd
|
||||
launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0
|
||||
launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0
|
||||
launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
|
||||
launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist || exit 0
|
||||
launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist
|
||||
EOF
|
||||
else
|
||||
cat >$pkgdir/Resources/postflight <<EOF
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário