]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/dirsvc.c
Load cups into easysw/current.
[thirdparty/cups.git] / scheduler / dirsvc.c
index 73abd7bfce43792f2708c905ce30399e38c03639..7953ad5d78e01fc87f4049a4bde4da8552e015b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -2448,10 +2448,11 @@ dnssdBuildTxtRecord(
     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 */
 
 
@@ -2556,6 +2557,27 @@ dnssdBuildTxtRecord(
   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...
   */
@@ -2978,6 +3000,9 @@ process_implicit_classes(void)
         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\"...",
@@ -3079,7 +3104,7 @@ process_implicit_classes(void)
 
 /*
  * 'send_cups_browse()' - Send new browsing information using the CUPS
- *                           protocol.
+ *                        protocol.
  */
 
 static void
@@ -3774,5 +3799,5 @@ slp_url_callback(
 
 
 /*
- * 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 $".
  */