parent
ec9feba30e
commit
be8b00a31c
@ -0,0 +1,44 @@
|
||||
diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
|
||||
index 8c5349f..5496970 100644
|
||||
--- a/daemon/cups-browsed.c
|
||||
+++ b/daemon/cups-browsed.c
|
||||
@@ -6736,6 +6736,9 @@ create_remote_printer_entry (const char *queue_name,
|
||||
p->queue_name, p->uri);
|
||||
goto fail;
|
||||
}
|
||||
+
|
||||
+ attr = ippFindAttribute(p->prattrs, "printer-make-and-model", IPP_TAG_TEXT);
|
||||
+ p->make_model = attr ? strdup(ippGetString(attr, 0, NULL)) : NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -7520,7 +7523,7 @@ create_queue(void* arg)
|
||||
debug_printf("Generated Default Attributes for local queue %s\n",
|
||||
p->queue_name);
|
||||
}
|
||||
- if (ppdfile == NULL)
|
||||
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
|
||||
{
|
||||
// If we do not want CUPS-generated PPDs or we cannot obtain a
|
||||
// CUPS-generated PPD, for example if CUPS does not create a
|
||||
@@ -7712,7 +7715,7 @@ create_queue(void* arg)
|
||||
debug_printf("Generated Default Attributes for local queue %s\n",
|
||||
p->queue_name);
|
||||
}
|
||||
- if (ppdfile == NULL)
|
||||
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
|
||||
{
|
||||
// If we do not want CUPS-generated PPDs or we cannot obtain a
|
||||
// CUPS-generated PPD, for example if CUPS does not create a
|
||||
@@ -7983,6 +7986,11 @@ create_queue(void* arg)
|
||||
}
|
||||
ppdfile = strdup(buf);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ // No PPD - define nickname as make_model for remote raw queue
|
||||
+ p->nickname = p->make_model ? strdup(p->make_model) : strdup("Local Raw Printer");
|
||||
+ }
|
||||
|
||||
// Create a new CUPS queue or modify the existing queue
|
||||
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue