]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add ErrorPolicy directive (STR #1871)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 2 Apr 2007 23:24:02 +0000 (23:24 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 2 Apr 2007 23:24:02 +0000 (23:24 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@6436 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES.txt
doc/help/ref-cupsd-conf.html
scheduler/conf.c
scheduler/conf.h
scheduler/printers.c

index c8ff5612693157e8fdb3df46c38ed44f5baff3e9..c186cdc20601e720e0132f716420b77b243e4442 100644 (file)
@@ -4,6 +4,8 @@ CHANGES.txt - 2007-04-02
 CHANGES IN CUPS V1.3
 
        - Documentation updates (STR #1775, STR #2130, STR #2131)
+       - Added a new ErrorPolicy directive in the cupsd.conf
+         file (STR #1871)
        - Printers that use JCL options are now exported to Samba
          correctly (STR #1985)
        - The IPP backend now relays printer-state-message values
index 8e07d06200eb3b810414111742de3434eb89e7da..997b479a3350553eebeb8d497c1fbf749caf1709 100644 (file)
@@ -1078,6 +1078,41 @@ default error log file is <VAR>/var/log/cups/error_log</VAR>.</P>
 information to the system log instead of a plain file.</P>
 
 
+<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+ErrorPolicy abort-job
+ErrorPolicy retry-job
+ErrorPolicy stop-printer
+</PRE>
+
+<H3>Description</H3>
+
+<P>The <CODE>ErrorPolicy</CODE> directive defines the default policy that
+is used when a backend is unable to send a print job to the
+printer.</P>
+
+<P>The following values are supported:</P>
+
+<UL>
+
+       <LI><CODE>abort-job</CODE> - Abort the job and proceed
+       with the next job in the queue</LI>
+
+       <LI><CODE>retry-job</CODE> - Retry the job after waiting
+       for N seconds; the <VAR>cupsd.conf</VAR> <A
+       HREF="#JobRetryInterval"><CODE>JobRetryInterval</CODE></A>
+       directive controls the value of N</LI>
+
+       <LI><CODE>stop-printer</CODE> - Stop the printer and keep
+       the job for future printing; this is the default
+       value</LI>
+
+</UL>
+
+
 <H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.18</SPAN><A NAME="FileDevice">FileDevice</A></H2>
 
 <H3>Examples</H3>
index 80fcf26968d94d2065fa54054c3c12f1cc6565fe..f9ff5aaa38d3d07e656df7cc2a6945b3f93d4ebb 100644 (file)
@@ -116,6 +116,7 @@ static cupsd_var_t  variables[] =
   { "DefaultShared",           &DefaultShared,         CUPSD_VARTYPE_BOOLEAN },
   { "DocumentRoot",            &DocumentRoot,          CUPSD_VARTYPE_STRING },
   { "ErrorLog",                        &ErrorLog,              CUPSD_VARTYPE_STRING },
+  { "ErrorPolicy",             &ErrorPolicy,           CUPSD_VARTYPE_STRING },
   { "FileDevice",              &FileDevice,            CUPSD_VARTYPE_BOOLEAN },
   { "FilterLimit",             &FilterLimit,           CUPSD_VARTYPE_INTEGER },
   { "FilterNice",              &FilterNice,            CUPSD_VARTYPE_INTEGER },
@@ -431,6 +432,8 @@ cupsdReadConfiguration(void)
   cupsdClearString(&BrowseLocalOptions);
   cupsdClearString(&BrowseRemoteOptions);
 
+  cupsdSetString(&ErrorPolicy, "stop-printer");
+
 #ifdef HAVE_LDAP
   cupsdClearString(&BrowseLDAPBindDN);
   cupsdClearString(&BrowseLDAPDN);
index d51e2536a16eff27faf9c207674b50f50fb2a93b..5fe6b41d466b23402a83fede9a07bb9fef63e327 100644 (file)
@@ -97,6 +97,8 @@ VAR char              *AccessLog              VALUE(NULL),
                                        /* Default charset */
                        *DefaultLocale          VALUE(NULL),
                                        /* Default locale */
+                       *ErrorPolicy            VALUE(NULL),
+                                       /* Default printer-error-policy */
                        *RIPCache               VALUE(NULL),
                                        /* Amount of memory for RIPs */
                        *TempDir                VALUE(NULL),
index b50592fa886412c419c15b6be1a99e9dc0874bfd..293f22049854565317c3714a1f4b6e147c8f29ac 100644 (file)
@@ -124,7 +124,7 @@ cupsdAddPrinter(const char *name)   /* I - Name of printer */
   cupsdSetString(&p->job_sheets[0], "none");
   cupsdSetString(&p->job_sheets[1], "none");
 
-  cupsdSetString(&p->error_policy, "stop-printer");
+  cupsdSetString(&p->error_policy, ErrorPolicy);
   cupsdSetString(&p->op_policy, DefaultPolicy);
 
   p->op_policy_ptr = DefaultPolicyPtr;