Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Dec 1996 22:51:49 -0500 (EST)
From:      Ted Wisniewski <ted@emerald.plymouth.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/2139: /usr/sbin/lpc cannot clean queues
Message-ID:  <199612030351.WAA06522@emerald.plymouth.edu>
Resent-Message-ID: <199612030400.UAA05339@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2139
>Category:       bin
>Synopsis:       /usr/sbin/lpc cannot clean queues
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec  2 20:00:01 PST 1996
>Last-Modified:
>Originator:     Ted Wisniewski
>Organization:
Plymouth State College
>Release:        FreeBSD 2.2-ALPHA i386
>Environment:

	

>Description:

	/usr/sbin/lpc cannot be used to clean printer queues due to a logic
	error.

>How-To-Repeat:

	Stop a queue (lpc stop queuename)
	send  stuff to it (lpr -Pqueuname filename)
	Clean the queue (lpc clean queuename)

	Stuff is not deleted.

>Fix:
	
	Apply patch below to usr.sbin/lpr/lpc/cmds.c

*** usr.sbin/lpr/lpc/cmds.c.ori	Mon Dec  2 22:45:35 1996
--- usr.sbin/lpr/lpc/cmds.c	Mon Dec  2 22:45:53 1996
***************
*** 327,333 ****
  				i++;
  				n++;
  			}
! 			if (n == 0) {
  				strcpy(lp, cp);
  				unlinkf(line);
  			}
--- 327,333 ----
  				i++;
  				n++;
  			}
! 			if (n != 0) {
  				strcpy(lp, cp);
  				unlinkf(line);
  			}

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612030351.WAA06522>