Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsd Missing value on line But No File Name in System Log #4559

Closed
michaelrsweet opened this issue Jan 7, 2015 · 3 comments
Closed

cupsd Missing value on line But No File Name in System Log #4559

michaelrsweet opened this issue Jan 7, 2015 · 3 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.7.5
CUPS.org User: gtwilliams

cupsd logs these messages:

Dec 27 17:20:54 vfr cupsd[20118]: Missing value on line 22.
Dec 27 17:20:54 vfr cupsd[20118]: Missing value on line 370.
Dec 27 17:20:55 vfr cupsd[20118]: Missing value on line 407.

They are useless. OK, that's maybe slightly harsh, but without a file
name, what good are they? I checked my best guesses (*.ppd and
cupsd.conf) and none of the files I looked at match the errors being
logged.

I checked all files in the /etc/cups and /etc/cups/ppd directories and
none of these files matches the logged error messages.

At the end of the day, my printer still works, so this is, at the
moment, just cosmetic.

This patch changes all messages that end in "Missing value on line
%d." to add the name of the file. There are other messages logged
that could benefit from the same treatment, but I didn't attempt to
find and fix them.

With this patch, my immediate problem is fixed since I can now see
that the complaint is about the file /var/cache/cups/job.cache .

I did not attempt to test all the call sites I patched. I had no idea
which call site was mine.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"cups-syslog.patch":

--- cups-1.7.5/scheduler/conf.c.orig 2014-12-28 14:52:33.588370810 -0500
+++ cups-1.7.5/scheduler/conf.c 2014-12-28 15:22:55.177879444 -0500
@@ -188,10 +188,12 @@ static int parse_variable(const char *f
const char *line, const char *value,
size_t num_vars,
const cupsd_var_t *vars);
-static int read_cupsd_conf(cups_file_t *fp);
+static int read_cupsd_conf(cups_file_t *fp, const char *filename);
static int read_cups_files_conf(cups_file_t *fp);
-static int read_location(cups_file_t *fp, char *name, int linenum);
-static int read_policy(cups_file_t *fp, char *name, int linenum);
+static int read_location(cups_file_t *fp, char *name,

  •                 int linenum, const char *filename);
    
    +static int read_policy(cups_file_t *fp, char *name,
  •               int linenum, const char *filename);
    
    static void set_policy_defaults(cupsd_policy_t *pol);

@@ -809,7 +811,7 @@ cupsdReadConfiguration(void)
return (0);
}

  • status = read_cupsd_conf(fp);
  • status = read_cupsd_conf(fp, CupsFilesFile);

cupsFileClose(fp);

