Subject: pkg/26107: comms/snooper package doesn't work
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <khym@azeotrope.org>
List: pkgsrc-bugs
Date: 06/29/2004 02:56:46
>Number:         26107
>Category:       pkg
>Synopsis:       comms/snooper package doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 29 07:57:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dave Huang
>Release:        NetBSD 2.0_BETA
>Organization:
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 28 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Environment:
	
	
System: NetBSD yerfable.azeotrope.org 2.0_BETA NetBSD 2.0_BETA (YERFABLE) #206: Mon May 31 05:53:47 CDT 2004 khym@yerfable.azeotrope.org:/usr2/obj.alpha/sys/arch/alpha/compile/YERFABLE alpha
Architecture: alpha
Machine: alpha
>Description:
	comms/snooper doesn't work; it displays the serial line
statuses, but doesn't display any data, and will hang using all the
CPU after a while.

>How-To-Repeat:
	Attempt to use snooper. E.g., snooper -b57600 tty02 tty04
>Fix:
	Don't know how this ever worked... ioctl(2) returns -1 on
failure, not on success.

Add this as patches/patch-aa:

--- ../src/scrn.c.orig	1998-08-12 09:32:02.000000000 -0500
+++ ../src/scrn.c	2004-06-29 02:44:50.000000000 -0500
@@ -33,7 +33,7 @@
 #ifdef TIOCGWINSZ
 			struct winsize win;
 
-			if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) == -1) {
+			if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1) {
 				rows = win.ws_row;
 				cols = win.ws_col;
 			}

>Release-Note:
>Audit-Trail:
>Unformatted: