]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Dropped "printer@host" to "printer" mapping - too confusing.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 27 Jan 2000 02:25:45 +0000 (02:25 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 27 Jan 2000 02:25:45 +0000 (02:25 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@871 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/dirsvc.c
scheduler/ipp.c

index 24cc7a70da57d6f61b9ac618e4c6cb03bd2acdde..acaf956321c5ddcc286480de5e63517d614d97eb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: dirsvc.c,v 1.44 2000/01/04 13:46:09 mike Exp $"
+ * "$Id: dirsvc.c,v 1.45 2000/01/27 02:25:45 mike Exp $"
  *
  *   Directory services routines for the Common UNIX Printing System (CUPS).
  *
@@ -251,34 +251,6 @@ UpdateBrowseList(void)
       return;
 
     if ((p = FindClass(name)) == NULL)
-      if ((p = FindClass(resource + 9)) != NULL)
-      {
-        if (strcasecmp(p->hostname, host) != 0)
-       {
-        /*
-         * Nope, this isn't the same host; if the hostname isn't the local host,
-         * add it to the other class and then find a class using the full host
-         * name...
-         */
-
-         if (p->type & CUPS_PRINTER_REMOTE)
-         {
-            strcat(p->name, "@");
-           strcat(p->name, p->hostname);
-           SetPrinterAttrs(p);
-           SortPrinters();
-         }
-
-          p = NULL;
-       }
-      }
-      else
-      {
-        strncpy(name, resource + 9, sizeof(name) - 1);
-        name[sizeof(name) - 1] = '\0';
-      }
-
-    if (p == NULL)
     {
      /*
       * Class doesn't exist; add it...
@@ -309,34 +281,6 @@ UpdateBrowseList(void)
       return;
 
     if ((p = FindPrinter(name)) == NULL)
-      if ((p = FindPrinter(resource + 10)) != NULL)
-      {
-        if (strcasecmp(p->hostname, host) != 0)
-       {
-        /*
-         * Nope, this isn't the same host; if the hostname isn't the local host,
-         * add it to the other printer and then find a printer using the full host
-         * name...
-         */
-
-         if (p->type & CUPS_PRINTER_REMOTE)
-         {
-            strcat(p->name, "@");
-           strcat(p->name, p->hostname);
-           SetPrinterAttrs(p);
-           SortPrinters();
-         }
-
-          p = NULL;
-       }
-      }
-      else
-      {
-        strncpy(name, resource + 10, sizeof(name) - 1);
-        name[sizeof(name) - 1] = '\0';
-      }
-
-    if (p == NULL)
     {
      /*
       * Printer doesn't exist; add it...
@@ -554,5 +498,5 @@ SendBrowseList(void)
 
 
 /*
- * End of "$Id: dirsvc.c,v 1.44 2000/01/04 13:46:09 mike Exp $".
+ * End of "$Id: dirsvc.c,v 1.45 2000/01/27 02:25:45 mike Exp $".
  */
index 1e18360d8eda54ad37da42cb4797b26a243160fd..dad357e8b22f5bd7e2736750bc9bad5d2f0e3f0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c,v 1.45 2000/01/21 04:32:25 mike Exp $"
+ * "$Id: ipp.c,v 1.46 2000/01/27 02:25:45 mike Exp $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -490,38 +490,12 @@ add_class(client_t        *con,           /* I - Client connection */
       return;
     }
 
-   /*
-    * If we found a printer but didn't error out, then rename the printer to
-    * printer@host...
-    */
-
-    if (pclass != NULL)
-    {
-      strcat(pclass->name, "@");
-      strcat(pclass->name, pclass->hostname);
-      SetPrinterAttrs(pclass);
-      SortPrinters();
-    }
-
    /*
     * No, add the pclass...
     */
 
     pclass = AddClass(resource + 9);
   }
-  else if (pclass->type & CUPS_PRINTER_REMOTE)
-  {
-   /*
-    * We found a remote class; rename it and then add the pclass.
-    */
-
-    strcat(pclass->name, "@");
-    strcat(pclass->name, pclass->hostname);
-    SetPrinterAttrs(pclass);
-    SortPrinters();
-
-    pclass = AddClass(resource + 9);
-  }
 
  /*
   * Look for attributes and copy them over as needed...
@@ -715,38 +689,12 @@ add_printer(client_t        *con, /* I - Client connection */
       return;
     }
 
-   /*
-    * If we found a class but didn't error out, then rename the class to
-    * class@host...
-    */
-
-    if (printer != NULL)
-    {
-      strcat(printer->name, "@");
-      strcat(printer->name, printer->hostname);
-      SetPrinterAttrs(printer);
-      SortPrinters();
-    }
-
    /*
     * No, add the printer...
     */
 
     printer = AddPrinter(resource + 10);
   }
-  else if (printer->type & CUPS_PRINTER_REMOTE)
-  {
-   /*
-    * We found a remote printer; rename it and then add the printer.
-    */
-
-    strcat(printer->name, "@");
-    strcat(printer->name, printer->hostname);
-    SetPrinterAttrs(printer);
-    SortPrinters();
-
-    printer = AddPrinter(resource + 10);
-  }
 
  /*
   * Look for attributes and copy them over as needed...
@@ -3550,5 +3498,5 @@ validate_job(client_t        *con,        /* I - Client connection */
 
 
 /*
- * End of "$Id: ipp.c,v 1.45 2000/01/21 04:32:25 mike Exp $".
+ * End of "$Id: ipp.c,v 1.46 2000/01/27 02:25:45 mike Exp $".
  */