diff -cr ./llp/ansi-iopfx.c /aux/ProtoGen-1.2hack/llp/llp/ansi-iopfx.c *** ./llp/ansi-iopfx.c Sun Oct 13 19:17:14 1996 --- /aux/ProtoGen-1.2hack/llp/llp/ansi-iopfx.c Fri Aug 23 16:58:50 1996 *************** *** 175,197 **** if(_as_select_except_handler(asp) == FAIL) return FAIL; } ! if(FD_ISSET(asp->_fd, &rdfds)) { char buf[AS_BUF_SIZE]; int cnt; ! #if DEBUG ! switch(cnt = read(asp->_fd, buf, AS_BUF_SIZE)) { ! #else ! switch(cnt = read(asp->_fd, buf, AS_BUF_SIZE -1)) { ! #endif case FAIL: asp->_errno = errno; syslog(LOG_ERR, __FUNCTION__ ":read: %m"); AS_ERROR(asp, AS_EIO); return FAIL; ! case 0: syslog(LOG_WARNING, __FUNCTION__ ": file became unusable"); AS_ERROR(asp, AS_ECONNRESET); --- 175,193 ---- if(_as_select_except_handler(asp) == FAIL) return FAIL; } ! if(FD_ISSET(asp->_fd, &rdfds)) { char buf[AS_BUF_SIZE]; int cnt; ! switch(cnt = read(asp->_fd, buf, AS_BUF_SIZE DBG(-1))) { case FAIL: asp->_errno = errno; syslog(LOG_ERR, __FUNCTION__ ":read: %m"); AS_ERROR(asp, AS_EIO); return FAIL; ! case 0: syslog(LOG_WARNING, __FUNCTION__ ": file became unusable"); AS_ERROR(asp, AS_ECONNRESET); diff -cr ./llp/ansi.c /aux/ProtoGen-1.2hack/llp/llp/ansi.c *** ./llp/ansi.c Sun Oct 13 19:17:21 1996 --- /aux/ProtoGen-1.2hack/llp/llp/ansi.c Fri Aug 23 18:00:11 1996 *************** *** 307,313 **** */ /* poll for the next control character */ ! ctrl = _as_recv_ctrl(asp, NULL, NULL, 0); switch(ctrl) { case FAIL: if(AS_ERRNO(asp) == AS_EIO) return FAIL; --- 307,313 ---- */ /* poll for the next control character */ ! ctrl = _as_recv_ctrl(asp, NULL, NULL, astimer_D); switch(ctrl) { case FAIL: if(AS_ERRNO(asp) == AS_EIO) return FAIL; diff -cr ./llp/distal.c /aux/ProtoGen-1.2hack/llp/llp/distal.c *** ./llp/distal.c Sun Oct 13 19:17:37 1996 --- /aux/ProtoGen-1.2hack/llp/llp/distal.c Fri Aug 23 17:35:40 1996 *************** *** 137,143 **** peername_inet(client_fd, dist_name); ! syslog(LOG_INFO, "distal connection to `%s' established", dist_peer); /* * Make the distal socket a buffered stream. --- 137,143 ---- peername_inet(client_fd, dist_name); ! syslog(LOG_INFO, "distal connection to `%s' established", dist_name); /* * Make the distal socket a buffered stream. *************** *** 154,160 **** CHK(recv_peername(client_fp, dist_peer), FAIL, goto fail_init); ! /* Wait a while in order to give precedence to the outgoing * transactions. */ sleep(delay); --- 154,170 ---- CHK(recv_peername(client_fp, dist_peer), FAIL, goto fail_init); ! /* ! * Only calls from `localhost' are allowed ! */ ! if(strcmp("localhost", dist_name) != 0) ! { ! syslog(LOG_ALERT, "unpriviledged distal client `%s' (!=localhost)", ! dist_name); ! goto fail_init; ! } ! ! /* Wait a while in order to give precedence to the outgoing * transactions. */ sleep(delay); *************** *** 285,302 **** do_exit = 2; goto end; fail_distal: syslog(LOG_ERR, "error on distal side"); do_exit = 0; goto end; fail_init: ctimeout(); tcflush(proxi_fd, TCIFLUSH); ! syslog(LOG_ERR, "error on during initialization"); ! do_exit = 0; CHK(fclose(client_fp), EOF, close(client_fd)); ! DBG(syslog(LOG_DEBUG, "distal server yields the line")); end: CHK(fclose(client_fp), EOF, close(client_fd)); --- 290,308 ---- do_exit = 2; goto end; + /* fail_distal: syslog(LOG_ERR, "error on distal side"); do_exit = 0; goto end; + */ fail_init: ctimeout(); tcflush(proxi_fd, TCIFLUSH); ! syslog(LOG_ERR, "error during initialization"); CHK(fclose(client_fp), EOF, close(client_fd)); ! continue; end: CHK(fclose(client_fp), EOF, close(client_fd)); diff -cr ./llp/llpdrv.c /aux/ProtoGen-1.2hack/llp/llp/llpdrv.c *** ./llp/llpdrv.c Sun Oct 13 19:14:48 1996 --- /aux/ProtoGen-1.2hack/llp/llp/llpdrv.c Fri Aug 23 12:16:43 1996 *************** *** 399,405 **** { if(setsid() == FAIL) { ! syslog(LOG_ERR, "setpgrp: %m"); finish(1); } } --- 399,405 ---- { if(setsid() == FAIL) { ! syslog(LOG_ERR, "setsid: %m"); finish(1); } } diff -cr ./socket/tty.c /aux/ProtoGen-1.2hack/llp/socket/tty.c *** ./socket/tty.c Sun Oct 13 19:15:30 1996 --- /aux/ProtoGen-1.2hack/llp/socket/tty.c Fri Aug 23 12:53:27 1996 *************** *** 321,327 **** /* TTY MODES */ tcflag_t tty_iflags = ( IGNBRK | IGNPAR ); tcflag_t tty_oflags = 0; ! tcflag_t tty_cflags = ( B9600 | CS8 | CREAD | HUPCL ); result configure_tty(int fd) --- 321,327 ---- /* TTY MODES */ tcflag_t tty_iflags = ( IGNBRK | IGNPAR ); tcflag_t tty_oflags = 0; ! tcflag_t tty_cflags = ( CS8 | CREAD | HUPCL ); result configure_tty(int fd) *************** *** 336,341 **** --- 336,343 ---- tio.c_lflag = 0; tio.c_cc[VMIN] = 0; tio.c_cc[VTIME] = 0; + + CHK(cfsetspeed(&tio, 9600), FAIL, return FAIL); CHK(tcsetattr(fd, TCSANOW, &tio), FAIL, return FAIL);