/*
* "$Id: statbuf.c 7674 2008-06-18 23:18:32Z mike $"
*
- * Status buffer routines for the Common UNIX Printing System (CUPS)
- * scheduler.
+ * Status buffer routines for the CUPS scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
*/
cupsd_statbuf_t * /* O - New status buffer */
-cupsdStatBufNew(int fd, /* I - File descriptor of pipe */
+cupsdStatBufNew(int fd, /* I - File descriptor of pipe */
const char *prefix, /* I - Printf-style prefix string */
...) /* I - Additional args as needed */
{
*/
char * /* O - Line from buffer, "", or NULL */
-cupsdStatBufUpdate(cupsd_statbuf_t *sb, /* I - Status buffer */
- int *loglevel,
- /* O - Log level */
- char *line,
- /* I - Line buffer */
- int linelen)
- /* I - Size of line buffer */
+cupsdStatBufUpdate(
+ cupsd_statbuf_t *sb, /* I - Status buffer */
+ int *loglevel, /* O - Log level */
+ char *line, /* I - Line buffer */
+ int linelen) /* I - Size of line buffer */
{
int bytes; /* Number of bytes read */
char *lineptr, /* Pointer to end of line in buffer */
if (sb->prefix[0])
{
if (*loglevel > CUPSD_LOG_NONE &&
- (*loglevel != CUPSD_LOG_INFO || LogLevel == CUPSD_LOG_DEBUG2))
+ (*loglevel != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
{
/*
* General status message; send it to the error_log file...
else
cupsdLogMessage(*loglevel, "%s %s", sb->prefix, message);
}
- else if (*loglevel < CUPSD_LOG_NONE && LogLevel == CUPSD_LOG_DEBUG2)
+ else if (*loglevel < CUPSD_LOG_NONE && LogLevel >= CUPSD_LOG_DEBUG)
cupsdLogMessage(CUPSD_LOG_DEBUG2, "%s %s", sb->prefix, sb->buffer);
}