patch for lpq output parsing for LPRng
Jeremy Allison
jra at samba.org
Mon Jul 8 11:19:03 GMT 2002
On Mon, Jul 08, 2002 at 04:26:26PM +0800, James Henstridge wrote:
> [please keep me in the CC line for replies, as I am not subscribed to
> this list]
>
> Since upgrading one of our servers that handles a number of print queues
> to Red Hat 7.3, I started getting complaints about jobs not getting
> removed from the print queues -- they would get printed, then their
> status would change to paused in the print queue dialog on the Windows
> machines. This also meant that the printer icon in the system tray
> didn't disapear, which a number of users used to check when their job
> had finished printing.
>
> This problem occurs because the version of LPRng (3.8.9) that ships with
> RH7.3 lists the last few finished jobs in the output of lpq with their
> rank listed as "done". The output looks something like this:
>
> Printer: hp5100 at blinky (dest auto at hp5100)
> Queue: no printable jobs in queue
> Server: no server active
> Status: job 'james at blinky+708' saved at 16:06:16.677
> Rank Owner/ID Class Job Files Size Time
> done carole at blinky+580 A 580 smbprn.007629.i16aS5 99120
> 10:34:44
> done james at blinky+708 A 708 smbprn.000024.rW1nDr 72089
> 16:06:16
> JetDirect lpd: no jobs queued on the port Auto
>
> I wrote a simple patch to solve this problem. If it encounters a print
> job with its rank set to "done", it sets the status field to LPQ_PRINTED
> (which seems like the most appropriate status). This seems to solve the
> problem for us -- the completed jobs don't show up paused, and the
> printer icon in the system tray disapears when the job completes.
>
> It would be useful to get this patch included in future 2.2 releases.
Applied - thanks !
Jeremy.
More information about the samba-technical
mailing list