From d6ea1b93c56c46ee134c10861cc8a3b16a6246ba Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 19 Feb 2014 19:16:36 +0000 Subject: [PATCH] Remove old logging of IPP conformance issues. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11617 a1ca3aef-8c08-0410-bb20-df032aa958be --- scheduler/printers.c | 82 -------------------------------------------- 1 file changed, 82 deletions(-) diff --git a/scheduler/printers.c b/scheduler/printers.c index ca857c703..f4eac5c72 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -50,7 +50,6 @@ static int compare_printers(void *first, void *second, void *data); static void delete_printer_filters(cupsd_printer_t *p); static void dirty_printer(cupsd_printer_t *p); static void load_ppd(cupsd_printer_t *p); -static void log_ipp_conformance(cupsd_printer_t *p, const char *reason); static ipp_t *new_media_col(_pwg_size_t *size, const char *source, const char *type); static void write_xml_string(cups_file_t *fp, const char *s); @@ -2490,10 +2489,6 @@ cupsdSetPrinterReasons( if (i >= p->num_reasons) { - if (!strncmp(reason, "cups-ipp-missing-", 17) || - !strncmp(reason, "cups-ipp-wrong-", 15)) - log_ipp_conformance(p, reason); - if (i >= (int)(sizeof(p->reasons) / sizeof(p->reasons[0]))) { cupsdLogMessage(CUPSD_LOG_ALERT, @@ -4855,83 +4850,6 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */ } -/* - * 'log_ipp_conformance()' - Log an IPP conformance issue with a printer. - */ - -static void -log_ipp_conformance( - cupsd_printer_t *p, /* I - Printer */ - const char *reason) /* I - Printer state reason */ -{ - const char *message; /* Message to log */ -#ifdef __APPLE__ - aslmsg aslm; /* Apple System Log message */ -#endif /* __APPLE__ */ - - - /* - * Strip the leading "cups-ipp-" from the reason and create a log message for - * it... - */ - - reason += 9; - if (!strcmp(reason, "missing-cancel-job")) - message = "Printer does not support REQUIRED Cancel-Job operation."; - else if (!strcmp(reason, "missing-get-job-attributes")) - message = "Printer does not support REQUIRED Get-Job-Attributes operation."; - else if (!strcmp(reason, "missing-print-job")) - message = "Printer does not support REQUIRED Print-Job operation."; - else if (!strcmp(reason, "missing-validate-job")) - message = "Printer does not support REQUIRED Validate-Job operation."; - else if (!strcmp(reason, "missing-get-printer-attributes")) - message = "Printer does not support REQUIRED Get-Printer-Attributes operation."; - else if (!strcmp(reason, "missing-send-document")) - message = "Printer supports Create-Job but not Send-Document operation."; - else if (!strcmp(reason, "missing-job-history")) - message = "Printer does not provide REQUIRED job history."; - else if (!strcmp(reason, "missing-job-id")) - message = "Printer does not provide REQUIRED job-id attribute."; - else if (!strcmp(reason, "missing-job-state")) - message = "Printer does not provide REQUIRED job-state attribute."; - else if (!strcmp(reason, "missing-operations-supported")) - message = "Printer does not provide REQUIRED operations-supported " - "attribute."; - else if (!strcmp(reason, "missing-printer-is-accepting-jobs")) - message = "Printer does not provide REQUIRED printer-is-accepting-jobs " - "attribute."; - else if (!strcmp(reason, "missing-printer-state-reasons")) - message = "Printer does not provide REQUIRED printer-state-reasons " - "attribute."; - else if (!strcmp(reason, "wrong-http-version")) - message = "Printer does not use REQUIRED HTTP/1.1 transport."; - else - message = "Unknown IPP conformance failure."; - - cupsdLogMessage(CUPSD_LOG_WARN, "%s: %s", p->name, message); - -#ifdef __APPLE__ - /* - * Report the failure information to Apple if the user opts into providing - * feedback to Apple... - */ - - aslm = asl_new(ASL_TYPE_MSG); - if (aslm) - { - asl_set(aslm, "com.apple.message.domain", "com.apple.printing.ipp.conformance"); - asl_set(aslm, "com.apple.message.domain_scope", "com.apple.printing.ipp.conformance"); - asl_set(aslm, "com.apple.message.signature", reason); - asl_set(aslm, "com.apple.message.signature2", - p->make_model ? p->make_model : "Unknown"); - asl_log(NULL, aslm, ASL_LEVEL_NOTICE, "%s: %s", - p->make_model ? p->make_model : "Unknown", message); - asl_free(aslm); - } -#endif /* __APPLE__ */ -} - - /* * 'new_media_col()' - Create a media-col collection value. */ -- 2.39.2