]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add --with-error-policy configure option (Issue #38)
authorMichael R Sweet <msweet@msweet.org>
Sat, 14 Nov 2020 14:38:09 +0000 (09:38 -0500)
committerMichael R Sweet <msweet@msweet.org>
Sat, 14 Nov 2020 14:38:09 +0000 (09:38 -0500)
CHANGES-OPENPRINTING.md
conf/cupsd.conf.in
config-scripts/cups-defaults.m4
config.h.in
configure
scheduler/conf.c
vcnet/config.h
xcode/config.h

index 1566865cd3a752d5ea727865ad0654b576d7c6ff..f2f449961bfe72aaf6db3eca9d3450b9ccdf11a2 100644 (file)
@@ -26,6 +26,7 @@ Changes in CUPS v2.3.3op1
 - The scheduler no longer adds the local hostname to the ServerAlias list
   (Issue #32)
 - Added `--with-max-log-size` configure option (Issue #35)
+- Added `--with-error-policy` configure option (Issue #38)
 - IPP Everywhere PPDs could have an "unknown" default InputSlot (Issue #44)
 - The `httpAddrListen` function now uses a listen backlog of 128.
 - Added USB quirks (Apple issue #5789, #5823, #5831)
index 3aa5086b7a37da8a77f11f6a342f00885df8cedd..09059dc4cc8c429c1947950cc35777866604e18d 100644 (file)
@@ -11,6 +11,9 @@ LogLevel @CUPS_LOG_LEVEL@
 # Specifies the maximum size of the log files before they are rotated.  The value "0" disables log rotation.
 MaxLogSize @CUPS_MAX_LOG_SIZE@
 
+# Default error policy for printers
+ErrorPolicy @CUPS_ERROR_POLICY@
+
 # Only listen for connections from the local machine.
 Listen localhost:@DEFAULT_IPP_PORT@
 @CUPS_LISTEN_DOMAINSOCKET@
index 83dfe58512306ca7726a6e7007877f7ba354309a..b6051778dbd155ce1f561b6647fe5c883404ffda 100644 (file)
@@ -100,6 +100,13 @@ AC_ARG_WITH(max_log_size, [  --with-max-log-size     set default MaxLogSize valu
 AC_SUBST(CUPS_MAX_LOG_SIZE)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_LOG_SIZE, "$CUPS_MAX_LOG_SIZE")
 
+dnl Default ErrorPolicy
+AC_ARG_WITH(error_policy, [  --with-error-policy     set default ErrorPolicy value, default=stop-printer],
+       CUPS_MAX_LOG_SIZE="$withval",
+       CUPS_MAX_LOG_SIZE="stop-printer")
+AC_SUBST(CUPS_ERROR_POLICY)
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_ERROR_POLICY, "$CUPS_ERROR_POLICY")
+
 dnl Default FatalErrors
 AC_ARG_WITH(fatal_errors, [  --with-fatal-errors     set default FatalErrors value, default=config],
        CUPS_FATAL_ERRORS="$withval",
index 1c2d7a826c5711ed4637d3e3bca8d9693a3f51e2..6a197ecc56eabda2a422317e7a9e352dbca7f1fe 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Configuration file for CUPS.
  *
+ * Copyright 2020 by Michael R Sweet
  * Copyright 2007-2019 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
@@ -45,6 +46,7 @@
 
 #define CUPS_DEFAULT_LOG_LEVEL "warn"
 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
+#define CUPS_DEFAULT_MAX_LOG_SIZE "1m"
 
 
 /*
 #define CUPS_DEFAULT_LPD_CONFIG_FILE   ""
 
 
+/*
+ * Default ErrorPolicy value...
+ */
+
+#define CUPS_DEFAULT_ERROR_POLICY "stop-printer"
+
+
 /*
  * Default MaxCopies value...
  */
index 73ad68ec38a84b4969b7a480a802360172d598f1..a7e7a825eb6251c10b1e79b75f9ee7c63e5183d7 100755 (executable)
--- a/configure
+++ b/configure
@@ -646,6 +646,8 @@ CUPS_PAGE_LOG_FORMAT
 CUPS_ACCESS_LOG_LEVEL
 CUPS_LOG_LEVEL
 CUPS_FATAL_ERRORS
+CUPS_ERROR_POLICY
+CUPS_MAX_LOG_SIZE
 CUPS_LOG_FILE_PERM
 CUPS_CUPSD_FILE_PERM
 CUPS_CONFIG_FILE_PERM
@@ -895,6 +897,8 @@ with_exe_file_perm
 with_config_file_perm
 with_cupsd_file_perm
 with_log_file_perm
+with_max_log_size
+with_error_policy
 with_fatal_errors
 with_log_level
 with_access_log_level
@@ -1619,6 +1623,8 @@ Optional Packages:
   --with-config-file-perm set default ConfigFilePerm value, default=0640
   --with-cupsd-file-perm  set default cupsd permissions, default=0500
   --with-log-file-perm    set default LogFilePerm value, default=0644
+  --with-max-log-size     set default MaxLogSize value, default=1m
+  --with-error-policy     set default ErrorPolicy value, default=stop-printer
   --with-fatal-errors     set default FatalErrors value, default=config
   --with-log-level        set default LogLevel value, default=warn
   --with-access-log-level set default AccessLogLevel value, default=none
@@ -9372,6 +9378,34 @@ _ACEOF
 
 
 
+# Check whether --with-max_log_size was given.
+if test "${with_max_log_size+set}" = set; then :
+  withval=$with_max_log_size; CUPS_MAX_LOG_SIZE="$withval"
+else
+  CUPS_MAX_LOG_SIZE="1m"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CUPS_DEFAULT_MAX_LOG_SIZE "$CUPS_MAX_LOG_SIZE"
+_ACEOF
+
+
+
+# Check whether --with-error_policy was given.
+if test "${with_error_policy+set}" = set; then :
+  withval=$with_error_policy; CUPS_MAX_LOG_SIZE="$withval"
+else
+  CUPS_MAX_LOG_SIZE="stop-printer"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CUPS_DEFAULT_ERROR_POLICY "$CUPS_ERROR_POLICY"
+_ACEOF
+
+
+
 # Check whether --with-fatal_errors was given.
 if test "${with_fatal_errors+set}" = set; then :
   withval=$with_fatal_errors; CUPS_FATAL_ERRORS="$withval"
index 755cef536dcb15f0bd2895e5102225362db70eac..839cd68661cd37248336169875198990c2a46b33 100644 (file)
@@ -752,7 +752,7 @@ cupsdReadConfiguration(void)
   cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
   cupsdSetString(&SMBConfigFile, CUPS_DEFAULT_SMB_CONFIG_FILE);
 
-  cupsdSetString(&ErrorPolicy, "stop-printer");
+  cupsdSetString(&ErrorPolicy, CUPS_DEFAULT_ERROR_POLICY);
 
   JobHistory          = DEFAULT_HISTORY;
   JobFiles            = DEFAULT_FILES;
index 76fc7fd5f0a8319e302a6cd513717b900f1c305f..5e105c826592f775829970fac9a52faea339a115 100644 (file)
@@ -97,8 +97,8 @@ typedef unsigned long useconds_t;
  * Version of software...
  */
 
-#define CUPS_SVERSION "CUPS v2.3.3"
-#define CUPS_MINIMAL "CUPS/2.3.3"
+#define CUPS_SVERSION "CUPS v2.3.3op1"
+#define CUPS_MINIMAL "CUPS/2.3.3op1"
 
 
 /*
@@ -126,6 +126,7 @@ typedef unsigned long useconds_t;
 
 #define CUPS_DEFAULT_LOG_LEVEL "warn"
 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
+#define CUPS_DEFAULT_MAX_LOG_SIZE "1m"
 
 
 /*
@@ -166,6 +167,13 @@ typedef unsigned long useconds_t;
 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
 
 
+/*
+ * Default ErrorPolicy value...
+ */
+
+#define CUPS_DEFAULT_ERROR_POLICY "stop-printer"
+
+
 /*
  * Default MaxCopies value...
  */
index 5953431a3ce0f426107c01d4014e2005b05bf7cc..7a3f98aa9da1b9d0b531f71331e3117cc6de2692 100644 (file)
@@ -18,8 +18,8 @@
  * Version of software...
  */
 
-#define CUPS_SVERSION "CUPS v2.3.3"
-#define CUPS_MINIMAL "CUPS/2.3.3"
+#define CUPS_SVERSION "CUPS v2.3.3op1"
+#define CUPS_MINIMAL "CUPS/2.3.3op1"
 
 
 /*
@@ -47,6 +47,7 @@
 
 #define CUPS_DEFAULT_LOG_LEVEL "warn"
 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "none"
+#define CUPS_DEFAULT_MAX_LOG_SIZE "1m"
 
 
 /*
 #define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
 
 
+/*
+ * Default ErrorPolicy value...
+ */
+
+#define CUPS_DEFAULT_ERROR_POLICY "stop-printer"
+
+
 /*
  * Default MaxCopies value...
  */