diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-06-09 21:42:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-06-09 21:42:03 +0000 |
commit | 1b1116725943152a9d971926900e7fceb2fd6c9b (patch) | |
tree | 6e70ff2f1ec271bc1a9693f317ff6e872dde0347 | |
parent | f13808f66d310df746783062533c3e48656d96fb (diff) |
Don't print jobs in transit to a remote queue as being "active"
-rw-r--r-- | usr.sbin/lpr/common_source/displayq.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c index 1fa83e3293a..5b03a71b7be 100644 --- a/usr.sbin/lpr/common_source/displayq.c +++ b/usr.sbin/lpr/common_source/displayq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: displayq.c,v 1.20 2002/06/09 03:44:50 millert Exp $ */ +/* $OpenBSD: displayq.c,v 1.21 2002/06/09 21:42:02 millert Exp $ */ /* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static const char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95"; #else -static const char rcsid[] = "$OpenBSD: displayq.c,v 1.20 2002/06/09 03:44:50 millert Exp $"; +static const char rcsid[] = "$OpenBSD: displayq.c,v 1.21 2002/06/09 21:42:02 millert Exp $"; #endif #endif /* not lint */ @@ -231,8 +231,13 @@ displayq(int format) header(); for (i = 0; i < nitems; i++) { q = queue[i]; - /* active == 0, otherwise count starts at 1 */ - if (strcmp(current, q->q_name) == 0) + /* + * If this is a local job that is currently + * printing, use job #0 which inform() will + * convert to "active". Otherwise, we start + * counting from 1... + */ + if (!remote && strcmp(current, q->q_name) == 0) inform(q->q_name, 0); else inform(q->q_name, i + 1); |