cups_array_t *devices; // Devices found so far
int num_dests; // Number of lpoptions destinations
cups_dest_t *dests; // lpoptions destinations
+ int num_local; // Number of local cupsd queues
+ cups_dest_t *local_dests; // Local cupsd queues
char def_name[1024], // Default printer name, if any
*def_instance; // Default printer instance, if any
} _cups_dnssd_data_t;
if (!have_pdf && !have_raster)
device->state = _CUPS_DNSSD_INCOMPATIBLE;
}
+ else if (!_cups_strcasecmp(key, "rp"))
+ {
+ // Suppress local printer being re-discovered via DNS-SD
+ const char *rp_name = value;
+ int i;
+
+ if (!_cups_strncasecmp(rp_name, "printers/", 9))
+ rp_name += 9;
+
+ for (i = 0; i < data->num_local; i++)
+ {
+ if (!_cups_strcasecmp(rp_name, data->local_dests[i].name))
+ {
+ device->state = _CUPS_DNSSD_INCOMPATIBLE;
+ DEBUG_printf("6cups_dest_query_cb: "
+ "Suppressing local printer '%s'.", rp_name);
+ break;
+ }
+ }
+ }
else if (!_cups_strcasecmp(key, "printer-type"))
{
// Value is either NNNN or 0xXXXX
{
// Get the list of local printers and pass them to the callback function...
num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &dests, data.type, data.mask);
+ data.num_local = num_dests;
+ data.local_dests = dests;
if (data.def_name[0])
{