/*
- * "$Id: dirsvc.c 6309 2007-02-24 03:11:56Z mike $"
+ * "$Id: dirsvc.c 6354 2007-03-19 06:16:32Z mike $"
*
* Directory services routines for the Common UNIX Printing System (CUPS).
*
int *txt_len, /* O - TXT record length */
cupsd_printer_t *p) /* I - Printer information */
{
- int i; /* Looping var */
+ int i, j; /* Looping vars */
char type_str[32], /* Type to string buffer */
state_str[32], /* State to string buffer */
rp_str[1024], /* Queue name string buffer */
+ air_str[1024], /* auth-info-required string buffer */
*keyvalue[32][2]; /* Table of key/value pairs */
keyvalue[i ][0] = "pdl";
keyvalue[i++][1] = p->pdl ? p->pdl : "application/postscript";
+ if (p->num_auth_info_required)
+ {
+ char *air = air_str; /* Pointer into string */
+
+
+ for (j = 0; j < p->num_auth_info_required; j ++)
+ {
+ if (air >= (air_str + sizeof(air_str) - 2))
+ break;
+
+ if (j)
+ *air++ = ',';
+
+ strlcpy(air, p->auth_info_required[j], sizeof(air_str) - (air - air_str));
+ air += strlen(air);
+ }
+
+ keyvalue[i ][0] = "air";
+ keyvalue[i++][1] = air;
+ }
+
/*
* Then pack them into a proper txt record...
*/
cupsdSetString(&pclass->location, p->location);
cupsdSetString(&pclass->info, p->info);
+ cupsdSetString(&pclass->job_sheets[0], p->job_sheets[0]);
+ cupsdSetString(&pclass->job_sheets[1], p->job_sheets[1]);
+
update = 1;
cupsdLogMessage(CUPSD_LOG_DEBUG, "Added implicit class \"%s\"...",
/*
* 'send_cups_browse()' - Send new browsing information using the CUPS
- * protocol.
+ * protocol.
*/
static void
/*
- * End of "$Id: dirsvc.c 6309 2007-02-24 03:11:56Z mike $".
+ * End of "$Id: dirsvc.c 6354 2007-03-19 06:16:32Z mike $".
*/