summaryrefslogtreecommitdiff
path: root/backend/ipp.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-06-18 14:33:29 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-06-18 14:33:29 -0400
commitbd121abd354cbfcbb4c5fa23408c0270e7243bc6 (patch)
tree5f684c2ec3c54474095306dbd58cf3d1c2a7053c /backend/ipp.c
parentde72bb61c1ee6f8e8298b664186ea84991c0ed20 (diff)
downloadcups-bd121abd354cbfcbb4c5fa23408c0270e7243bc6.tar.gz
Ignore bogus cups-version attribute.
Diffstat (limited to 'backend/ipp.c')
-rw-r--r--backend/ipp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/backend/ipp.c b/backend/ipp.c
index a0c386540..8e9438d55 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -1135,7 +1135,14 @@ main(int argc, /* I - Number of command-line args */
copies_sup = NULL; /* No */
}
- cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT);
+ if ((cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT)) != NULL)
+ {
+ const char *version = ippGetString(cups_version, 0, NULL);
+
+ fprintf(stderr, "DEBUG: cups-version = \"%s\"\n", version);
+ if (!strcmp(version, "cups-version"))
+ cups_version = NULL; /* Bogus cups-version value returned by buggy printers! */
+ }
encryption_sup = ippFindAttribute(supported, "job-password-encryption-supported", IPP_TAG_KEYWORD);