/*
* Printer routines for the CUPS scheduler.
*
- * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2007-2020 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
*
* Licensed under Apache License v2.0. See the file "LICENSE" for more
/* cups-version */
ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_TEXT | IPP_TAG_COPY,
- "cups-version", NULL, CUPS_SVERSION + 6);
+ "cups-version", NULL, &CUPS_SVERSION[6]);
/* generated-natural-language-supported (no IPP_TAG_COPY) */
ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_LANGUAGE,
ippDelete(p->attrs);
ippDelete(p->ppd_attrs);
+ _ppdCacheDestroy(p->pc);
+
mimeDeleteType(MimeDatabase, p->filetype);
mimeDeleteType(MimeDatabase, p->prefiltertype);
cupsdFreeStrings(&(p->users));
cupsdFreeQuotas(p);
+ cupsdClearString(&p->uuid);
cupsdClearString(&p->uri);
cupsdClearString(&p->hostname);
cupsdClearString(&p->name);
int i; /* Looping var */
cups_file_t *fp; /* printers.conf file */
char filename[1024], /* printers.conf filename */
- temp[1024], /* Temporary string */
value[2048], /* Value string */
*ptr, /* Pointer into value */
*name; /* Current user/group name */
cupsd_printer_t *printer; /* Current printer class */
- time_t curtime; /* Current time */
- struct tm curdate; /* Current date */
cups_option_t *option; /* Current option */
ipp_attribute_t *marker; /* Current marker attribute */
* Write a small header to the file...
*/
- time(&curtime);
- localtime_r(&curtime, &curdate);
- strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", &curdate);
-
cupsFilePuts(fp, "# Printer configuration file for " CUPS_SVERSION "\n");
- cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
+ cupsFilePrintf(fp, "# Written by cupsd\n");
cupsFilePuts(fp, "# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING\n");
cupsFilePrintf(fp, "NextPrinterId %d\n", NextPrinterId);
ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
"uri-authentication-supported", NULL, auth_supported);
- ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
- "uri-security-supported", NULL, "none");
if (p->printer_id)
ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "printer-id", p->printer_id);
ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", NULL,
num_qualities = 0;
- if ((output_mode = ppdFindOption(ppd, "OutputMode")) != NULL)
+ if ((output_mode = ppdFindOption(ppd, "OutputMode")) ||
+ (output_mode = ppdFindOption(ppd, "cupsPrintQuality")))
{
if (ppdFindChoice(output_mode, "draft") ||
ppdFindChoice(output_mode, "fast"))