@@ -2837,7 +2839,8 @@ parse_variable(
*/

static int /* O - 1 on success, 0 on failure /
-read_cupsd_conf(cups_file_t *fp) /
I - File to read from /
+read_cupsd_conf(cups_file_t *fp, /
I - File to read from */

  •            const char  _filename) /_ I - File name _/
    

    {
    int linenum; /_ Current line number /
    char line[HTTP_MAX_BUFFER],
    @@ -2882,7 +2885,7 @@ read_cupsd_conf(cups_file_t *fp) /
    I -
    incname, strerror(errno));
    else
    {

  •    read_cupsd_conf(incfile);
    
  •    read_cupsd_conf(incfile, filename);
    

    cupsFileClose(incfile);
    }
    }
    @@ -2892,7 +2895,7 @@ read_cupsd_conf(cups_file_t fp) / I -

    • */
  •  linenum = read_location(fp, value, linenum);
    
  •  linenum = read_location(fp, value, linenum, filename);
    

    if (linenum == 0)
    return (0);
    }
    @@ -2902,7 +2905,7 @@ read_cupsd_conf(cups_file_t fp) / I -

    • */
  •  linenum = read_policy(fp, value, linenum);
    
  •  linenum = read_policy(fp, value, linenum, filename);
    

    if (linenum == 0)
    return (0);
    }
    @@ -3505,7 +3508,8 @@ read_cups_files_conf(cups_file_t fp) /
    static int /* O - New line number or 0 on error /
    read_location(cups_file_t *fp, /
    I - Configuration file /
    char *location, /
    I - Location name/path */

  •     int         linenum)  /\* I - Current line number */
    
  •     int         linenum,  /\* I - Current line number */
    
  •     const char  _filename)    /_ I - Configuration file name _/
    

    {
    cupsd_location_t *loc, /_ New location /
    *parent; /
    Parent location /
    @@ -3593,7 +3597,8 @@ read_location(cups_file_t *fp, /
    I - C
    loc = parent;
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d in file %s.",
    
  •         linenum, filename);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3622,7 +3627,8 @@ read_location(cups_file_t fp, / I - C
    static int /* O - New line number or 0 on error /
    read_policy(cups_file_t *fp, /
    I - Configuration file /
    char *policy, /
    I - Location name/path */

  •   int         linenum)    /\* I - Current line number */
    
  •   int         linenum,    /\* I - Current line number */
    
  •   const char  _filename)  /_ I - Configuration file name _/
    

    {
    int i; /_ Looping var /
    cupsd_policy_t *pol; /
    Policy /
    @@ -3748,7 +3754,8 @@ read_policy(cups_file_t *fp, /
    I - Con
    }
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d in file %s.",
    
  •         linenum, filename);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    --- cups-1.7.5/scheduler/job.c.orig 2014-12-28 14:52:44.547698187 -0500
    +++ cups-1.7.5/scheduler/job.c 2014-12-28 14:51:42.291838520 -0500
    @@ -4030,7 +4030,8 @@ load_job_cache(const char filename) /
    }
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d in file %s.",
    
  •         linenum, filename);
    

    continue;
    }
    else if (!_cups_strcasecmp(line, "State"))
    --- cups-1.7.5/cups/ppd-cache.c.orig 2014-12-28 14:52:59.397141759 -0500
    +++ cups-1.7.5/cups/ppd-cache.c 2014-12-28 14:51:42.291838520 -0500
    @@ -191,8 +191,8 @@ _ppdCacheCreateWithFile(

    if (!value)
    {

  •  DEBUG_printf(("_ppdCacheCreateWithFile: Missing value on line %d.",
    
  •                linenum));
    
  •  DEBUG_printf(("_ppdCacheCreateWithFile: Missing value on line %d in file %s.",
    
  •                linenum, filename));
    

    _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Bad PPD cache file."), 1);
    goto create_error;
    }
    --- cups-1.7.5/cups/adminutil.c.orig 2014-12-28 14:53:12.813542524 -0500
    +++ cups-1.7.5/cups/adminutil.c 2014-12-28 14:51:42.291838520 -0500
    @@ -251,8 +251,8 @@ cupsAdminCreateWindowsPPD(
    if ((ptr = strchr(line, ':')) == NULL)
    {
    snprintf(line, sizeof(line),

  •        _cupsLangString(language, _("Missing value on line %d.")),
    
  •    linenum);
    
  •        _cupsLangString(language, _("Missing value on line %d in file %s.")),
    
  •    linenum, src);
     _cupsSetError(IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR, line, 0);
    
     cupsFileClose(srcfp);
    

@michaelrsweet
Copy link
Collaborator Author

"str4559.patch":

Index: scheduler/conf.c

--- scheduler/conf.c (revision 12451)
+++ scheduler/conf.c (working copy)
@@ -2008,8 +2008,8 @@
else if (!_cups_strcasecmp(value, "always"))
{
cupsdLogMessage(CUPSD_LOG_ERROR,

  •                  "Encryption value \"%s\" on line %d is invalid in this "
    
  •         "context. Using \"required\" instead.", value, linenum);
    
  •                  "Encryption value \"%s\" on line %d of %s is invalid in this "
    
  •         "context. Using \"required\" instead.", value, linenum, ConfigurationFile);
    

    loc->encryption = HTTP_ENCRYPT_REQUIRED;
    }
    @@ -2020,7 +2020,7 @@
    else
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •                  "Unknown Encryption value %s on line %d.", value, linenum);
    
  •                  "Unknown Encryption value %s on line %d of %s.", value, linenum, ConfigurationFile);
    

    return (0);
    }
    }
    @@ -2036,8 +2036,8 @@
    loc->order_type = CUPSD_AUTH_DENY;
    else
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown Order value %s on line %d.",
    
  •             value, linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown Order value %s on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    return (0);
    }
    }
    @@ -2139,8 +2139,8 @@

    if (!get_addr_and_mask(value, ip, mask))
    {

  • cupsdLogMessage(CUPSD_LOG_ERROR, "Bad netmask value %s on line %d.",
    
  •         value, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_ERROR, "Bad netmask value %s on line %d of %s.",
    
  •         value, linenum, ConfigurationFile);
    

    return (0);
    }

