32 lines
907 B
Diff
32 lines
907 B
Diff
|
diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
|
||
|
index a2530d9..efc5669 100644
|
||
|
--- a/daemon/cups-browsed.c
|
||
|
+++ b/daemon/cups-browsed.c
|
||
|
@@ -5947,6 +5947,12 @@ record_printer_options(const char *printer)
|
||
|
attr = ippFirstAttribute(response);
|
||
|
while (attr)
|
||
|
{
|
||
|
+ if (ippGetValueTag(attr) == IPP_TAG_NOVALUE)
|
||
|
+ {
|
||
|
+ attr = ippNextAttribute(response);
|
||
|
+ continue;
|
||
|
+ }
|
||
|
+
|
||
|
key = ippGetName(attr);
|
||
|
for (ptr = attrs_to_record; *ptr; ptr++)
|
||
|
if (strcasecmp(key, *ptr) == 0 ||
|
||
|
@@ -5966,6 +5972,13 @@ record_printer_options(const char *printer)
|
||
|
memmove(c, c + 1, strlen(c));
|
||
|
if (*c) c ++;
|
||
|
}
|
||
|
+
|
||
|
+ if (strlen(buf) == 0)
|
||
|
+ {
|
||
|
+ attr = ippNextAttribute(response);
|
||
|
+ continue;
|
||
|
+ }
|
||
|
+
|
||
|
debug_printf(" %s=%s\n", key, buf);
|
||
|
p->num_options = cupsAddOption(key, buf, p->num_options,
|
||
|
&(p->options));
|