/*
- * "$Id: statbuf.c 4719 2005-09-28 21:12:44Z mike $"
+ * "$Id: statbuf.c 5888 2006-08-24 21:42:47Z mike $"
*
* Status buffer routines for the Common UNIX Printing System (CUPS)
* scheduler.
*
- * Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ * Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
lineptr = NULL;
}
- if (lineptr == NULL)
+ if (!lineptr)
{
/*
* End of file...
else
cupsdLogMessage(*loglevel, "%s %s", sb->prefix, message);
}
+ else if (*loglevel < CUPSD_LOG_NONE && LogLevel == CUPSD_LOG_DEBUG2)
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "%s %s", sb->prefix, sb->buffer);
/*
* Copy the message to the line buffer...
* Copy over the buffer data we've used up...
*/
- _cups_strcpy(sb->buffer, lineptr);
+ if (lineptr < sb->buffer + sb->bufused)
+ _cups_strcpy(sb->buffer, lineptr);
+
sb->bufused -= lineptr - sb->buffer;
if (sb->bufused < 0)
/*
- * End of "$Id: statbuf.c 4719 2005-09-28 21:12:44Z mike $".
+ * End of "$Id: statbuf.c 5888 2006-08-24 21:42:47Z mike $".
*/