@@ -2194,8 +2194,8 @@
else
{
cupsdLogMessage(CUPSD_LOG_WARN,

  •                  "Unknown authorization type %s on line %d.",
    
  •             value, linenum);
    
  •                  "Unknown authorization type %s on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    return (0);
    }
    }
    @@ -2221,8 +2221,8 @@

    cupsdLogMessage(CUPSD_LOG_WARN,
    ""AuthClass %s" is deprecated; consider using "

  •         "\"Require valid-user\" on line %d.",
    
  •             value, linenum);
    
  •         "\"Require valid-user\" on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(value, "group"))
    {
    @@ -2230,8 +2230,8 @@

    cupsdLogMessage(CUPSD_LOG_WARN,
    ""AuthClass %s" is deprecated; consider using "

  •         "\"Require user @groupname\" on line %d.",
    
  •             value, linenum);
    
  •         "\"Require user @groupname\" on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(value, "system"))
    {
    @@ -2241,14 +2241,14 @@

    cupsdLogMessage(CUPSD_LOG_WARN,
    ""AuthClass %s" is deprecated; consider using "

  •         "\"Require user @SYSTEM\" on line %d.",
    
  •             value, linenum);
    
  •         "\"Require user @SYSTEM\" on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    }
    else
    {
    cupsdLogMessage(CUPSD_LOG_WARN,

  •                  "Unknown authorization class %s on line %d.",
    
  •             value, linenum);
    
  •                  "Unknown authorization class %s on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    return (0);
    }
    }
    @@ -2258,8 +2258,8 @@

    cupsdLogMessage(CUPSD_LOG_WARN,
    ""AuthGroupName %s" directive is deprecated; consider "

  •       "using \"Require user @%s\" on line %d.",
    
  •       value, value, linenum);
    
  •       "using \"Require user @%s\" on line %d of %s.",
    
  •       value, value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "Require"))
    {
    @@ -2285,8 +2285,8 @@
    loc->level = CUPSD_AUTH_GROUP;
    else
    {

  •  cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Require type %s on line %d.",
    
  •             value, linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Require type %s on line %d of %s.",
    
  •             value, linenum, ConfigurationFile);
    

    return (0);
    }

@@ -2348,8 +2348,8 @@
loc->satisfy = CUPSD_AUTH_SATISFY_ANY;
else
{

  •  cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Satisfy value %s on line %d.",
    
  •                  value, linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_WARN, "Unknown Satisfy value %s on line %d of %s.",
    
  •                  value, linenum, ConfigurationFile);
    
    return (0);
    }
    }
    @@ -2925,14 +2925,14 @@
    JobRetryInterval = atoi(value);
    cupsdLogMessage(CUPSD_LOG_WARN,
    "FaxRetryInterval is deprecated; use "
  •         "JobRetryInterval on line %d.", linenum);
    
  •         "JobRetryInterval on line %d of %s.", linenum, ConfigurationFile);
    
    }
    else if (!_cups_strcasecmp(line, "FaxRetryLimit") && value)
    {
    JobRetryLimit = atoi(value);
    cupsdLogMessage(CUPSD_LOG_WARN,
    "FaxRetryLimit is deprecated; use "
  •         "JobRetryLimit on line %d.", linenum);
    
  •         "JobRetryLimit on line %d of %s.", linenum, ConfigurationFile);
    
    }
    #ifdef HAVE_SSL
    else if (!_cups_strcasecmp(line, "SSLOptions"))
    @@ -3107,8 +3107,8 @@
    if (protocols < 0)
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,
  •               "Unknown browse protocol \"%s\" on line %d.",
    
  •               value, linenum);
    
  •               "Unknown browse protocol \"%s\" on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
     break;
    
    }

