CHANGES IN CUPS V1.1.13
+ - The scheduler no longer replaces the JobSheets values
+ from the printers.conf and classes.conf files with the
+ classification level, if set. This way the original
+ banner settings are preserved when classification
+ levels are changed or turned off.
- The serial backend didn't drain the output queue, nor
did it restore the original settings.
- Updated the default system group under MacOS X.
/*
- * "$Id: classes.c,v 1.34.2.3 2001/12/27 00:04:52 mike Exp $"
+ * "$Id: classes.c,v 1.34.2.4 2002/01/02 16:16:14 mike Exp $"
*
* Printer class routines for the Common UNIX Printing System (CUPS).
*
char line[1024], /* Line from file */
name[256], /* Parameter name */
*nameptr, /* Pointer into name */
- *value; /* Pointer to value */
+ *value, /* Pointer to value */
+ *valueptr; /* Pointer into value */
printer_t *p, /* Current printer class */
*temp; /* Temporary pointer to printer */
else
p->accepting = 0;
}
+ else if (strcmp(name, "JobSheets") == 0)
+ {
+ /*
+ * Set the initial job sheets...
+ */
+
+ for (valueptr = value; *valueptr && !isspace(*valueptr); valueptr ++);
+
+ if (*valueptr)
+ *valueptr++ = '\0';
+
+ strncpy(p->job_sheets[0], value, sizeof(p->job_sheets[0]) - 1);
+
+ while (isspace(*valueptr))
+ valueptr ++;
+
+ if (*valueptr)
+ {
+ for (value = valueptr; *valueptr && !isspace(*valueptr); valueptr ++);
+
+ if (*valueptr)
+ *valueptr++ = '\0';
+
+ strncpy(p->job_sheets[1], value, sizeof(p->job_sheets[1]) - 1);
+ }
+ }
else if (strcmp(name, "AllowUser") == 0)
{
p->deny_users = 0;
/*
- * End of "$Id: classes.c,v 1.34.2.3 2001/12/27 00:04:52 mike Exp $".
+ * End of "$Id: classes.c,v 1.34.2.4 2002/01/02 16:16:14 mike Exp $".
*/
/*
- * "$Id: printers.c,v 1.93.2.5 2001/12/27 00:04:53 mike Exp $"
+ * "$Id: printers.c,v 1.93.2.6 2002/01/02 16:16:14 mike Exp $"
*
* Printer routines for the Common UNIX Printing System (CUPS).
*
p->accepting = 0;
p->filetype = mimeAddType(MimeDatabase, "printer", name);
- if (Classification[0])
- {
- strcpy(p->job_sheets[0], Classification);
- strcpy(p->job_sheets[1], Classification);
- }
- else
- {
- strcpy(p->job_sheets[0], "none");
- strcpy(p->job_sheets[1], "none");
- }
+ strcpy(p->job_sheets[0], "none");
+ strcpy(p->job_sheets[1], "none");
/*
* Setup required filters and IPP attributes...
}
else if (strcmp(name, "JobSheets") == 0)
{
- if (!Classification[0])
- {
- /*
- * Set the initial job sheets...
- */
+ /*
+ * Set the initial job sheets...
+ */
- for (valueptr = value; *valueptr && !isspace(*valueptr); valueptr ++);
+ for (valueptr = value; *valueptr && !isspace(*valueptr); valueptr ++);
- if (*valueptr)
- *valueptr++ = '\0';
+ if (*valueptr)
+ *valueptr++ = '\0';
- strncpy(p->job_sheets[0], value, sizeof(p->job_sheets[0]) - 1);
+ strncpy(p->job_sheets[0], value, sizeof(p->job_sheets[0]) - 1);
- while (isspace(*valueptr))
- valueptr ++;
+ while (isspace(*valueptr))
+ valueptr ++;
- if (*valueptr)
- {
- for (value = valueptr; *valueptr && !isspace(*valueptr); valueptr ++);
+ if (*valueptr)
+ {
+ for (value = valueptr; *valueptr && !isspace(*valueptr); valueptr ++);
- if (*valueptr)
- *valueptr++ = '\0';
+ if (*valueptr)
+ *valueptr++ = '\0';
- strncpy(p->job_sheets[1], value, sizeof(p->job_sheets[1]) - 1);
- }
+ strncpy(p->job_sheets[1], value, sizeof(p->job_sheets[1]) - 1);
}
}
else if (strcmp(name, "AllowUser") == 0)
if ((auth = FindBest(resource, HTTP_POST)) != NULL)
{
- if (auth->type == AUTH_BASIC)
+ if (auth->type == AUTH_BASIC || auth->type == AUTH_BASICDIGEST)
auth_supported = "basic";
else if (auth->type == AUTH_DIGEST)
auth_supported = "digest";
if (attr != NULL)
{
- attr->values[0].string.text = strdup(p->job_sheets[0]);
- attr->values[1].string.text = strdup(p->job_sheets[1]);
+ attr->values[0].string.text = strdup(Classification[0] ?
+ Classification : p->job_sheets[0]);
+ attr->values[1].string.text = strdup(Classification[0] ?
+ Classification : p->job_sheets[1]);
}
}
}
/*
- * End of "$Id: printers.c,v 1.93.2.5 2001/12/27 00:04:53 mike Exp $".
+ * End of "$Id: printers.c,v 1.93.2.6 2002/01/02 16:16:14 mike Exp $".
*/