diff options
author | Fritz Elfert <felfert@to.com> | 2002-03-05 17:58:11 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2002-03-05 17:58:11 +0000 |
commit | cb2577b29fe7b93e9b168ded7f35da748fdeaf1d (patch) | |
tree | d7cf962ead89069f885f8da7137feb94acb3dfec /ncpd/mp_serial.c | |
parent | 8f9ae0a93ba3ea860a28933c2a411eae9365c859 (diff) | |
download | plptools-cb2577b29fe7b93e9b168ded7f35da748fdeaf1d.tar.gz plptools-cb2577b29fe7b93e9b168ded7f35da748fdeaf1d.tar.bz2 plptools-cb2577b29fe7b93e9b168ded7f35da748fdeaf1d.zip |
- Re-Implemented lower levels of ncpd (packet and link).
ncpd is now multithreaded. Results in much better performance and less
CPU usage.
Diffstat (limited to 'ncpd/mp_serial.c')
-rw-r--r-- | ncpd/mp_serial.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ncpd/mp_serial.c b/ncpd/mp_serial.c index 155dea1..7f6a792 100644 --- a/ncpd/mp_serial.c +++ b/ncpd/mp_serial.c @@ -67,7 +67,7 @@ int init_serial(const char *dev, int speed, int debug) { - int fd, baud, clocal; + int fd, baud; int uid, euid; struct termios ti; #ifdef hpux @@ -127,12 +127,11 @@ init_serial(const char *dev, int speed, int debug) #define seteuid(a) setresuid(-1, a, -1) #endif - clocal = CLOCAL; if (seteuid(uid)) { perror("seteuid"); exit(1); } - if ((fd = open(dev, O_RDWR | O_NDELAY | O_NOCTTY, 0)) < 0) { + if ((fd = open(dev, O_RDWR /*FRITZTEST | O_NDELAY */ | O_NOCTTY, 0)) < 0) { perror(dev); exit(1); } @@ -150,12 +149,12 @@ init_serial(const char *dev, int speed, int debug) memset(&ti, 0, sizeof(struct termios)); #if defined(hpux) || defined(_IBMR2) - ti.c_cflag = CS8 | HUPCL | clocal | CREAD; + ti.c_cflag = CS8 | HUPCL | CLOCAL | CREAD; #endif #if defined(sun) || defined(linux) || defined(__sgi) || \ defined(__NetBSD__) || defined(__FreeBSD__) - ti.c_cflag = CS8 | HUPCL | clocal | CRTSCTS | CREAD; - ti.c_iflag = IGNBRK | IGNPAR | IXON | IXOFF; + ti.c_cflag = CS8 | HUPCL | CLOCAL | CRTSCTS | CREAD; + ti.c_iflag = IGNBRK | IGNPAR /*| IXON | IXOFF */; ti.c_cc[VMIN] = 1; ti.c_cc[VTIME] = 0; #endif |