diff options
author | Gerald Carter <jerry@samba.org> | 2004-12-01 21:11:54 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-12-01 21:11:54 +0000 |
commit | cac439b13206aa09fb5ac8bb89165af092ccfaa2 (patch) | |
tree | 7906f6cf449bce8d6f36506e99626dbf4c676535 /source/printing | |
parent | 7d5dd6f2337cc5a44193acee10f941834a936d00 (diff) | |
download | samba-cac439b13206aa09fb5ac8bb89165af092ccfaa2.tar.gz samba-cac439b13206aa09fb5ac8bb89165af092ccfaa2.tar.xz samba-cac439b13206aa09fb5ac8bb89165af092ccfaa2.zip |
r4030: patch from Rob -- don't force the cups printer-make-and-model tag as the comment for autoloaded printers
Diffstat (limited to 'source/printing')
-rw-r--r-- | source/printing/print_cups.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c index ad01a68c8e6..2a59e2c5d30 100644 --- a/source/printing/print_cups.c +++ b/source/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); |