[Pkg-cups-devel] r154 - in cupsys/branches/cups-1.2/debian: . patches

Martin Pitt mpitt at costa.debian.org
Wed Apr 12 15:01:16 UTC 2006


Author: mpitt
Date: Wed Apr 12 15:01:14 2006
New Revision: 154

Added:
   cupsys/branches/cups-1.2/debian/patches/12_quiesce_ipp_logging.dpatch   (contents, props changed)
Modified:
   cupsys/branches/cups-1.2/debian/changelog
   cupsys/branches/cups-1.2/debian/patches/00list
Log:
* Add debian/patches/12_quiesce_ipp_logging.dpatch:
  - Drop successful IPP messages to log level 'debug' and unsuccessful ones
    to 'info'.
  - Do not flood access_log with successful CUPS-Get-Printers and
    Get-Printer-Attributes queries (which are generated by e. g.
    gnome-cups-icon every 3 seconds).
  - Closes: #280718



Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog	(original)
+++ cupsys/branches/cups-1.2/debian/changelog	Wed Apr 12 15:01:14 2006
@@ -66,8 +66,15 @@
   * debian/cupsys.preinst: Remove dangling /etc/cups/pdftops.conf symlink on
     upgrades to unbreak printing with poppler-utils.
   * debian/control: Add poppler-utils alternative for xpdf-utils dependency.
+  * Add debian/patches/12_quiesce_ipp_logging.dpatch:	
+    - Drop successful IPP messages to log level 'debug' and unsuccessful ones
+      to 'info'.
+    - Do not flood access_log with successful CUPS-Get-Printers and
+      Get-Printer-Attributes queries (which are generated by e. g.
+      gnome-cups-icon every 3 seconds).
+    - Closes: #280718
 
- -- Martin Pitt <mpitt at debian.org>  Wed, 12 Apr 2006 16:26:07 +0200
+ -- Martin Pitt <mpitt at debian.org>  Wed, 12 Apr 2006 16:55:06 +0200
 
 cupsys (1.1.99.b1.r4885-1) experimental; urgency=low
 

Modified: cupsys/branches/cups-1.2/debian/patches/00list
==============================================================================
--- cupsys/branches/cups-1.2/debian/patches/00list	(original)
+++ cupsys/branches/cups-1.2/debian/patches/00list	Wed Apr 12 15:01:14 2006
@@ -10,6 +10,7 @@
 09_runasuser.dpatch
 09_runasuser_autoconf.dpatch
 11_pam.dpatch
+12_quiesce_ipp_logging.dpatch
 19_cupsaccept.dpatch
 26_modprobe.dpatch
 44_fixconfdirperms.dpatch

Added: cupsys/branches/cups-1.2/debian/patches/12_quiesce_ipp_logging.dpatch
==============================================================================
--- (empty file)
+++ cupsys/branches/cups-1.2/debian/patches/12_quiesce_ipp_logging.dpatch	Wed Apr 12 15:01:14 2006
@@ -0,0 +1,42 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_quiesce_ipp_logging.dpatch by  <mpitt at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad cupsys~/scheduler/ipp.c cupsys/scheduler/ipp.c
+--- cupsys~/scheduler/ipp.c	2006-04-07 17:36:10.000000000 +0200
++++ cupsys/scheduler/ipp.c	2006-04-12 16:44:34.000000000 +0200
+@@ -8057,13 +8057,13 @@
+               _cupsLangString(con->language, message), ap);
+     va_end(ap);
+ 
+-    cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++    cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+                     "%s %s: %s",
+ 		    ippOpString(con->request->request.op.operation_id),
+ 		    ippErrorString(status), formatted);
+   }
+   else
+-    cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_ERROR : CUPSD_LOG_INFO,
++    cupsdLogMessage(status >= IPP_BAD_REQUEST ? CUPSD_LOG_INFO : CUPSD_LOG_DEBUG,
+                     "%s %s",
+ 		    ippOpString(con->request->request.op.operation_id),
+ 		    ippErrorString(status));
+diff -urNad cupsys~/scheduler/log.c cupsys/scheduler/log.c
+--- cupsys~/scheduler/log.c	2006-02-27 21:57:07.000000000 +0100
++++ cupsys/scheduler/log.c	2006-04-12 16:43:26.000000000 +0200
+@@ -354,6 +354,12 @@
+ 		  "STATUS"
+ 		};
+ 
++  /* Do not flood the log with CUPS-Get-Printers requests */
++  if (con->request && code == HTTP_OK && (
++	con->request->request.op.operation_id == CUPS_GET_PRINTERS ||
++	con->request->request.op.operation_id == CUPS_GET_DEFAULT ||
++	con->request->request.op.operation_id == IPP_GET_PRINTER_ATTRIBUTES))
++      return (1);
+ 
+ #ifdef HAVE_VSYSLOG
+  /*



More information about the Pkg-cups-devel mailing list