/*
- * "$Id: dirsvc.c,v 1.73.2.29 2003/03/31 19:20:15 mike Exp $"
+ * "$Id: dirsvc.c,v 1.73.2.30 2003/04/02 13:17:59 mike Exp $"
*
* Directory services routines for the Common UNIX Printing System (CUPS).
*
snprintf(packet, sizeof(packet), "%x %x ipp://%s/%s/%s \"%s\" \"%s\" \"%s\"\n",
p->type | CUPS_PRINTER_REMOTE, p->state, iface->hostname,
(p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers",
- p->name, p->location, p->info, p->make_model);
+ p->name, p->location ? p->location : "",
+ p->info ? p->info : "",
+ p->make_model ? p->make_model : "Unknown");
bytes = strlen(packet);
snprintf(packet, sizeof(packet), "%x %x ipp://%s/%s/%s \"%s\" \"%s\" \"%s\"\n",
p->type | CUPS_PRINTER_REMOTE, p->state, iface->hostname,
(p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers",
- p->name, p->location, p->info, p->make_model);
+ p->name, p->location ? p->location : "",
+ p->info ? p->info : "",
+ p->make_model ? p->make_model : "Unknown");
bytes = strlen(packet);
snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\"\n",
p->type | CUPS_PRINTER_REMOTE, p->state, p->uri,
- p->location, p->info, p->make_model);
+ p->location ? p->location : "",
+ p->info ? p->info : "",
+ p->make_model ? p->make_model : "Unknown");
bytes = strlen(packet);
LogMessage(L_DEBUG2, "SendBrowseList: (%d bytes) %s", bytes, packet);
/*
- * End of "$Id: dirsvc.c,v 1.73.2.29 2003/03/31 19:20:15 mike Exp $".
+ * End of "$Id: dirsvc.c,v 1.73.2.30 2003/04/02 13:17:59 mike Exp $".
*/