-CHANGES.txt - 2.1.2 - 2015-12-02
+CHANGES.txt - 2.1.3 - 2016-02-05
--------------------------------
+CHANGES IN CUPS V2.1.3
+
+ - The default password function did not work on some platforms
+ (STR #4750)
+ - The scheduler should not exit under memory pressure
+ (<rdar://problem/23255001>)
+ - The EPL2 and ZPL sample drivers did not properly support the CutMedia
+ option.
+ - Pending subscriptions would prevent the scheduler from idle exiting
+ (STR #4754)
+ - Fixed some issues in ipptool for skipped tests
+ (<rdar://problem/24137160>)
+ - The "lp -H resume" command did not reset the "job-state-reasons"
+ attribute value (STR #4752)
+ - The scheduler did not allow access to resource files (icons, etc.)
+ when the web interface was disabled (STR #4755)
+ - Localization fix (STR #4756)
+
+
CHANGES IN CUPS V2.1.2
- Re-release of CUPS 2.1.1 as CUPS 2.1.2 due to error in tagging of the
-INSTALL - CUPS v2.1.2 - 2015-12-02
+INSTALL - CUPS v2.1.3 - 2016-02-05
----------------------------------
This file describes how to compile and install CUPS from source code. For more
-README - CUPS v2.1.2 - 2015-12-02
+README - CUPS v2.1.3 - 2016-02-05
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt" instead...
/*
- * "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $"
+ * "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $"
*
* Line Printer Daemon backend for CUPS.
*
*/
memset(&addr, 0, sizeof(addr));
- addr.addr.sa_family = family;
+ addr.addr.sa_family = (sa_family_t)family;
/*
* Try to bind the socket to a reserved port...
/*
- * End of "$Id: lpd.c 12024 2014-07-15 12:58:39Z msweet $".
+ * End of "$Id: lpd.c 13040 2016-01-11 20:29:13Z msweet $".
*/
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION=2.1.2
+CUPS_VERSION=2.1.3
case "$CUPS_VERSION" in
*svn)
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for CUPS 2.1.2.
+# Generated by GNU Autoconf 2.68 for CUPS 2.1.3.
#
# Report bugs to <https://www.cups.org/str.php>.
#
# Identity of this package.
PACKAGE_NAME='CUPS'
PACKAGE_TARNAME='cups'
-PACKAGE_VERSION='2.1.2'
-PACKAGE_STRING='CUPS 2.1.2'
+PACKAGE_VERSION='2.1.3'
+PACKAGE_STRING='CUPS 2.1.3'
PACKAGE_BUGREPORT='https://www.cups.org/str.php'
PACKAGE_URL='https://www.cups.org/'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures CUPS 2.1.2 to adapt to many kinds of systems.
+\`configure' configures CUPS 2.1.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of CUPS 2.1.2:";;
+ short | recursive ) echo "Configuration of CUPS 2.1.3:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-CUPS configure 2.1.2
+CUPS configure 2.1.3
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by CUPS $as_me 2.1.2, which was
+It was created by CUPS $as_me 2.1.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION=2.1.2
+CUPS_VERSION=2.1.3
case "$CUPS_VERSION" in
*svn)
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by CUPS $as_me 2.1.2, which was
+This file was extended by CUPS $as_me 2.1.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-CUPS config.status 2.1.2
+CUPS config.status 2.1.3
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
dnl
-dnl "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $"
+dnl "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $"
dnl
dnl Configuration script for CUPS.
dnl
-dnl Copyright 2007-2015 by Apple Inc.
+dnl Copyright 2007-2016 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
AC_PREREQ(2.60)
dnl Package name and version...
-AC_INIT([CUPS], [2.1.2], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
+AC_INIT([CUPS], [2.1.3], [https://www.cups.org/str.php], [cups], [https://www.cups.org/])
sinclude(config-scripts/cups-opsys.m4)
sinclude(config-scripts/cups-common.m4)
chmod +x cups-config
dnl
-dnl End of "$Id: configure.ac 12998 2015-12-02 15:09:04Z msweet $".
+dnl End of "$Id: configure.ac 13031 2016-01-04 14:43:04Z msweet $".
dnl
/*
- * "$Id: cups.h 12998 2015-12-02 15:09:04Z msweet $"
+ * "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $"
*
* API definitions for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* Constants...
*/
-# define CUPS_VERSION 2.0102
+# define CUPS_VERSION 2.0103
# define CUPS_VERSION_MAJOR 2
# define CUPS_VERSION_MINOR 1
-# define CUPS_VERSION_PATCH 2
+# define CUPS_VERSION_PATCH 3
# define CUPS_BC_FD 3
/* Back-channel file descriptor for
#endif /* !_CUPS_CUPS_H_ */
/*
- * End of "$Id: cups.h 12998 2015-12-02 15:09:04Z msweet $".
+ * End of "$Id: cups.h 13031 2016-01-04 14:43:04Z msweet $".
*/
/*
- * "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $"
+ * "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $"
*
* User-defined destination (and option) support for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
#ifdef __APPLE__
static CFArrayRef appleCopyLocations(void);
static CFStringRef appleCopyNetwork(void);
-static char *appleGetPaperSize(char *name, int namesize);
+static char *appleGetPaperSize(char *name, size_t namesize);
static CFStringRef appleGetPrinter(CFArrayRef locations,
CFStringRef network, CFIndex *locindex);
#endif /* __APPLE__ */
*/
static char * /* O - Default paper size */
-appleGetPaperSize(char *name, /* I - Paper size name buffer */
- int namesize) /* I - Size of buffer */
+appleGetPaperSize(char *name, /* I - Paper size name buffer */
+ size_t namesize) /* I - Size of buffer */
{
CFStringRef defaultPaperID; /* Default paper ID */
pwg_media_t *pwgmedia; /* PWG media size */
defaultPaperID = _cupsAppleCopyDefaultPaperID();
if (!defaultPaperID ||
CFGetTypeID(defaultPaperID) != CFStringGetTypeID() ||
- !CFStringGetCString(defaultPaperID, name, namesize,
- kCFStringEncodingUTF8))
+ !CFStringGetCString(defaultPaperID, name, (CFIndex)namesize, kCFStringEncodingUTF8))
name[0] = '\0';
else if ((pwgmedia = pwgMediaForLegacy(name)) != NULL)
strlcpy(name, pwgmedia->pwg, namesize);
/*
- * End of "$Id: dest.c 12733 2015-06-12 01:21:05Z msweet $".
+ * End of "$Id: dest.c 13075 2016-01-29 21:14:05Z msweet $".
*/
/*
- * "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $"
+ * "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $"
*
* Option encoding routines for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
else if (*sep == ',' && !quote)
count ++;
else if (*sep == '\\' && sep[1])
- sep ++;
+ sep += 2;
}
}
else
count = 1;
- DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", count=%d",
- option->name, count));
+ DEBUG_printf(("2cupsEncodeOptions2: option=\"%s\", value=\"%s\", count=%d", option->name, option->value, count));
/*
* Allocate memory for the attribute values...
* Skip quoted character...
*/
+ memmove(sep, sep + 1, strlen(sep));
sep ++;
}
}
/*
- * End of "$Id: encode.c 12668 2015-05-27 19:30:32Z msweet $".
+ * End of "$Id: encode.c 13064 2016-01-27 16:05:09Z msweet $".
*/
/*
- * "$Id: testoptions.c 1992 2010-03-24 14:32:08Z msweet $"
+ * "$Id: testoptions.c 13061 2016-01-26 21:31:40Z msweet $"
*
- * Option test program for CUPS.
+ * Option unit test program for CUPS.
*
- * Copyright 2008-2010 by Apple Inc.
+ * Copyright 2008-2016 by Apple Inc.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. 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
- * file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. 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
+ * file is missing or damaged, see the license at "http://www.cups.org/".
*
- * This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- * main() - Test option processing functions.
+ * This file is subject to the Apple OS-Developed Software exception.
*/
/*
num_options; /* Number of options */
cups_option_t *options; /* Options */
const char *value; /* Value of an option */
+ ipp_t *request; /* IPP request */
+ ipp_attribute_t *attr; /* IPP attribute */
+ int count; /* Number of attributes */
if (argc == 1)
"baz={param1=1 param2=2} "
"foobar=FOO\\ BAR "
"barfoo=barfoo "
- "barfoo=\"\'BAR FOO\'\"", 0, &options);
+ "barfoo=\"\'BAR FOO\'\" "
+ "auth-info=user,pass\\\\,word\\\\\\\\", 0, &options);
- if (num_options != 5)
+ if (num_options != 6)
{
- printf("FAIL (num_options=%d, expected 5)\n", num_options);
+ printf("FAIL (num_options=%d, expected 6)\n", num_options);
status ++;
}
else if ((value = cupsGetOption("foo", num_options, options)) == NULL ||
printf("FAIL (barfoo=\"%s\", expected \"\'BAR FOO\'\")\n", value);
status ++;
}
+ else if ((value = cupsGetOption("auth-info", num_options, options)) == NULL ||
+ strcmp(value, "user,pass\\,word\\\\"))
+ {
+ printf("FAIL (auth-info=\"%s\", expected \"user,pass\\,word\\\\\")\n", value);
+ status ++;
+ }
+ else
+ puts("PASS");
+
+ fputs("cupsEncodeOptions2: ", stdout);
+ request = ippNew();
+ ippSetOperation(request, IPP_OP_PRINT_JOB);
+
+ cupsEncodeOptions2(request, num_options, options, IPP_TAG_JOB);
+ for (count = 0, attr = ippFirstAttribute(request); attr; attr = ippNextAttribute(request), count ++);
+ if (count != 6)
+ {
+ printf("FAIL (%d attributes, expected 6)\n", count);
+ status ++;
+ }
+ else if ((attr = ippFindAttribute(request, "foo", IPP_TAG_ZERO)) == NULL)
+ {
+ puts("FAIL (Unable to find attribute \"foo\")");
+ status ++;
+ }
+ else if (ippGetValueTag(attr) != IPP_TAG_NAME)
+ {
+ printf("FAIL (\"foo\" of type %s, expected name)\n", ippTagString(ippGetValueTag(attr)));
+ status ++;
+ }
+ else if (ippGetCount(attr) != 1)
+ {
+ printf("FAIL (\"foo\" has %d values, expected 1)\n", (int)ippGetCount(attr));
+ status ++;
+ }
+ else if (strcmp(ippGetString(attr, 0, NULL), "1234"))
+ {
+ printf("FAIL (\"foo\" has value %s, expected 1234)\n", ippGetString(attr, 0, NULL));
+ status ++;
+ }
+ else if ((attr = ippFindAttribute(request, "auth-info", IPP_TAG_ZERO)) == NULL)
+ {
+ puts("FAIL (Unable to find attribute \"auth-info\")");
+ status ++;
+ }
+ else if (ippGetValueTag(attr) != IPP_TAG_TEXT)
+ {
+ printf("FAIL (\"auth-info\" of type %s, expected text)\n", ippTagString(ippGetValueTag(attr)));
+ status ++;
+ }
+ else if (ippGetCount(attr) != 2)
+ {
+ printf("FAIL (\"auth-info\" has %d values, expected 2)\n", (int)ippGetCount(attr));
+ status ++;
+ }
+ else if (strcmp(ippGetString(attr, 0, NULL), "user"))
+ {
+ printf("FAIL (\"auth-info\"[0] has value \"%s\", expected \"user\")\n", ippGetString(attr, 0, NULL));
+ status ++;
+ }
+ else if (strcmp(ippGetString(attr, 1, NULL), "pass,word\\"))
+ {
+ printf("FAIL (\"auth-info\"[1] has value \"%s\", expected \"pass,word\\\")\n", ippGetString(attr, 1, NULL));
+ status ++;
+ }
else
puts("PASS");
}
/*
- * End of "$Id: testoptions.c 1992 2010-03-24 14:32:08Z msweet $".
+ * End of "$Id: testoptions.c 13061 2016-01-26 21:31:40Z msweet $".
*/
/*
- * "$Id: usersys.c 12817 2015-07-30 15:45:46Z msweet $"
+ * "$Id: usersys.c 13030 2016-01-04 14:35:45Z msweet $"
*
* User, system, and password routines for CUPS.
*
noecho = original;
noecho.c_lflag &= (tcflag_t)~(ICANON | ECHO | ECHOE | ISIG);
+ noecho.c_cc[VMIN] = 1;
+ noecho.c_cc[VTIME] = 0;
if (tcsetattr(tty, TCSAFLUSH, &noecho))
{
for (start = temp; *start; start = end)
{
- /*
+ /*
* Find end of keyword...
*/
/*
- * End of "$Id: usersys.c 12817 2015-07-30 15:45:46Z msweet $".
+ * End of "$Id: usersys.c 13030 2016-01-04 14:35:45Z msweet $".
*/
/*
- * "$Id: rastertolabel.c 12945 2015-10-26 19:46:02Z msweet $"
+ * "$Id: rastertolabel.c 13022 2015-12-16 18:35:26Z msweet $"
*
* Label printer filter for CUPS.
*
*/
puts("P1");
+
+ /*
+ * Cut the label as needed...
+ */
+
+ if (header->CutMedia)
+ puts("C");
break;
case ZEBRA_ZPL :
puts("^IDR:CUPS.GRF^FS");
puts("^XZ");
+
+ /*
+ * Cut the label as needed...
+ */
+
+ if (header->CutMedia)
+ puts("^CN1");
break;
case ZEBRA_CPCL :
/*
- * End of "$Id: rastertolabel.c 12945 2015-10-26 19:46:02Z msweet $".
+ * End of "$Id: rastertolabel.c 13022 2015-12-16 18:35:26Z msweet $".
*/
/*
- * "$Id: testnotify.c 10996 2013-05-29 11:51:34Z msweet $"
+ * "$Id: testnotify.c 13040 2016-01-11 20:29:13Z msweet $"
*
* Test notifier for CUPS.
*
- * Copyright 2007-2011 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
ippAttributeString(attr, buffer, sizeof(buffer));
- fprintf(stderr, "DEBUG: %*s%s (%s%s) %s", indent, "", attr->name,
+ fprintf(stderr, "DEBUG: %*s%s (%s%s) %s\n", indent, "", attr->name,
attr->num_values > 1 ? "1setOf " : "",
ippTagString(attr->value_tag), buffer);
}
/*
- * End of "$Id: testnotify.c 10996 2013-05-29 11:51:34Z msweet $".
+ * End of "$Id: testnotify.c 13040 2016-01-11 20:29:13Z msweet $".
*/
Summary: CUPS
Name: cups
-Version: 2.1.2
+Version: 2.1.3
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: http://www.cups.org/software/2.1.2/cups-2.1.2-source.tar.bz2
+Source: http://www.cups.org/software/2.1.3/cups-2.1.3-source.tar.bz2
Url: http://www.cups.org
Packager: Anonymous <anonymous@foo.com>
Vendor: Apple Inc.
/*
- * "$Id: client.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: client.c 13061 2016-01-26 21:31:40Z msweet $"
*
* Client routines for the CUPS scheduler.
*
break;
}
}
- else if (!WebInterface)
- {
- /*
- * Web interface is disabled. Show an appropriate message...
- */
-
- if (!cupsdSendError(con, HTTP_STATUS_CUPS_WEBIF_DISABLED, CUPSD_AUTH_NONE))
- {
- cupsdCloseClient(con);
- return;
- }
-
- break;
- }
- if ((!strncmp(con->uri, "/admin", 6) &&
- strncmp(con->uri, "/admin/conf/", 12) &&
- strncmp(con->uri, "/admin/log/", 11)) ||
+ if ((!strncmp(con->uri, "/admin", 6) && strcmp(con->uri, "/admin/conf/cupsd.conf") && strncmp(con->uri, "/admin/log/", 11)) ||
!strncmp(con->uri, "/printers", 9) ||
!strncmp(con->uri, "/classes", 8) ||
!strncmp(con->uri, "/help", 5) ||
!strncmp(con->uri, "/jobs", 5))
{
+ if (!WebInterface)
+ {
+ /*
+ * Web interface is disabled. Show an appropriate message...
+ */
+
+ if (!cupsdSendError(con, HTTP_STATUS_CUPS_WEBIF_DISABLED, CUPSD_AUTH_NONE))
+ {
+ cupsdCloseClient(con);
+ return;
+ }
+
+ break;
+ }
+
/*
* Send CGI output...
*/
if (httpGetVersion(con->http) <= HTTP_VERSION_1_0)
httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
}
- else if ((!strncmp(con->uri, "/admin/conf/", 12) &&
- (strchr(con->uri + 12, '/') ||
- strlen(con->uri) == 12)) ||
- (!strncmp(con->uri, "/admin/log/", 11) &&
- (strchr(con->uri + 11, '/') ||
- strlen(con->uri) == 11)))
+ else if (!strncmp(con->uri, "/admin/log/", 11) && (strchr(con->uri + 11, '/') || strlen(con->uri) == 11))
{
/*
* GET can only be done to configuration files directly under
* /admin/conf...
*/
- cupsdLogClient(con, CUPSD_LOG_ERROR,
- "Request for subdirectory \"%s\"!", con->uri);
+ cupsdLogClient(con, CUPSD_LOG_ERROR, "Request for subdirectory \"%s\".", con->uri);
if (!cupsdSendError(con, HTTP_STATUS_FORBIDDEN, CUPSD_AUTH_NONE))
{
break;
}
- else if ((!strncmp(con->uri, "/admin", 6) &&
- strncmp(con->uri, "/admin/conf/", 12) &&
- strncmp(con->uri, "/admin/log/", 11)) ||
+ else if ((!strncmp(con->uri, "/admin", 6) && strncmp(con->uri, "/admin/log/", 11)) ||
!strncmp(con->uri, "/printers", 9) ||
!strncmp(con->uri, "/classes", 8) ||
!strncmp(con->uri, "/help", 5) ||
break;
}
- if ((!strncmp(con->uri, "/admin", 6) &&
- strncmp(con->uri, "/admin/conf/", 12) &&
- strncmp(con->uri, "/admin/log/", 11)) ||
+ if ((!strncmp(con->uri, "/admin", 6) && strcmp(con->uri, "/admin/conf/cupsd.conf") && strncmp(con->uri, "/admin/log/", 11)) ||
!strncmp(con->uri, "/printers", 9) ||
!strncmp(con->uri, "/classes", 8) ||
!strncmp(con->uri, "/help", 5) ||
cupsdLogRequest(con, HTTP_STATUS_OK);
}
- else if ((!strncmp(con->uri, "/admin/conf/", 12) &&
- (strchr(con->uri + 12, '/') ||
- strlen(con->uri) == 12)) ||
- (!strncmp(con->uri, "/admin/log/", 11) &&
- (strchr(con->uri + 11, '/') ||
- strlen(con->uri) == 11)))
+ else if (!strncmp(con->uri, "/admin/log/", 11) && (strchr(con->uri + 11, '/') || strlen(con->uri) == 11))
{
/*
* HEAD can only be done to configuration files under
/*
- * End of "$Id: client.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: client.c 13061 2016-01-26 21:31:40Z msweet $".
*/
/*
- * "$Id: ipp.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: ipp.c 13040 2016-01-11 20:29:13Z msweet $"
*
* IPP routines for the CUPS scheduler.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
"get_subscription_attrs(con=%p[%d], sub_id=%d)",
con, con->number, sub_id);
+ /*
+ * Expire subscriptions as needed...
+ */
+
+ cupsdExpireSubscriptions(NULL, NULL);
+
/*
* Is the subscription ID valid?
*/
return;
}
+ /*
+ * Expire subscriptions as needed...
+ */
+
+ cupsdExpireSubscriptions(NULL, NULL);
+
/*
* Copy the subscription attributes to the response using the
* requested-attributes attribute that may be provided by the client.
/*
- * End of "$Id: ipp.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: ipp.c 13040 2016-01-11 20:29:13Z msweet $".
*/
/*
- * "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $"
+ * "$Id: job.c 13047 2016-01-13 19:16:12Z msweet $"
*
* Job management routines for the CUPS scheduler.
*
}
- ippSetString(job->attrs, &job->reasons, 0, "job-hold-until-specified");
+ if (strcmp(when, "no-hold"))
+ ippSetString(job->attrs, &job->reasons, 0, "job-hold-until-specified");
+ else
+ ippSetString(job->attrs, &job->reasons, 0, "none");
/*
* Update the hold time...
/*
- * End of "$Id: job.c 12856 2015-08-31 14:27:39Z msweet $".
+ * End of "$Id: job.c 13047 2016-01-13 19:16:12Z msweet $".
*/
/*
- * "$Id: main.c 12700 2015-06-08 18:32:35Z msweet $"
+ * "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $"
*
* Main loop for the CUPS scheduler.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
time_t now; /* Current time */
cupsd_client_t *con; /* Client information */
cupsd_job_t *job; /* Job information */
- cupsd_subscription_t *sub; /* Subscription information */
const char *why; /* Debugging aid */
}
#endif /* HAVE_MALLINFO */
- /*
- * Expire subscriptions as needed...
- */
-
- for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
- sub;
- sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
- if (!sub->job && sub->expire && sub->expire < timeout)
- {
- timeout = sub->expire;
- why = "expire subscription";
- }
-
/*
* Adjust from absolute to relative time. We add 1 second to the timeout since
* events occur after the timeout expires, and limit the timeout to 86400
/*
- * End of "$Id: main.c 12700 2015-06-08 18:32:35Z msweet $".
+ * End of "$Id: main.c 13040 2016-01-11 20:29:13Z msweet $".
*/
<key>EnableTransactions</key>
<true/>
<key>EnablePressuredExit</key>
- <true/>
+ <false/>
<key>ExitTimeOut</key>
<integer>60</integer>
<key>KeepAlive</key>
/*
- * "$Id: subscriptions.c 12978 2015-11-17 19:29:52Z msweet $"
+ * "$Id: subscriptions.c 13040 2016-01-11 20:29:13Z msweet $"
*
* Subscription routines for the CUPS scheduler.
*
curtime = time(NULL);
update = 0;
+ cupsdLogMessage(CUPSD_LOG_INFO, "Expiring subscriptions...");
+
for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
sub;
sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
/*
- * End of "$Id: subscriptions.c 12978 2015-11-17 19:29:52Z msweet $".
+ * End of "$Id: subscriptions.c 13040 2016-01-11 20:29:13Z msweet $".
*/
{?which_jobs=completed?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="completed"><INPUT TYPE="SUBMIT" VALUE="Fertige Aufträge anzeigen"></FORM>}
{?which_jobs=all?:<FORM ACTION="{?printer_name=?/jobs:{printer_uri_supported}}" METHOD="GET"><INPUT TYPE="HIDDEN" NAME="which_jobs" VALUE="all"><INPUT TYPE="SUBMIT" VALUE="Alle Aufträge anzeigen"></FORM>}
-<P ALIGN="CENTER">{total=0?Keine Aufträge:Zeige {#job_id} von {total} {?which_jobs=?aktiven:{which_jobs=all?:beendeten}} {total=1?:s}Auftrag:Aufträgen}.</P>
+<P ALIGN="CENTER">{total=0?Keine Aufträge:Zeige {#job_id} von {total} {?which_jobs=?aktiven:{which_jobs=all?:beendeten}} {total=1?Auftrag:Aufträgen}}.</P>
/*
- * "$Id: ipptool.c 12952 2015-10-28 17:22:39Z msweet $"
+ * "$Id: ipptool.c 13075 2016-01-29 21:14:05Z msweet $"
*
* ipptool command for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
(cups_afree_func_t)free);
file_id[0] = '\0';
pass = 1;
- linenum = 1;
+ linenum = 0;
request_id = (CUPS_RAND() % 1000) * 137 + 1;
while (!Cancel && get_token(fp, token, sizeof(token), &linenum) != NULL)
tokenptr = ptr;
}
else
- i = (int)strtol(tokenptr, &tokenptr, 0);
+ i = (int)strtol(token, &tokenptr, 0);
values[0] = i;
attrptr = ippAddIntegers(request, group, value, attr, num_values, values);
}
- if (!tokenptr || *tokenptr)
+ if ((!token[0] || !tokenptr || *tokenptr) && !skip_test)
{
- print_fatal_error(outfile, "Bad %s value \"%s\" on line %d.",
- ippTagString(value), token, linenum);
+ print_fatal_error(outfile, "Bad %s value \'%s\' for \"%s\" on line %d.",
+ ippTagString(value), token, attr, linenum);
pass = 0;
goto test_exit;
}
_cups_strcasecmp(ptr, "dpcm") &&
_cups_strcasecmp(ptr, "other")))
{
- print_fatal_error(outfile, "Bad resolution value \"%s\" on line %d.",
- token, linenum);
+ if (skip_test)
+ break;
+
+ print_fatal_error(outfile, "Bad resolution value \'%s\' for \"%s\" on line %d.", token, attr, linenum);
pass = 0;
goto test_exit;
}
if ((num_vals & 1) || num_vals == 0)
{
- print_fatal_error(outfile, "Bad rangeOfInteger value \"%s\" on line "
- "%d.", token, linenum);
+ if (skip_test)
+ break;
+
+ print_fatal_error(outfile, "Bad rangeOfInteger value \'%s\' for \"%s\" on line %d.", token, attr, linenum);
pass = 0;
goto test_exit;
}
goto test_exit;
}
}
+ else if (skip_test)
+ break;
else
{
- print_fatal_error(outfile, "Bad ATTR collection value on line %d.",
- linenum);
+ print_fatal_error(outfile, "Bad ATTR collection value for \"%s\" on line %d.", attr, linenum);
pass = 0;
goto test_exit;
}
do
{
ipp_t *col; /* Collection value */
- long pos = ftell(fp); /* Save position of file */
+ long savepos = ftell(fp); /* Save position of file */
+ int savelinenum = linenum; /* Save line number */
if (!get_token(fp, token, sizeof(token), &linenum))
break;
if (strcmp(token, ","))
{
- fseek(fp, pos, SEEK_SET);
+ fseek(fp, savepos, SEEK_SET);
+ linenum = savelinenum;
break;
}
break;
default :
- print_fatal_error(outfile, "Unsupported ATTR value tag %s on line %d.",
- ippTagString(value), linenum);
+ print_fatal_error(outfile, "Unsupported ATTR value tag %s for \"%s\" on line %d.", ippTagString(value), attr, linenum);
pass = 0;
goto test_exit;
break;
}
- if (!attrptr)
+ if (!attrptr && !skip_test)
{
- print_fatal_error(outfile, "Unable to add attribute on line %d: %s", linenum,
- cupsLastErrorString());
+ print_fatal_error(outfile, "Unable to add attribute \"%s\" on line %d.", attr, linenum);
pass = 0;
goto test_exit;
}
http->error != ETIMEDOUT)
#endif /* WIN32 */
{
- if (httpReconnect(http))
+ if (httpReconnect2(http, 30000, NULL))
prev_pass = 0;
}
else if (status == HTTP_STATUS_ERROR || status == HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED)
http->error != ETIMEDOUT)
#endif /* WIN32 */
{
- if (httpReconnect(http))
+ if (httpReconnect2(http, 30000, NULL))
prev_pass = 0;
}
else if (status == HTTP_STATUS_ERROR)
{
if (!Cancel)
- httpReconnect(http);
+ httpReconnect2(http, 30000, NULL);
prev_pass = 0;
}
break;
}
}
+ else
+ {
+ print_fatal_error(outfile, "Unexpected token %s seen on line %d.", token, *linenum);
+ goto col_error;
+ }
}
return (col);
/*
- * End of "$Id: ipptool.c 12952 2015-10-28 17:22:39Z msweet $".
+ * End of "$Id: ipptool.c 13075 2016-01-29 21:14:05Z msweet $".
*/
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_TESTABILITY = YES;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;