summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-12-01 21:11:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:29 -0500
commit8fe6d35761a6928b606cce8b7c5d5cee95eb2d40 (patch)
tree2bd88758ba972338862f2172fb685abea7061694
parent335786ddd30bce69da74e09b459046163f86980d (diff)
downloadsamba-8fe6d35761a6928b606cce8b7c5d5cee95eb2d40.tar.gz
r4030: patch from Rob -- don't force the cups printer-make-and-model tag as the comment for autoloaded printers
(This used to be commit 26bbad62b9cfef4f2bb5cd3f2b2b7d13017e6439)
-rw-r--r--source3/printing/print_cups.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index ad01a68c8e6..2a59e2c5d30 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -66,12 +66,10 @@ void cups_printer_fn(void (*fn)(char *, char *))
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language; /* Default language */
char *name, /* printer-name attribute */
- *make_model, /* printer-make-and-model attribute */
*info; /* printer-info attribute */
static const char *requested[] =/* Requested attributes */
{
"printer-name",
- "printer-make-and-model",
"printer-info"
};
@@ -151,7 +149,6 @@ void cups_printer_fn(void (*fn)(char *, char *))
*/
name = NULL;
- make_model = NULL;
info = NULL;
while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
@@ -160,10 +157,6 @@ void cups_printer_fn(void (*fn)(char *, char *))
attr->value_tag == IPP_TAG_NAME)
name = attr->values[0].string.text;
- if (strcmp(attr->name, "printer-make-and-model") == 0 &&
- attr->value_tag == IPP_TAG_TEXT)
- make_model = attr->values[0].string.text;
-
if (strcmp(attr->name, "printer-info") == 0 &&
attr->value_tag == IPP_TAG_TEXT)
info = attr->values[0].string.text;
@@ -178,12 +171,7 @@ void cups_printer_fn(void (*fn)(char *, char *))
if (name == NULL)
break;
- if (info == NULL || !info[0])
- (*fn)(name, make_model);
- else
- (*fn)(name, info);
-
-
+ (*fn)(name, info);
}
ippDelete(response);
@@ -245,7 +233,6 @@ void cups_printer_fn(void (*fn)(char *, char *))
*/
name = NULL;
- make_model = NULL;
info = NULL;
while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
@@ -254,10 +241,6 @@ void cups_printer_fn(void (*fn)(char *, char *))
attr->value_tag == IPP_TAG_NAME)
name = attr->values[0].string.text;
- if (strcmp(attr->name, "printer-make-and-model") == 0 &&
- attr->value_tag == IPP_TAG_TEXT)
- make_model = attr->values[0].string.text;
-
if (strcmp(attr->name, "printer-info") == 0 &&
attr->value_tag == IPP_TAG_TEXT)
info = attr->values[0].string.text;
@@ -272,12 +255,7 @@ void cups_printer_fn(void (*fn)(char *, char *))
if (name == NULL)
break;
- if (info == NULL || !info[0])
- (*fn)(name, make_model);
- else
- (*fn)(name, info);
-
-
+ (*fn)(name, info);
}
ippDelete(response);