]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Deprecate FaxRetry* directives in favor of JobRetry* directives.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 4 Nov 2005 18:39:32 +0000 (18:39 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 4 Nov 2005 18:39:32 +0000 (18:39 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4819 7a7537e8-13f0-0310-91df-b6672ffda945

man/cupsd.conf.man
scheduler/conf.c
scheduler/job.c
scheduler/job.h

index aa76c8efe5723548aad541d3671b5b06463b7235..40ec779fa3fabddef29026ab3820fb09f01eaddc 100644 (file)
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cupsd.conf 5 "Common UNIX Printing System" "30 September 2005" "Easy Software Products"
+.TH cupsd.conf 5 "Common UNIX Printing System" "4 November 2005" "Easy Software Products"
 .SH NAME
 cupsd.conf \- server configuration file for cups
 .SH DESCRIPTION
@@ -172,14 +172,6 @@ ErrorLog
 .br
 Specifies the error log filename.
 .TP 5
-FaxRetryInterval
-.br
-Specifies the interval between retries of fax jobs in seconds.
-.TP 5
-FaxRetryLimit
-.br
-Specifies the number of retries that are done for fax jobs.
-.TP 5
 FileDevice
 .br
 Specifies whether the file pseudo-device can be used for new
@@ -226,6 +218,14 @@ Include
 .br
 Includes the named file.
 .TP 5
+JobRetryInterval
+.br
+Specifies the interval between retries of jobs in seconds.
+.TP 5
+JobRetryLimit
+.br
+Specifies the number of retries that are done for jobs.
+.TP 5
 KeepAlive
 .br
 Specifies whether or not to support HTTP Keep-Alive.
index 03576077e57de8aa5224338509ce271979541db8..67a6e2d2aabf7d5ff22c12f0215730c1a2338910 100644 (file)
@@ -101,8 +101,6 @@ static cupsd_var_t  variables[] =
   { "DefaultPolicy",           &DefaultPolicy,         CUPSD_VARTYPE_STRING },
   { "DocumentRoot",            &DocumentRoot,          CUPSD_VARTYPE_STRING },
   { "ErrorLog",                        &ErrorLog,              CUPSD_VARTYPE_STRING },
-  { "FaxRetryLimit",           &FaxRetryLimit,         CUPSD_VARTYPE_INTEGER },
-  { "FaxRetryInterval",                &FaxRetryInterval,      CUPSD_VARTYPE_INTEGER },
   { "FileDevice",              &FileDevice,            CUPSD_VARTYPE_BOOLEAN },
   { "FilterLimit",             &FilterLimit,           CUPSD_VARTYPE_INTEGER },
   { "FilterNice",              &FilterNice,            CUPSD_VARTYPE_INTEGER },
@@ -110,6 +108,8 @@ static cupsd_var_t  variables[] =
   { "HideImplicitMembers",     &HideImplicitMembers,   CUPSD_VARTYPE_BOOLEAN },
   { "ImplicitClasses",         &ImplicitClasses,       CUPSD_VARTYPE_BOOLEAN },
   { "ImplicitAnyClasses",      &ImplicitAnyClasses,    CUPSD_VARTYPE_BOOLEAN },
+  { "JobRetryLimit",           &JobRetryLimit,         CUPSD_VARTYPE_INTEGER },
+  { "JobRetryInterval",                &JobRetryInterval,      CUPSD_VARTYPE_INTEGER },
   { "KeepAliveTimeout",                &KeepAliveTimeout,      CUPSD_VARTYPE_INTEGER },
   { "KeepAlive",               &KeepAlive,             CUPSD_VARTYPE_BOOLEAN },
   { "LimitRequestBody",                &MaxRequestSize,        CUPSD_VARTYPE_INTEGER },
@@ -383,8 +383,8 @@ cupsdReadConfiguration(void)
 
   ConfigFilePerm      = 0640;
   DefaultAuthType     = AUTH_BASIC;
-  FaxRetryLimit       = 5;
-  FaxRetryInterval    = 300;
+  JobRetryLimit       = 5;
+  JobRetryInterval    = 300;
   FileDevice          = FALSE;
   FilterLevel         = 0;
   FilterLimit         = 0;
@@ -1798,6 +1798,36 @@ read_configuration(cups_file_t *fp)      /* I - File to read from */
         return (0);
       }
     }
+    else if (!strcasecmp(line, "FaxRetryInterval"))
+    {
+      if (value)
+      {
+        JobRetryInterval = atoi(value);
+       cupsdLogMessage(CUPSD_LOG_WARN,
+                       "FaxRetryInterval is deprecated; use "
+                       "JobRetryInterval on line %d.", linenum);
+      }
+      else
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
+        return (0);
+      }
+    }
+    else if (!strcasecmp(line, "FaxRetryLimit"))
+    {
+      if (value)
+      {
+        JobRetryLimit = atoi(value);
+       cupsdLogMessage(CUPSD_LOG_WARN,
+                       "FaxRetryLimit is deprecated; use "
+                       "JobRetryLimit on line %d.", linenum);
+      }
+      else
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
+        return (0);
+      }
+    }
     else if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")
 #ifdef HAVE_SSL
              || !strcasecmp(line, "SSLPort") || !strcasecmp(line, "SSLListen")
index fcb3cd4bb20ede8bce697fc940df2370d316d676..897d330ce2c81749d445e61e463717f62638ea7a 100644 (file)
@@ -445,7 +445,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
 
            job->tries ++;
 
-           if (job->tries >= FaxRetryLimit)
+           if (job->tries >= JobRetryLimit)
            {
             /*
              * Too many tries...
@@ -453,11 +453,11 @@ cupsdFinishJob(cupsd_job_t *job)  /* I - Job */
 
              cupsdLogMessage(CUPSD_LOG_ERROR,
                              "Canceling job %d since it could not be sent after %d tries.",
-                             job->id, FaxRetryLimit);
+                             job->id, JobRetryLimit);
 
              cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
                            "Job cancelled since it could not be sent after %d tries.",
-                           FaxRetryLimit);
+                           JobRetryLimit);
 
              cupsdCancelJob(job, 0);
            }
@@ -467,7 +467,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
              * Try again in N seconds...
              */
 
-             set_hold_until(job, time(NULL) + FaxRetryInterval);
+             set_hold_until(job, time(NULL) + JobRetryInterval);
            }
          }
          else if (!strcmp(printer->error_policy, "abort-job"))
index 8b6799c69f5f24175c7354149a1878fcdee5c537..0499664fc30a1b7f0b0d4948e464e74e3bc59527 100644 (file)
@@ -79,9 +79,9 @@ VAR cups_array_t      *Jobs           VALUE(NULL),
                                        /* List of active jobs */
 VAR int                        NextJobId       VALUE(1);
                                        /* Next job ID to use */
-VAR int                        FaxRetryLimit   VALUE(5),
+VAR int                        JobRetryLimit   VALUE(5),
                                        /* Max number of tries */
-                       FaxRetryInterval VALUE(300);
+                       JobRetryInterval VALUE(300);
                                        /* Seconds between retries */