From 8325f811e72b888f57ba8cbc11759abb229c847d Mon Sep 17 00:00:00 2001 From: Edward Emelianov Date: Fri, 8 Dec 2023 12:17:27 +0300 Subject: [PATCH] fixed small bug --- ttysocket.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ttysocket.c b/ttysocket.c index 6276d9b..ed76130 100644 --- a/ttysocket.c +++ b/ttysocket.c @@ -357,6 +357,10 @@ static TTY_descr2* opentty(){ goto someerr; } ioctl(descr->comfd, TCGETS2, &descr->tty); + if(descr->tty.c_ispeed != device->speed || descr->tty.c_ospeed != device->speed){ + WARN(_("Can't set speed %d, got ispeed=%d, ospeed=%d"), device->speed, descr->tty.c_ispeed, descr->tty.c_ospeed); + //goto someerr; + } device->speed = descr->tty.c_ispeed; return descr; someerr: @@ -409,6 +413,7 @@ int opendev(chardevice *d, char *path){ } } changeeol(device->eol); // allow string functions to know EOL + memcpy(d, device, sizeof(chardevice)); return TRUE; }