Subject: bin/13612: Typo in telnetd/termstat.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ginsbach@cray.com>
List: netbsd-bugs
Date: 08/01/2001 11:34:27
>Number:         13612
>Category:       bin
>Synopsis:       Typo in termstat.c causes tty_istrapsig to not be called
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 01 09:32:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Brian Ginsbach
>Release:        NetBSD 1.5, NetBSD 1.5.1, current
>Organization:
Cray Inc.
>Environment:
n.a.

>Description:
	In the clientstat() function when LINEMODE defined there should
	be a call to tty_istrapsig() to set the MODE_TRAPSIG flag.  Currently
	this if statement is alway true since only the function address
	is tested -- the call is not a call.  The () are missing.  This
	should be similar to the call in localstat().
>How-To-Repeat:
	By inpection.
>Fix:
For 1.5.1
Index: termstat.c
===================================================================
RCS file: /cvsroot/basesrc/libexec/telnetd/termstat.c,v
retrieving revision 1.6.12.2
diff -u -r1.6.12.2 termstat.c
--- termstat.c  2001/07/29 04:12:54     1.6.12.2
+++ termstat.c  2001/08/01 16:21:55
@@ -446,7 +446,7 @@
                                useeditmode = 0;
                                if (tty_isediting())
                                        useeditmode |= MODE_EDIT;
-                               if (tty_istrapsig)
+                               if (tty_istrapsig())
                                        useeditmode |= MODE_TRAPSIG;
                                if (tty_issofttab())
                                        useeditmode |= MODE_SOFT_TAB;

For Current
Index: termstat.c
===================================================================
RCS file: /cvsroot/basesrc/libexec/telnetd/termstat.c,v
retrieving revision 1.9
diff -u -r1.9 termstat.c
--- termstat.c  2001/07/22 13:34:01     1.9
+++ termstat.c  2001/08/01 16:29:56
@@ -446,7 +446,7 @@
                                useeditmode = 0;
                                if (tty_isediting())
                                        useeditmode |= MODE_EDIT;
-                               if (tty_istrapsig)
+                               if (tty_istrapsig())
                                        useeditmode |= MODE_TRAPSIG;
                                if (tty_issofttab())
                                        useeditmode |= MODE_SOFT_TAB;

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