diff --git a/src/sock.c b/src/sock.c index c9eb926..55b036b 100644 --- a/src/sock.c +++ b/src/sock.c @@ -21,6 +21,7 @@ struct slot { static int bind_pty(patty_ax25_sock *sock) { int ptysub; + struct termios t; if (openpty(&sock->fd, &ptysub, sock->pty, NULL, NULL) < 0) { goto error_openpty; @@ -34,6 +35,13 @@ static int bind_pty(patty_ax25_sock *sock) { goto error_unlockpt; } + memset(&t, '\0', sizeof(t)); + cfmakeraw(&t); + + if (tcsetattr(sock->fd, TCSANOW, &t) < 0) { + errno = 0; + } + return 0; error_unlockpt: