-
Notifications
You must be signed in to change notification settings - Fork 464
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
"PAGE: total NUMBER" messages arent parsed, so allways 1 is logged in pagelog #3887
Comments
CUPS.org User: mike The current code in the scheduler is parsing PAGE: messages of the form "total NNN" and logs them accordingly. What operating system/Linux distribution are you using? What driver are you using? Did you compile CUPS 1.4.6 from source or install an existing binary package? |
CUPS.org User: nerve I have compiled it from source. The "PAGE: total nnn" messages are logged from a self developed filter The total message is parsed in job.c and used for the internal cupsdLogPage(cupsd_job_t *job, const char *page) With the page pointer pointing to the string "total 6" so the code sniped (first part of cupsdLogPage function) number = 1; for (format = PageLogFormat, bufptr = buffer; *format; format ++) look at the sscanf line which does the parsing. So sscanf returns nothing and and number is allways 1 and copies |
CUPS.org User: mike Fixed in Subversion repository. |
"str3887.patch": Index: scheduler/log.c--- scheduler/log.c (revision 9862) while (status == 0);
/*
for (format = PageLogFormat, bufptr = buffer; *format; format ++)
@@ -713,7 +713,7 @@ *bufptr = '\0';#ifdef HAVE_VSYSLOG
|
Version: 1.5-current
CUPS.org User: nerve
In function cupsdLogPage at scheduler/log.c
there is no code to parse the log entry
PAGE: total 2
from the filters,
so these give a line at page_log in form of
P020 40 HDA [13/Jul/2011:13:34:36 +0200] 1 1 - chsfsr00106.sfs-intra.net 0059xMhd.T02 - -
which is wrong, in cups 1.3 these give the line
P020 40 HDA [13/Jul/2011:13:34:36 +0200] total 1 - chsfsr00xxx.sfs-intra.net
Please readd the code to parse the "PAGE: total N" log messages from
filters or backends correct.
Thank you.
The text was updated successfully, but these errors were encountered: