/*
- * "$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).
*
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...
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...
/*
- * 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 $".
*/
/*
- * "$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.
*
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...
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...
/*
- * 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 $".
*/