[cups.development] [RFE] STR #1655: Add SNMP page counter and printer status support to socket and lpd backends
alet at librelogiciel.com
Thu May 1 04:53:18 PDT 2008
On Wed, Apr 30, 2008 at 04:52:42PM -0700, Michael Sweet wrote:
> [STR Closed w/Resolution]
> Fixed in Subversion repository.
Looks like the code is not consistent between socket and lpd
grep CUPS_TC_idle lpd.c socket.c
In lpd.c you wait for the printer being idle before accepting the
internal page counter's value. This is the correct way to do it.
Unfortunately, from my experience, some printers will report being
'idle' between pages (they alternate between 'printing' and 'idle'
for each page), and your loop may very well exit too early, like
after the very first page if the printer has a big internal buffer.
The solution I've found is to check if the printer's status
stabilizes to 'idle' over time (around 30 configurable seconds in
which the status is checked several times). Of course this lenghten
inter-job delay but it's as far as I know the only way to support
some printers (I think I've seen this strange behavior on some
Brother printers, but it may depends on the complexity of each page).
I've not checked if you also retrieve the page counter before the
backend is launched, but if this is the case you must ensure the
printer is not still in 'printing' status (previous job) before
trusting the SNMP answer. This can happen if the printer can be
accessed by several print servers or directly by some clients).
More information about the cups