@@ -3133,8 +3133,8 @@
else
{
cupsdLogMessage(CUPSD_LOG_WARN,

  •               "Unknown default authorization type %s on line %d.",
    
  •               value, linenum);
    
  •               "Unknown default authorization type %s on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3155,8 +3155,8 @@
    else
    {
    cupsdLogMessage(CUPSD_LOG_WARN,

  •               "Unknown default encryption %s on line %d.",
    
  •               value, linenum);
    
  •               "Unknown default encryption %s on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3177,8 +3177,8 @@
    else if (!_cups_strcasecmp(value, "double"))
    HostNameLookups = 2;
    else

  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown HostNameLookups %s on line %d.",

  •               value, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown HostNameLookups %s on line %d of %s.",

  •               value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "AccessLogLevel") && value)
    {
    @@ -3195,8 +3195,8 @@
    else if (!_cups_strcasecmp(value, "none"))
    AccessLogLevel = CUPSD_ACCESSLOG_NONE;
    else

  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown AccessLogLevel %s on line %d.",
    
  •               value, linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown AccessLogLevel %s on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "LogLevel") && value)
    {
    @@ -3225,8 +3225,8 @@
    else if (!_cups_strcasecmp(value, "none"))
    LogLevel = CUPSD_LOG_NONE;
    else

  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogLevel %s on line %d.",
    
  •               value, linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogLevel %s on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "LogTimeFormat") && value)
    {
    @@ -3239,8 +3239,8 @@
    else if (!_cups_strcasecmp(value, "usecs"))
    LogTimeFormat = CUPSD_TIME_USECS;
    else

  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d.",
    
  •               value, linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d of %s.",
    
  •               value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "ServerTokens") && value)
    {
    @@ -3271,8 +3271,8 @@
    else if (!_cups_strcasecmp(value, "None"))
    cupsdClearString(&ServerHeader);
    else

  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown ServerTokens %s on line %d.",

  •                    value, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown ServerTokens %s on line %d of %s.",

  •                    value, linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "PassEnv") && value)
    {
    @@ -3348,8 +3348,8 @@
    }
    else
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •               "Missing value for SetEnv directive on line %d.",
    
  •               linenum);
    
  •               "Missing value for SetEnv directive on line %d of %s.",
    
  •               linenum, ConfigurationFile);
    

    }
    else if (!_cups_strcasecmp(line, "AccessLog") ||
    !_cups_strcasecmp(line, "CacheDir") ||
    @@ -3596,8 +3596,8 @@

    if ((parent = cupsdFindLocation(location)) != NULL)

  • cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Location %s> on line %d.",

  •                location, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Location %s> on line %d of %s.",

  •                location, linenum, ConfigurationFile);
    

    else if ((parent = cupsdNewLocation(location)) == NULL)
    return (0);
    else
    @@ -3622,7 +3622,7 @@
    {
    if (!value)
    {

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of %s.", linenum, ConfigurationFile);
     if (FatalErrors & CUPSD_FATAL_CONFIG)
    

    return (0);
    else
    @@ -3657,8 +3657,8 @@
    else if (!strcmp(value, "TRACE"))
    loc->limit |= CUPSD_AUTH_LIMIT_TRACE;
    else

  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown request type %s on line %d.",
    
  •                 value, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_WARN, "Unknown request type %s on line %d of %s.",
    
  •                 value, linenum, ConfigurationFile);
    
     for (value = valptr; isspace(*value & 255); value ++);
    

    }
    @@ -3673,15 +3673,15 @@
    loc = parent;
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    else if (!parse_aaa(loc, line, value, linenum))
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •                  "Unknown Location directive %s on line %d.",
    
  •             line, linenum);
    
  •                  "Unknown Location directive %s on line %d of %s.",
    
  •             line, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3720,8 +3720,8 @@
    */

    if ((pol = cupsdFindPolicy(policy)) != NULL)

  • cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Policy %s> on line %d.",

  •                policy, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_WARN, "Duplicate <Policy %s> on line %d of %s.",

  •                policy, linenum, ConfigurationFile);
    

    else if ((pol = cupsdAddPolicy(policy)) == NULL)
    return (0);

@@ -3742,8 +3742,8 @@
{
if (op)
cupsdLogMessage(CUPSD_LOG_WARN,

  •               "Missing </Limit> before </Policy> on line %d.",
    
  •               linenum);
    
  •               "Missing </Limit> before </Policy> on line %d of %s.",
    
  •               linenum, ConfigurationFile);
    

    set_policy_defaults(pol);

@@ -3753,7 +3753,7 @@
{
if (!value)
{

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d.", linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of %s.", linenum, ConfigurationFile);
     if (FatalErrors & CUPSD_FATAL_CONFIG)
    

    return (0);
    else
    @@ -3779,15 +3779,15 @@
    ops[num_ops] = IPP_ANY_OPERATION;
    else if ((ops[num_ops] = ippOpValue(value)) == IPP_BAD_OPERATION)
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •                   "Bad IPP operation name \"%s\" on line %d.",
    
  •                   value, linenum);
    
  •                   "Bad IPP operation name \"%s\" on line %d of %s.",
    
  •                   value, linenum, ConfigurationFile);
       else
    num_ops ++;
    

    }
    else
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •                 "Too many operations listed on line %d.",
    
  •                 linenum);
    
  •                 "Too many operations listed on line %d of %s.",
    
  •                 linenum, ConfigurationFile);
    
     for (value = valptr; isspace(*value & 255); value ++);
    

    }
    @@ -3828,7 +3828,7 @@
    }
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3841,7 +3841,7 @@
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,
    "%s directive must appear outside ... "

  •       "on line %d.", line, linenum);
    
  •       "on line %d of %s.", line, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    @@ -3939,16 +3939,16 @@
    else if (!op)
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •                  "Missing <Limit ops> directive before %s on line %d.",
    
  •                  line, linenum);
    
  •                  "Missing <Limit ops> directive before %s on line %d of %s.",
    
  •                  line, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);
    }
    else if (!parse_aaa(op, line, value, linenum))
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •         "Unknown Policy Limit directive %s on line %d.",
    
  •         line, linenum);
    
  •         "Unknown Policy Limit directive %s on line %d of %s.",
    
  •         line, linenum, ConfigurationFile);
    

    if (FatalErrors & CUPSD_FATAL_CONFIG)
    return (0);

    Index: scheduler/job.c

    --- scheduler/job.c (revision 12451)
    +++ scheduler/job.c (working copy)
    @@ -4089,14 +4089,13 @@
    {
    if (job)
    {

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Missing </Job> directive on line %d.",
    
  •               linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Missing </Job> directive on line %d of %s.", linenum, filename);
     continue;
    

    }

    if (!value)
    {

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Missing job ID on line %d.", linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Missing job ID on line %d of %s.", linenum, filename);
    

    continue;
    }

@@ -4104,8 +4103,7 @@

   if (jobid < 1)
   {
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad job ID %d on line %d.", jobid,
    
  •               linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad job ID %d on line %d of %s.", jobid, linenum, filename);
     continue;
    
    }

@@ -4144,7 +4142,7 @@
else if (!job)
{
cupsdLogMessage(CUPSD_LOG_ERROR,

  •             "Missing <Job #> directive on line %d.", linenum);
    
  •             "Missing <Job #> directive on line %d of %s.", linenum, filename);
    

    continue;
    }
    else if (!_cups_strcasecmp(line, ""))
    @@ -4166,7 +4164,7 @@
    }
    else if (!value)
    {

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d.", linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d of %s.", linenum, filename);
    

    continue;
    }
    else if (!_cups_strcasecmp(line, "State"))
    @@ -4220,8 +4218,7 @@

    if (job->num_files < 0)
    {

  • cupsdLogMessage(CUPSD_LOG_ERROR, "Bad NumFiles value %d on line %d.",

  •               job->num_files, linenum);
    
  • cupsdLogMessage(CUPSD_LOG_ERROR, "Bad NumFiles value %d on line %d of %s.", job->num_files, linenum, filename);
    job->num_files = 0;
    continue;
    }
    @@ -4260,14 +4257,13 @@
    if (sscanf(value, "%d%*[ \t]%15[^/]/%255s%d", &number, super, type,
    &compression) != 4)
    {

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File on line %d.", linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File on line %d of %s.", linenum, filename);
    

    continue;
    }

    if (number < 1 || number > job->num_files)
    {

  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File number %d on line %d.",
    
  •               number, linenum);
    
  •    cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File number %d on line %d of %s.", number, linenum, filename);
     continue;
    

    }

@@ -4301,14 +4297,13 @@
}
}
else

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown %s directive on line %d.",
    
  •                  line, linenum);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown %s directive on line %d of %s.", line, linenum, filename);
    

    }

    if (job)
    {
    cupsdLogMessage(CUPSD_LOG_ERROR,

  •       "Missing </Job> directive on line %d.", linenum);
    
  •       "Missing </Job> directive on line %d of %s.", linenum, filename);
    

    cupsdDeleteJob(job, CUPSD_JOB_PURGE);
    }

Index: scheduler/printers.c

--- scheduler/printers.c (revision 12451)
+++ scheduler/printers.c (working copy)
@@ -4724,14 +4724,12 @@

 pstatus = ppdLastError(&pline);
  • cupsdLogMessage(CUPSD_LOG_ERROR, "PPD file for %s cannot be loaded!",
  •       p->name);
    
  • cupsdLogMessage(CUPSD_LOG_ERROR, "PPD file for %s cannot be loaded.", p->name);

if (pstatus <= PPD_ALLOC_ERROR)

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "%s", strerror(errno));
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "%s: %s", ppd_name, strerror(errno));
    

    else

  •  cupsdLogMessage(CUPSD_LOG_ERROR, "%s on line %d.",
    
  •         ppdErrorString(pstatus), pline);
    
  •  cupsdLogMessage(CUPSD_LOG_ERROR, "%s on line %d of %s.", ppdErrorString(pstatus), pline, ppd_name);
    

    cupsdLogMessage(CUPSD_LOG_INFO,
    "Hint: Run "cupstestppd %s" and fix any errors.",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant