Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 1999 17:28:38 +0200 (EET)
From:      vlad@lucky.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/14977: conserver fix 
Message-ID:  <199911181528.RLA23683@burka.carrier.kiev.ua>

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

>Number:         14977
>Category:       ports
>Synopsis:       conserver doesn't support speed over than 38400 on async lines
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 18 07:40:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Vlad Patenko
>Release:        FreeBSD 3.3-RC i386
>Organization:
Lucky Net
>Environment:
	
	FreeBSD 3.3-STABLE with current ports tree

>Description:

	conserver daemon doesn't supports tty devices speed more than 
	38400 bit/sec (such as 57600 and 115200 bit/sec).

>How-To-Repeat:

	try to use conserver with devices which operate on speed greater than
	38400 bit/sec.

>Fix:
	
	please replace existing pach-ad with the following one:


--- ./conserver/consent.c	Sun Nov  7 13:35:29 1999
+++ ./conserver/consent.c	Sun Nov  7 13:36:48 1999
@@ -77,8 +77,14 @@
 #endif
 
 
 BAUD baud [] = {
+#if defined(B115200)
+	{ "115200", B115200 },
+#endif
+#if defined(B57600)
+	{ "57600", B57600 },
+#endif
 #if defined(B38400)
 	{ "38400", B38400 },
 #endif
 #if defined(B19200)
@@ -196,17 +202,17 @@
 	 * Turn on:	ixoff
 	 */
 	termp.c_iflag = IXON|IXOFF|BRKINT;
 	termp.c_oflag = 0;
-	termp.c_cflag = CREAD;
+	termp.c_cflag = CREAD | (termp.c_cflag & (CLOCAL|CRTSCTS));
 	termp.c_cflag |= pCE->pparity->iset;
 	termp.c_lflag = 0;
 	/*
 	 * Set the VMIN == 128
 	 * Set the VTIME == 1 (0.1 sec)
 	 * Don't bother with the control characters as they are not used
 	 */
-	termp.c_cc[VMIN] = 128;
+	termp.c_cc[VMIN] = 1;
 	termp.c_cc[VTIME] = 1;
 
 	if (-1 == cfsetospeed(&termp,pCE->pbaud->irate)) {
 		fprintf(stderr, "%s: cfsetospeed: %s(%d): %s\n", progname, pCE->dfile, pCE->fdtty, strerror(errno));
@@ -423,17 +429,17 @@
 	(void)ioctl(0, I_PUSH, "stty_ld");
 #endif
 
 #if USE_TERMIOS
-	if (0 != ioctl(0, TCGETS, & n_tio)) {
+	if (0 != tcgetattr(0, & n_tio)) {
 		fprintf(stderr, "%s: iotcl: getsw: %s\n", progname, strerror(errno));
 		exit(1);
 	}
-	n_tio.c_iflag &= ~(IGNCR|IUCLC);
+
+	n_tio.c_iflag &= ~(IGNCR);
 	n_tio.c_iflag |= ICRNL|IXON|IXANY;
-	n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
 	n_tio.c_oflag |= OPOST|ONLCR;
-	n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
+	n_tio.c_lflag &= ~(NOFLSH|ECHOK|ECHONL);
 	n_tio.c_lflag |= ISIG|ICANON|ECHO;
 	n_tio.c_cc[VEOF] = '\004';
 	n_tio.c_cc[VEOL] = '\000';
 	n_tio.c_cc[VERASE] = '\010';
@@ -443,9 +449,9 @@
 	n_tio.c_cc[VQUIT] = '\034';
 	n_tio.c_cc[VSTART] = '\021';
 	n_tio.c_cc[VSTOP] = '\023';
 	n_tio.c_cc[VSUSP] = '\032';
-	if (0 != ioctl(0, TCSETS, & n_tio)) {
+	if (0 != tcsetattr(0, TCSANOW, & n_tio)) {
 		fprintf(stderr, "%s: getarrt: %s\n", progname, strerror(errno));
 		exit(1);
 	}
 

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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